Qtopia library API Documentation

tzselect.h

00001 /**********************************************************************
00002 ** Copyright (C) 2000-2002 Trolltech AS.  All rights reserved.
00003 **
00004 ** This file is part of the Qtopia Environment.
00005 **
00006 ** This file may be distributed and/or modified under the terms of the
00007 ** GNU General Public License version 2 as published by the Free Software
00008 ** Foundation and appearing in the file LICENSE.GPL included in the
00009 ** packaging of this file.
00010 **
00011 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
00012 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
00013 **
00014 ** See http://www.trolltech.com/gpl/ for GPL licensing information.
00015 **
00016 ** Contact info@trolltech.com if any conditions of this licensing are
00017 ** not clear to you.
00018 **
00019 **********************************************************************/
00020 #ifndef TZSELECT_H
00021 #define TZSELECT_H
00022 
00023 #include <qhbox.h>
00024 #include <qcombobox.h>
00025 #include <qstringlist.h>
00026 
00027 class QToolButton;
00028 class TimeZoneSelector;
00029 
00030 // a function to load defaults in case there is no file
00031 QStringList timezoneDefaults( void );
00032 
00033 class TZCombo : public QComboBox
00034 {
00035     Q_OBJECT
00036 public:
00037     TZCombo( QWidget* parent, const char* name = 0 );
00038     ~TZCombo();
00039 
00040     QString currZone() const;
00041     void setCurrZone( const QString& id );
00042 
00043 protected:
00044     friend class TimeZoneSelector;
00045     void keyPressEvent( QKeyEvent *e );
00046     void mousePressEvent(QMouseEvent*e);
00047     void updateZones();
00048 
00049 private slots:
00050     void handleSystemChannel(const QCString&, const QByteArray&);
00051 
00052 private:
00053     QStringList identifiers;
00054     QStringList extras;
00055 };
00056 
00057 class TimeZoneSelectorPrivate;
00058 class TimeZoneSelector : public QHBox
00059 {
00060     Q_OBJECT
00061 public:
00062     TimeZoneSelector( QWidget* parent = 0, const char* name=0 );
00063     ~TimeZoneSelector();
00064 
00065 #ifdef QTOPIA_INTERNAL_TZSELECT_INC_LOCAL
00066     // badly named.. not to be used outside of qtopia (not forward compatable)
00067     // basically allows the "No Timezone" or "None" option.
00068     void setLocalIncluded(bool);
00069     bool localIncluded() const;
00070 #endif
00071 
00072     
00073     QString currentZone() const;
00074     void setCurrentZone( const QString& id );
00075 
00076 signals:
00077     void signalNewTz( const QString& id );
00078 
00079 private slots:
00080     void slotTzActive( int index );
00081     void slotExecute( void );
00082 
00083 private:
00084     TZCombo *cmbTz;
00085     QToolButton *cmdTz;
00086     TimeZoneSelectorPrivate *d;
00087 };
00088 
00089 #endif
KDE Logo
This file is part of the documentation for OPIE Version 1.5.5.
Documentation copyright © 1997-2003 the KDE developers. 2003 OPIE developers
Generated on Tue Feb 10 20:24:08 2004 by doxygen 1.3.5 written by Dimitri van Heesch, © 1997-2001