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.cpp32
1 files changed, 29 insertions, 3 deletions
diff --git a/library/tzselect.cpp b/library/tzselect.cpp
index 335037e..4343eab 100644
--- a/library/tzselect.cpp
+++ b/library/tzselect.cpp
@@ -31,8 +31,16 @@
#include <qcopchannel_qws.h>
#include <qpe/qpeapplication.h>
#include <qmessagebox.h>
+/*!
+ \class TimeZoneSelector
+
+ \brief The TimeZoneSelector widget allows users to configure their time zone information.
+
+ \ingroup qtopiaemb
+*/
+
class TimeZoneSelectorPrivate
{
public:
TimeZoneSelectorPrivate() : includeLocal(FALSE) {}
@@ -192,8 +200,12 @@ void TZCombo::handleSystemChannel(const QCString&msg, const QByteArray&)
updateZones();
}
}
+/*!
+ Creates a new TimeZoneSelector with parent \a p and name \a n. The combobox will be
+ populated with the available timezones.
+*/
TimeZoneSelector::TimeZoneSelector(QWidget* p, const char* n) :
QHBox(p,n)
{
@@ -212,8 +224,11 @@ TimeZoneSelector::TimeZoneSelector(QWidget* p, const char* n) :
QObject::connect( cmdTz, SIGNAL( clicked() ),
this, SLOT( slotExecute() ) );
}
+/*!
+ Destroys a TimeZoneSelector.
+*/
TimeZoneSelector::~TimeZoneSelector()
{
}
@@ -227,27 +242,38 @@ bool TimeZoneSelector::localIncluded() const
{
return d->includeLocal;
}
-
+/*!
+ Returns the currently selected timezone as a string in location format, e.g.
+ \code Australia/Brisbane \endcode
+*/
QString TimeZoneSelector::currentZone() const
{
return cmbTz->currZone();
}
+/*!
+ Sets the current timezone to \a id.
+*/
void TimeZoneSelector::setCurrentZone( const QString& id )
{
cmbTz->setCurrZone( id );
}
+/*! \fn void TimeZoneSelector::signalNewTz( const QString& id )
+ This signal is emitted when a timezone has been selected by the user. The id
+ is a \l QString in location format, eg \code Australia/Brisbane \endcode
+*/
+
void TimeZoneSelector::slotTzActive( int )
{
emit signalNewTz( cmbTz->currZone() );
}
void TimeZoneSelector::slotExecute( void )
{
- // execute the world time application...
+ // execute the world time application...
if (QFile::exists(QPEApplication::qpeDir()+"bin/citytime"))
Global::execute( "citytime" );
else
QMessageBox::warning(this,tr("citytime executable not found"),
@@ -269,9 +295,9 @@ QStringList timezoneDefaults( void )
tzs.append( "Asia/Tokyo" );
tzs.append( "Tokyo" );
tzs.append( "America/Denver" );
tzs.append( "Denver" );
-
+
return tzs;
}