mirror of
				https://github.com/ciphervance/supercell-wx.git
				synced 2025-10-31 01:20:06 +00:00 
			
		
		
		
	Rename keybind to hotkey
This commit is contained in:
		
							parent
							
								
									7e99b5fb00
								
							
						
					
					
						commit
						60c8af46bf
					
				
					 4 changed files with 19 additions and 19 deletions
				
			
		|  | @ -231,9 +231,9 @@ set(HDR_UI source/scwx/qt/ui/about_dialog.hpp | |||
|            source/scwx/qt/ui/county_dialog.hpp | ||||
|            source/scwx/qt/ui/download_dialog.hpp | ||||
|            source/scwx/qt/ui/flow_layout.hpp | ||||
|            source/scwx/qt/ui/hotkey_edit.hpp | ||||
|            source/scwx/qt/ui/imgui_debug_dialog.hpp | ||||
|            source/scwx/qt/ui/imgui_debug_widget.hpp | ||||
|            source/scwx/qt/ui/keybind_edit.hpp | ||||
|            source/scwx/qt/ui/layer_dialog.hpp | ||||
|            source/scwx/qt/ui/left_elided_item_delegate.hpp | ||||
|            source/scwx/qt/ui/level2_products_widget.hpp | ||||
|  | @ -254,9 +254,9 @@ set(SRC_UI source/scwx/qt/ui/about_dialog.cpp | |||
|            source/scwx/qt/ui/county_dialog.cpp | ||||
|            source/scwx/qt/ui/download_dialog.cpp | ||||
|            source/scwx/qt/ui/flow_layout.cpp | ||||
|            source/scwx/qt/ui/hotkey_edit.cpp | ||||
|            source/scwx/qt/ui/imgui_debug_dialog.cpp | ||||
|            source/scwx/qt/ui/imgui_debug_widget.cpp | ||||
|            source/scwx/qt/ui/keybind_edit.cpp | ||||
|            source/scwx/qt/ui/layer_dialog.cpp | ||||
|            source/scwx/qt/ui/left_elided_item_delegate.cpp | ||||
|            source/scwx/qt/ui/level2_products_widget.cpp | ||||
|  |  | |||
|  | @ -1,4 +1,4 @@ | |||
| #include <scwx/qt/ui/keybind_edit.hpp> | ||||
| #include <scwx/qt/ui/hotkey_edit.hpp> | ||||
| #include <scwx/util/logger.hpp> | ||||
| 
 | ||||
| #include <qevent.h> | ||||
|  | @ -10,10 +10,10 @@ namespace qt | |||
| namespace ui | ||||
| { | ||||
| 
 | ||||
| static const std::string logPrefix_ = "scwx::qt::ui::keybind_edit"; | ||||
| static const std::string logPrefix_ = "scwx::qt::ui::hotkey_edit"; | ||||
| static const auto        logger_    = scwx::util::Logger::Create(logPrefix_); | ||||
| 
 | ||||
| class KeybindEdit::Impl | ||||
| class HotkeyEdit::Impl | ||||
| { | ||||
| public: | ||||
|    explicit Impl() {}; | ||||
|  | @ -22,7 +22,7 @@ public: | |||
|    QKeySequence sequence_ {}; | ||||
| }; | ||||
| 
 | ||||
| KeybindEdit::KeybindEdit(QWidget* parent) : | ||||
| HotkeyEdit::HotkeyEdit(QWidget* parent) : | ||||
|     QLineEdit(parent), p {std::make_unique<Impl>()} | ||||
| { | ||||
|    setReadOnly(true); | ||||
|  | @ -51,14 +51,14 @@ KeybindEdit::KeybindEdit(QWidget* parent) : | |||
|    } | ||||
| } | ||||
| 
 | ||||
| KeybindEdit::~KeybindEdit() {} | ||||
| HotkeyEdit::~HotkeyEdit() {} | ||||
| 
 | ||||
| QKeySequence KeybindEdit::key_sequence() const | ||||
| QKeySequence HotkeyEdit::key_sequence() const | ||||
| { | ||||
|    return p->sequence_; | ||||
| } | ||||
| 
 | ||||
| void KeybindEdit::set_key_sequence(const QKeySequence& sequence) | ||||
| void HotkeyEdit::set_key_sequence(const QKeySequence& sequence) | ||||
| { | ||||
|    if (sequence != p->sequence_) | ||||
|    { | ||||
|  | @ -68,7 +68,7 @@ void KeybindEdit::set_key_sequence(const QKeySequence& sequence) | |||
|    } | ||||
| } | ||||
| 
 | ||||
| void KeybindEdit::focusInEvent(QFocusEvent* e) | ||||
| void HotkeyEdit::focusInEvent(QFocusEvent* e) | ||||
| { | ||||
|    logger_->trace("focusInEvent"); | ||||
| 
 | ||||
|  | @ -79,7 +79,7 @@ void KeybindEdit::focusInEvent(QFocusEvent* e) | |||
|    QLineEdit::focusInEvent(e); | ||||
| } | ||||
| 
 | ||||
| void KeybindEdit::focusOutEvent(QFocusEvent* e) | ||||
| void HotkeyEdit::focusOutEvent(QFocusEvent* e) | ||||
| { | ||||
|    logger_->trace("focusOutEvent"); | ||||
| 
 | ||||
|  | @ -90,7 +90,7 @@ void KeybindEdit::focusOutEvent(QFocusEvent* e) | |||
|    QLineEdit::focusOutEvent(e); | ||||
| } | ||||
| 
 | ||||
| void KeybindEdit::keyPressEvent(QKeyEvent* e) | ||||
| void HotkeyEdit::keyPressEvent(QKeyEvent* e) | ||||
| { | ||||
|    logger_->trace("keyPressEvent"); | ||||
| 
 | ||||
|  | @ -124,7 +124,7 @@ void KeybindEdit::keyPressEvent(QKeyEvent* e) | |||
|    setText(sequence.toString()); | ||||
| } | ||||
| 
 | ||||
| void KeybindEdit::keyReleaseEvent(QKeyEvent*) | ||||
| void HotkeyEdit::keyReleaseEvent(QKeyEvent*) | ||||
| { | ||||
|    logger_->trace("keyReleaseEvent"); | ||||
| 
 | ||||
|  | @ -9,14 +9,14 @@ namespace qt | |||
| namespace ui | ||||
| { | ||||
| 
 | ||||
| class KeybindEdit : public QLineEdit | ||||
| class HotkeyEdit : public QLineEdit | ||||
| { | ||||
|    Q_OBJECT | ||||
|    Q_DISABLE_COPY_MOVE(KeybindEdit) | ||||
|    Q_DISABLE_COPY_MOVE(HotkeyEdit) | ||||
| 
 | ||||
| public: | ||||
|    explicit KeybindEdit(QWidget* parent = nullptr); | ||||
|    ~KeybindEdit(); | ||||
|    explicit HotkeyEdit(QWidget* parent = nullptr); | ||||
|    ~HotkeyEdit(); | ||||
| 
 | ||||
|    QKeySequence key_sequence() const; | ||||
| 
 | ||||
|  | @ -97,7 +97,7 @@ | |||
|          </item> | ||||
|          <item> | ||||
|           <property name="text"> | ||||
|            <string>Key Binds</string> | ||||
|            <string>Hotkeys</string> | ||||
|           </property> | ||||
|           <property name="icon"> | ||||
|            <iconset resource="../../../../scwx-qt.qrc"> | ||||
|  | @ -1016,7 +1016,7 @@ | |||
|            </item> | ||||
|           </layout> | ||||
|          </widget> | ||||
|          <widget class="QWidget" name="keybinds"/> | ||||
|          <widget class="QWidget" name="hotkeys"/> | ||||
|         </widget> | ||||
|        </widget> | ||||
|       </item> | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Dan Paulat
						Dan Paulat