zz_configDialog.h

changeset 100
e40358266290
parent 88
652028158792
child 104
6e29bb0e83c5
--- a/zz_configDialog.h	Thu Apr 11 17:15:01 2013 +0300
+++ b/zz_configDialog.h	Fri Apr 12 00:28:17 2013 +0300
@@ -30,7 +30,7 @@
 	
 public:
 	QTabWidget* qTabs;
-	QWidget* qMainTab, *qShortcutsTab;
+	QWidget* qMainTab, *qShortcutsTab, *qQuickColorTab;
 	
 	// =========================================================================
 	// Main tab widgets
@@ -49,29 +49,49 @@
 	QPushButton* qSetShortcut, *qResetShortcut, *qClearShortcut;
 	std::vector<QListWidgetItem*> qaShortcutItems;
 	
+	// =========================================================================
+	// Quick color toolbar tab
+	QListWidget* qQuickColorList;
+	QPushButton* qAddColor, *qDelColor, *qChangeColor, *qAddColorSeparator,
+		*qMoveColorUp, *qMoveColorDown, *qClearColors;
+	std::vector<QListWidgetItem*> qaQuickColorItems;
+	std::vector<quickColorMetaEntry> quickColorMeta;
+	
+	// =========================================================================
 	QDialogButtonBox* qButtons;
 	
 	ConfigDialog (ForgeWindow* parent);
 	~ConfigDialog ();
-	static void staticDialog (ForgeWindow* window);
+	static void staticDialog ();
 	
 private:
 	void initMainTab ();
 	void initShortcutsTab ();
+	void initQuickColorTab ();
 	
 	void makeSlider (QSlider*& qSlider, short int dMin, short int dMax, short int dDefault);
 	void setButtonBackground (QPushButton* qButton, str zValue);
 	void pickColor (strconfig& cfg, QPushButton* qButton);
+	void updateQuickColorList (quickColorMetaEntry* pSel = nullptr);
 	void setShortcutText (QListWidgetItem* qItem, actionmeta meta);
-	long getItemRow (QListWidgetItem* qItem);
+	long getItemRow (QListWidgetItem* qItem, std::vector<QListWidgetItem*>& haystack);
+	str makeColorToolBarString ();
+	QListWidgetItem* getSelectedQuickColor ();
 	
 private slots:
 	void slot_findLDrawPath ();
 	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 ();
 };
 
 // =============================================================================

mercurial