~ubuntu-branches/debian/experimental/smplayer/experimental

« back to all changes in this revision

Viewing changes to src/widgetactions.h

  • Committer: Bazaar Package Importer
  • Author(s): Maia Kozheva
  • Date: 2009-01-03 17:08:06 UTC
  • mfrom: (1.1.8 upstream)
  • Revision ID: james.westby@ubuntu.com-20090103170806-eodntb2slv6g2pb6
Tags: 0.6.6-0ubuntu1
* The "just before FF" release.
* New upstream release.
* debian/control: Bumped Standards-Version to 3.8.0.
* debian/copyright: Changed (C) to © to fix Lintian warning.

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
#include "config.h"
25
25
#include "guiconfig.h"
26
26
 
 
27
class QStyle;
 
28
 
27
29
class MyWidgetAction : public QWidgetAction
28
30
{
29
31
        Q_OBJECT
32
34
        MyWidgetAction( QWidget * parent );
33
35
        ~MyWidgetAction();
34
36
 
 
37
        void setCustomStyle(QStyle * style) { custom_style = style; };
 
38
        QStyle * customStyle() { return custom_style; };
 
39
 
 
40
        void setStyleSheet(QString style) { custom_stylesheet = style; };
 
41
        QString styleSheet() { return custom_stylesheet; };
 
42
 
35
43
public slots:
36
44
        virtual void enable();  // setEnabled in QAction is not virtual :(
37
45
        virtual void disable();
38
46
 
39
47
protected:
40
48
        virtual void propagate_enabled(bool);
 
49
 
 
50
protected:
 
51
        QStyle * custom_style;
 
52
        QString custom_stylesheet;
41
53
};
42
54
 
 
55
 
43
56
class TimeSliderAction : public MyWidgetAction 
44
57
{
45
58
        Q_OBJECT
79
92
        VolumeSliderAction( QWidget * parent );
80
93
        ~VolumeSliderAction();
81
94
 
 
95
        void setFixedSize(QSize size) { fixed_size = size; };
 
96
        QSize fixedSize() { return fixed_size; };
 
97
 
 
98
        void setTickPosition(QSlider::TickPosition position);
 
99
        QSlider::TickPosition tickPosition() { return tick_position; };
 
100
 
82
101
public slots:
83
102
        virtual void setValue(int);
84
103
        virtual int value();
88
107
 
89
108
protected:
90
109
        virtual QWidget * createWidget ( QWidget * parent );
 
110
 
 
111
private:
 
112
        QSize fixed_size;
 
113
        QSlider::TickPosition tick_position;
 
114
};
 
115
 
 
116
 
 
117
class TimeLabelAction : public MyWidgetAction 
 
118
{
 
119
        Q_OBJECT
 
120
 
 
121
public:
 
122
        TimeLabelAction( QWidget * parent );
 
123
        ~TimeLabelAction();
 
124
 
 
125
        virtual QString text() { return _text; };
 
126
 
 
127
public slots:
 
128
        virtual void setText(QString s);
 
129
 
 
130
signals:
 
131
        void newText(QString s);
 
132
 
 
133
protected:
 
134
        virtual QWidget * createWidget ( QWidget * parent );
 
135
 
 
136
private:
 
137
        QString _text;
91
138
};
92
139
 
93
140