src/configDialog.h

changeset 382
c1642530ea35
parent 367
3745caa5d87d
child 395
5210bcb1d7e0
--- a/src/configDialog.h	Mon Jul 15 14:43:29 2013 +0300
+++ b/src/configDialog.h	Mon Jul 15 19:30:16 2013 +0300
@@ -29,22 +29,12 @@
 // =============================================================================
 class ShortcutListItem : public QListWidgetItem
 {
+	PROPERTY (keyseqconfig*, keyConfig, setKeyConfig)
+	PROPERTY (QAction*, action, setAction)
+	
 public:
 	explicit ShortcutListItem( QListWidget* view = null, int type = Type ) :
 		QListWidgetItem( view, type ) {}
-	
-	actionmeta* getActionInfo() const
-	{
-		return m_info;
-	}
-	
-	void setActionInfo( actionmeta* info )
-	{
-		m_info = info;
-	}
-	
-private:
-	actionmeta* m_info;
 };
 
 // =============================================================================
@@ -53,11 +43,11 @@
 	Q_OBJECT
 	
 public:
-	ConfigDialog( ForgeWindow* parent );
+	ConfigDialog (ForgeWindow* parent);
 	virtual ~ConfigDialog();
 	static void staticDialog();
 	const Ui_ConfigUI* getUI() const;
-	float getGridValue( int i, int j ) const;
+	float getGridValue (int i, int j) const;
 	
 	vector<quickColor> quickColorMeta;
 	QDoubleSpinBox* dsb_gridData[3][4];
@@ -73,10 +63,11 @@
 	void initQuickColorTab();
 	void initGridTab();
 	void initExtProgTab();
+	void addShortcut (keyseqconfig& cfg, QAction* act, ulong& i);
 	void setButtonBackground( QPushButton* button, str value );
 	void pickColor( strconfig& cfg, QPushButton* button );
 	void updateQuickColorList( quickColor* sel = null );
-	void setShortcutText( QListWidgetItem* qItem, actionmeta meta );
+	void setShortcutText (ShortcutListItem* item);
 	int getItemRow( QListWidgetItem* item, vector<QListWidgetItem*>& haystack );
 	str makeColorToolBarString();
 	QListWidgetItem* getSelectedQuickColor();
@@ -105,7 +96,7 @@
 
 public:
 	explicit KeySequenceDialog( QKeySequence seq, QWidget* parent = null, Qt::WindowFlags f = 0 );
-	static bool staticDialog( actionmeta& meta, QWidget* parent = null );
+	static bool staticDialog( keyseqconfig* cfg, QWidget* parent = null );
 
 	QLabel* lb_output;
 	QDialogButtonBox* bbx_buttons;

mercurial