summaryrefslogtreecommitdiff
path: root/library/tzselect.h
Unidiff
Diffstat (limited to 'library/tzselect.h') (more/less context) (ignore whitespace changes)
-rw-r--r--library/tzselect.h79
1 files changed, 79 insertions, 0 deletions
diff --git a/library/tzselect.h b/library/tzselect.h
new file mode 100644
index 0000000..9898d84
--- a/dev/null
+++ b/library/tzselect.h
@@ -0,0 +1,79 @@
1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved.
3**
4** This file is part of Qtopia Environment.
5**
6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file.
10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15**
16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you.
18**
19**********************************************************************/
20#ifndef TZSELECT_H
21#define TZSELECT_H
22
23#include <qhbox.h>
24#include <qcombobox.h>
25#include <qstringlist.h>
26
27class QToolButton;
28
29// a function to load defaults in case there is no file
30QStringList timezoneDefaults( void );
31
32class TZCombo : public QComboBox
33{
34 Q_OBJECT
35public:
36 TZCombo( QWidget* parent, const char* name = 0 );
37 ~TZCombo();
38
39 QString currZone() const;
40 void setCurrZone( const QString& id );
41
42protected:
43 void keyPressEvent( QKeyEvent *e );
44 void mousePressEvent(QMouseEvent*e);
45 void updateZones();
46
47private slots:
48 void handleSystemChannel(const QCString&, const QByteArray&);
49
50private:
51 QStringList identifiers;
52 QStringList extras;
53};
54
55class TimeZoneSelectorPrivate;
56class TimeZoneSelector : public QHBox
57{
58 Q_OBJECT
59public:
60 TimeZoneSelector( QWidget* parent = 0, const char* name=0 );
61 ~TimeZoneSelector();
62
63 QString currentZone() const;
64 void setCurrentZone( const QString& id );
65
66signals:
67 void signalNewTz( const QString& id );
68
69private slots:
70 void slotTzActive( int index );
71 void slotExecute( void );
72
73private:
74 TZCombo *cmbTz;
75 QToolButton *cmdTz;
76 TimeZoneSelectorPrivate *d;
77};
78
79#endif