diff -r e3a32a79a10a -r 4355e72ffd47 src/configDialog.h
--- a/src/configDialog.h Wed Sep 25 11:02:44 2013 +0300
+++ b/src/configDialog.h Wed Oct 23 12:46:10 2013 +0300
@@ -16,8 +16,8 @@
* along with this program. If not, see .
*/
-#ifndef CONFIGDIALOG_H
-#define CONFIGDIALOG_H
+#ifndef LDFORGE_CONFIGDIALOG_H
+#define LDFORGE_CONFIGDIALOG_H
#include "gui.h"
#include
@@ -27,91 +27,92 @@
class QDoubleSpinBox;
// =============================================================================
-class ShortcutListItem : public QListWidgetItem {
- PROPERTY (KeySequenceConfig*, keyConfig, setKeyConfig)
+class ShortcutListItem : public QListWidgetItem
+{ PROPERTY (KeySequenceConfig*, keyConfig, setKeyConfig)
PROPERTY (QAction*, action, setAction)
-
-public:
- explicit ShortcutListItem (QListWidget* view = null, int type = Type) :
- QListWidgetItem (view, type) {}
+
+ public:
+ explicit ShortcutListItem (QListWidget* view = null, int type = Type) :
+ QListWidgetItem (view, type) {}
};
// =============================================================================
-class ConfigDialog : public QDialog {
- Q_OBJECT
-
-public:
- enum Tab {
- InterfaceTab,
- ProfileTab,
- ShortcutsTab,
- QuickColorsTab,
- GridsTab,
- ExtProgsTab,
- DownloadTab
- };
-
- explicit ConfigDialog (Tab deftab = InterfaceTab, QWidget* parent = null, Qt::WindowFlags f = 0);
- virtual ~ConfigDialog();
- float getGridValue (int i, int j) const;
-
- List quickColors;
- QDoubleSpinBox* dsb_gridData[3][4];
-
-private:
- Ui_ConfigUI* ui;
- QLabel* lb_gridLabels[3];
- QLabel* lb_gridIcons[3];
- List quickColorItems;
-
- void applySettings();
- void addShortcut (KeySequenceConfig& cfg, QAction* act, ulong& i);
- void setButtonBackground (QPushButton* button, str value);
- void pickColor (StringConfig& cfg, QPushButton* button);
- void updateQuickColorList (LDQuickColor* sel = null);
- void setShortcutText (ShortcutListItem* item);
- int getItemRow (QListWidgetItem* item, List& haystack);
- str quickColorString();
- QListWidgetItem* getSelectedQuickColor();
- QList getShortcutSelection();
- void initGrids();
- void initExtProgs();
-
-private slots:
- void slot_setGLBackground();
- void slot_setGLForeground();
- void slot_setShortcut();
- void slot_resetShortcut();
- void slot_clearShortcut();
- void slot_setColor();
- void slot_delColor();
- void slot_addColorSeparator();
- void slot_moveColor();
- void slot_clearColors();
- void slot_setExtProgPath();
- void slot_findDownloadFolder();
- void buttonClicked (QAbstractButton* button);
+class ConfigDialog : public QDialog
+{ Q_OBJECT
+
+ public:
+ enum Tab
+ { InterfaceTab,
+ ProfileTab,
+ ShortcutsTab,
+ QuickColorsTab,
+ GridsTab,
+ ExtProgsTab,
+ DownloadTab
+ };
+
+ explicit ConfigDialog (Tab deftab = InterfaceTab, QWidget* parent = null, Qt::WindowFlags f = 0);
+ virtual ~ConfigDialog();
+ float getGridValue (int i, int j) const;
+
+ QList quickColors;
+ QDoubleSpinBox* dsb_gridData[3][4];
+
+ private:
+ Ui_ConfigUI* ui;
+ QLabel* lb_gridLabels[3];
+ QLabel* lb_gridIcons[3];
+ QList quickColorItems;
+
+ void applySettings();
+ void addShortcut (KeySequenceConfig& cfg, QAction* act, int& i);
+ void setButtonBackground (QPushButton* button, str value);
+ void pickColor (StringConfig& cfg, QPushButton* button);
+ void updateQuickColorList (LDQuickColor* sel = null);
+ void setShortcutText (ShortcutListItem* item);
+ int getItemRow (QListWidgetItem* item, QList& haystack);
+ str quickColorString();
+ QListWidgetItem* getSelectedQuickColor();
+ QList getShortcutSelection();
+ void initGrids();
+ void initExtProgs();
+
+ private slots:
+ void slot_setGLBackground();
+ void slot_setGLForeground();
+ void slot_setShortcut();
+ void slot_resetShortcut();
+ void slot_clearShortcut();
+ void slot_setColor();
+ void slot_delColor();
+ void slot_addColorSeparator();
+ void slot_moveColor();
+ void slot_clearColors();
+ void slot_setExtProgPath();
+ void slot_findDownloadFolder();
+ void buttonClicked (QAbstractButton* button);
+ void selectPage (int row);
};
// =============================================================================
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
// =============================================================================
-class KeySequenceDialog : public QDialog {
- Q_OBJECT
+class KeySequenceDialog : public QDialog
+{ Q_OBJECT
+
+ public:
+ explicit KeySequenceDialog (QKeySequence seq, QWidget* parent = null, Qt::WindowFlags f = 0);
+ static bool staticDialog (KeySequenceConfig* cfg, QWidget* parent = null);
-public:
- explicit KeySequenceDialog (QKeySequence seq, QWidget* parent = null, Qt::WindowFlags f = 0);
- static bool staticDialog (KeySequenceConfig* cfg, QWidget* parent = null);
-
- QLabel* lb_output;
- QDialogButtonBox* bbx_buttons;
- QKeySequence seq;
-
-private:
- void updateOutput();
-
-private slots:
- virtual void keyPressEvent (QKeyEvent* ev) override;
+ QLabel* lb_output;
+ QDialogButtonBox* bbx_buttons;
+ QKeySequence seq;
+
+ private:
+ void updateOutput();
+
+ private slots:
+ virtual void keyPressEvent (QKeyEvent* ev) override;
};
-#endif // CONFIGDIALOG_H
\ No newline at end of file
+#endif // LDFORGE_CONFIGDIALOG_H