summaryrefslogtreecommitdiff
path: root/library/tzselect.cpp
Side-by-side diff
Diffstat (limited to 'library/tzselect.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--library/tzselect.cpp4
1 files changed, 0 insertions, 4 deletions
diff --git a/library/tzselect.cpp b/library/tzselect.cpp
index 9436867..2e5a433 100644
--- a/library/tzselect.cpp
+++ b/library/tzselect.cpp
@@ -7,95 +7,91 @@
** GNU General Public License version 2 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file.
**
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
**
** See http://www.trolltech.com/gpl/ for GPL licensing information.
**
** Contact info@trolltech.com if any conditions of this licensing are
** not clear to you.
**
**********************************************************************/
#define QTOPIA_INTERNAL_TZSELECT_INC_LOCAL
#include "tzselect.h"
#include "resource.h"
#include "global.h"
#include "config.h"
#include <qtoolbutton.h>
#include <qfile.h>
#include <stdlib.h>
-#ifdef Q_WS_QWS
#include <qcopchannel_qws.h>
-#endif
class TimeZoneSelectorPrivate
{
public:
TimeZoneSelectorPrivate() : includeLocal(FALSE) {}
bool includeLocal;
};
TZCombo::TZCombo( QWidget *p, const char* n )
: QComboBox( p, n )
{
updateZones();
// check to see if TZ is set, if it is set the current item to that
QString tz = getenv("TZ");
if (parent()->inherits("TimeZoneSelector")) {
if ( ((TimeZoneSelector *)parent())->localIncluded() ) {
// overide to the 'local' type.
tz = "None";
}
}
if ( !tz.isNull() ) {
int n = 0,
index = 0;
for ( QStringList::Iterator it=identifiers.begin();
it!=identifiers.end(); ++it) {
if ( *it == tz )
index = n;
n++;
}
setCurrentItem(index);
} else {
setCurrentItem(0);
}
// listen on QPE/System
-#if defined(Q_WS_QWS)
#if !defined(QT_NO_COP)
QCopChannel *channel = new QCopChannel( "QPE/System", this );
connect( channel, SIGNAL(received(const QCString&, const QByteArray&)),
this, SLOT(handleSystemChannel(const QCString&, const QByteArray&)) );
#endif
-#endif
}
TZCombo::~TZCombo()
{
}
void TZCombo::updateZones()
{
QString cur = currentText();
clear();
identifiers.clear();
int curix=0;
QString tz = getenv("TZ");
bool tzFound = FALSE;
Config cfg("CityTime");
cfg.setGroup("TimeZones");
int listIndex = 0;
if (parent()->inherits("TimeZoneSelector")) {
if ( ((TimeZoneSelector *)parent())->localIncluded() ) {
// overide to the 'local' type.
identifiers.append( "None" );
insertItem( tr("None") );