27 class QDoubleSpinBox; |
27 class QDoubleSpinBox; |
28 |
28 |
29 // ============================================================================= |
29 // ============================================================================= |
30 class ShortcutListItem : public QListWidgetItem |
30 class ShortcutListItem : public QListWidgetItem |
31 { |
31 { |
|
32 PROPERTY (keyseqconfig*, keyConfig, setKeyConfig) |
|
33 PROPERTY (QAction*, action, setAction) |
|
34 |
32 public: |
35 public: |
33 explicit ShortcutListItem( QListWidget* view = null, int type = Type ) : |
36 explicit ShortcutListItem( QListWidget* view = null, int type = Type ) : |
34 QListWidgetItem( view, type ) {} |
37 QListWidgetItem( view, type ) {} |
35 |
|
36 actionmeta* getActionInfo() const |
|
37 { |
|
38 return m_info; |
|
39 } |
|
40 |
|
41 void setActionInfo( actionmeta* info ) |
|
42 { |
|
43 m_info = info; |
|
44 } |
|
45 |
|
46 private: |
|
47 actionmeta* m_info; |
|
48 }; |
38 }; |
49 |
39 |
50 // ============================================================================= |
40 // ============================================================================= |
51 class ConfigDialog : public QDialog |
41 class ConfigDialog : public QDialog |
52 { |
42 { |
53 Q_OBJECT |
43 Q_OBJECT |
54 |
44 |
55 public: |
45 public: |
56 ConfigDialog( ForgeWindow* parent ); |
46 ConfigDialog (ForgeWindow* parent); |
57 virtual ~ConfigDialog(); |
47 virtual ~ConfigDialog(); |
58 static void staticDialog(); |
48 static void staticDialog(); |
59 const Ui_ConfigUI* getUI() const; |
49 const Ui_ConfigUI* getUI() const; |
60 float getGridValue( int i, int j ) const; |
50 float getGridValue (int i, int j) const; |
61 |
51 |
62 vector<quickColor> quickColorMeta; |
52 vector<quickColor> quickColorMeta; |
63 QDoubleSpinBox* dsb_gridData[3][4]; |
53 QDoubleSpinBox* dsb_gridData[3][4]; |
64 |
54 |
65 private: |
55 private: |
71 void initMainTab(); |
61 void initMainTab(); |
72 void initShortcutsTab(); |
62 void initShortcutsTab(); |
73 void initQuickColorTab(); |
63 void initQuickColorTab(); |
74 void initGridTab(); |
64 void initGridTab(); |
75 void initExtProgTab(); |
65 void initExtProgTab(); |
|
66 void addShortcut (keyseqconfig& cfg, QAction* act, ulong& i); |
76 void setButtonBackground( QPushButton* button, str value ); |
67 void setButtonBackground( QPushButton* button, str value ); |
77 void pickColor( strconfig& cfg, QPushButton* button ); |
68 void pickColor( strconfig& cfg, QPushButton* button ); |
78 void updateQuickColorList( quickColor* sel = null ); |
69 void updateQuickColorList( quickColor* sel = null ); |
79 void setShortcutText( QListWidgetItem* qItem, actionmeta meta ); |
70 void setShortcutText (ShortcutListItem* item); |
80 int getItemRow( QListWidgetItem* item, vector<QListWidgetItem*>& haystack ); |
71 int getItemRow( QListWidgetItem* item, vector<QListWidgetItem*>& haystack ); |
81 str makeColorToolBarString(); |
72 str makeColorToolBarString(); |
82 QListWidgetItem* getSelectedQuickColor(); |
73 QListWidgetItem* getSelectedQuickColor(); |
83 QList<ShortcutListItem*> getShortcutSelection(); |
74 QList<ShortcutListItem*> getShortcutSelection(); |
84 |
75 |