Changeset 128 for smplayer/trunk/src/toolbareditor.h
- Timestamp:
- Mar 29, 2012, 4:53:15 PM (13 years ago)
- Location:
- smplayer/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
smplayer/trunk
- Property svn:mergeinfo changed
/smplayer/vendor/current merged: 127
- Property svn:mergeinfo changed
-
smplayer/trunk/src/toolbareditor.h
r124 r128 24 24 #include <QList> 25 25 #include <QAction> 26 #include "ui_toolbareditor.h" 26 27 27 class ToolbarEditor 28 class QListWidget; 29 30 class ToolbarEditor : public QDialog, public Ui::ToolbarEditor 28 31 { 32 Q_OBJECT 33 29 34 public: 35 36 ToolbarEditor( QWidget* parent = 0, Qt::WindowFlags f = 0 ); 37 ~ToolbarEditor(); 38 39 void setAllActions(QList<QAction *> actions_list); 40 void setActiveActions(QList<QAction *> actions_list); 41 42 QStringList activeActionsToStringList(); 43 44 void setDefaultActions(QStringList action_names) { default_actions = action_names; } 45 QStringList defaultActions() { return default_actions; } 30 46 31 47 //! Save the widget's list of actions into a QStringList 32 48 static QStringList save(QWidget *w); 33 49 34 //! Add edto the widget the actions specified in l. actions_list is50 //! Add to the widget the actions specified in l. actions_list is 35 51 //! the list of all available actions 36 52 static void load(QWidget *w, QStringList l, QList<QAction *> actions_list); 37 53 54 protected slots: 55 void on_up_button_clicked(); 56 void on_down_button_clicked(); 57 void on_right_button_clicked(); 58 void on_left_button_clicked(); 59 void on_separator_button_clicked(); 60 void restoreDefaults(); 61 void checkRowsAllList(int currentRow); 62 void checkRowsActiveList(int currentRow); 63 38 64 protected: 39 65 static QAction * findAction(QString s, QList<QAction *> actions_list); 66 67 static void populateList(QListWidget * w, QList<QAction *> actions_list, bool add_separators = false); 68 static int findItem(const QString & action_name, QListWidget * w); 69 70 static QString fixname(const QString & name, const QString & action_name); 71 72 QList<QAction *> all_actions_copy; 73 QStringList default_actions; 40 74 }; 41 75
Note:
See TracChangeset
for help on using the changeset viewer.