equal
deleted
inserted
replaced
20 |
20 |
21 |
21 |
22 #include <QObject> |
22 #include <QObject> |
23 #include <QByteArray> |
23 #include <QByteArray> |
24 #include <QString> |
24 #include <QString> |
|
25 #include <QSpinBox> |
25 |
26 |
26 class Hash : public QObject |
27 class Hash : public QObject |
27 { |
28 { |
28 Q_OBJECT |
29 Q_OBJECT |
29 |
30 |
30 public: |
31 public: |
31 Hash(); |
32 Hash(); |
32 static QString md5(QByteArray buf); |
33 static QString md5(QByteArray buf); |
33 }; |
34 }; |
34 |
35 |
|
36 class FreqSpinBox : public QSpinBox |
|
37 { |
|
38 Q_OBJECT |
|
39 |
|
40 public: |
|
41 FreqSpinBox(QWidget* parent) : QSpinBox(parent) |
|
42 { |
|
43 |
|
44 } |
|
45 |
|
46 QString textFromValue ( int value ) const |
|
47 { |
|
48 switch (value) |
|
49 { |
|
50 case 0 : return tr("Never"); |
|
51 case 1 : return tr("Every turn"); |
|
52 default : return tr("Each %1 turn").arg(value); |
|
53 } |
|
54 } |
|
55 }; |
|
56 |
|
57 |
35 #endif // _MISC_H |
58 #endif // _MISC_H |