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