Ignore:
Timestamp:
Mar 29, 2012, 4:53:15 PM (13 years ago)
Author:
Silvan Scherrer
Message:

SMPlayer: trunk update to latest svn

Location:
smplayer/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • smplayer/trunk

  • smplayer/trunk/src/toolbareditor.h

    r124 r128  
    2424#include <QList>
    2525#include <QAction>
     26#include "ui_toolbareditor.h"
    2627
    27 class ToolbarEditor
     28class QListWidget;
     29
     30class ToolbarEditor : public QDialog, public Ui::ToolbarEditor
    2831{
     32        Q_OBJECT
     33
    2934public:
     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; }
    3046
    3147        //! Save the widget's list of actions into a QStringList
    3248        static QStringList save(QWidget *w);
    3349
    34         //! Added to the widget the actions specified in l. actions_list is
     50        //! Add to the widget the actions specified in l. actions_list is
    3551        //! the list of all available actions
    3652        static void load(QWidget *w, QStringList l, QList<QAction *> actions_list);
    3753
     54protected 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
    3864protected:
    3965        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;
    4074};
    4175
Note: See TracChangeset for help on using the changeset viewer.