src/configDialog.h

changeset 806
4240f47aa2d4
parent 794
c254ddc6618b
child 844
11587d419d2f
equal deleted inserted replaced
805:d88c0354de97 806:4240f47aa2d4
25 class QDoubleSpinBox; 25 class QDoubleSpinBox;
26 26
27 // ============================================================================= 27 // =============================================================================
28 class ShortcutListItem : public QListWidgetItem 28 class ShortcutListItem : public QListWidgetItem
29 { 29 {
30 PROPERTY (public, KeySequenceConfigEntry*, keyConfig, setKeyConfig, STOCK_WRITE) 30 PROPERTY (public, QAction*, action, setAction, STOCK_WRITE)
31 PROPERTY (public, QAction*, action, setAction, STOCK_WRITE) 31 PROPERTY (public, QKeySequence, sequence, setSequence, STOCK_WRITE)
32 32
33 public: 33 public:
34 explicit ShortcutListItem (QListWidget* view = null, int type = Type) : 34 explicit ShortcutListItem (QListWidget* view = null, int type = Type) :
35 QListWidgetItem (view, type) {} 35 QListWidgetItem (view, type) {}
36 }; 36 };
61 private: 61 private:
62 Ui_ConfigUI* ui; 62 Ui_ConfigUI* ui;
63 QList<QListWidgetItem*> quickColorItems; 63 QList<QListWidgetItem*> quickColorItems;
64 64
65 void applySettings(); 65 void applySettings();
66 void addShortcut (KeySequenceConfigEntry& cfg, QAction* act, int& i); 66 void addShortcut (QAction* act);
67 void setButtonBackground (QPushButton* button, QString value); 67 void setButtonBackground (QPushButton* button, QString value);
68 void pickColor (QString& conf, QPushButton* button); 68 void pickColor (QString& conf, QPushButton* button);
69 void updateQuickColorList (LDQuickColor* sel = null); 69 void updateQuickColorList (LDQuickColor* sel = null);
70 void setShortcutText (ShortcutListItem* item); 70 void setShortcutText (ShortcutListItem* item);
71 int getItemRow (QListWidgetItem* item, QList<QListWidgetItem*>& haystack); 71 int getItemRow (QListWidgetItem* item, QList<QListWidgetItem*>& haystack);
98 { 98 {
99 Q_OBJECT 99 Q_OBJECT
100 100
101 public: 101 public:
102 explicit KeySequenceDialog (QKeySequence seq, QWidget* parent = null, Qt::WindowFlags f = 0); 102 explicit KeySequenceDialog (QKeySequence seq, QWidget* parent = null, Qt::WindowFlags f = 0);
103 static bool staticDialog (KeySequenceConfigEntry* cfg, QWidget* parent = null); 103 static bool staticDialog (ShortcutListItem* item, QWidget* parent = null);
104 104
105 QLabel* lb_output; 105 QLabel* lb_output;
106 QDialogButtonBox* bbx_buttons; 106 QDialogButtonBox* bbx_buttons;
107 QKeySequence seq; 107 QKeySequence seq;
108 108

mercurial