summaryrefslogtreecommitdiff
authormickeyl <mickeyl>2004-04-06 10:00:16 (UTC)
committer mickeyl <mickeyl>2004-04-06 10:00:16 (UTC)
commitdde22f9a9bfcb4c6bcb6c7c6d07fdabb16b399cc (patch) (side-by-side diff)
tree99706abcf20ecc0c08cb50c2384ec3e2e6530f38
parent1b7592f11a2499c3e7d6652dde1ee15fb661fce2 (diff)
downloadopie-dde22f9a9bfcb4c6bcb6c7c6d07fdabb16b399cc.zip
opie-dde22f9a9bfcb4c6bcb6c7c6d07fdabb16b399cc.tar.gz
opie-dde22f9a9bfcb4c6bcb6c7c6d07fdabb16b399cc.tar.bz2
use include "" inside .cpp to play nice with external build systems
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--libopie2/opieui/otimepicker.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/libopie2/opieui/otimepicker.cpp b/libopie2/opieui/otimepicker.cpp
index 7de0fd3..d741c7e 100644
--- a/libopie2/opieui/otimepicker.cpp
+++ b/libopie2/opieui/otimepicker.cpp
@@ -1,127 +1,127 @@
/*
This file is part of the Opie Project
Copyright (C) Stefan Eilers <eilers.stefan@epost.de>
=. Copyright (C) The Opie Team <opie-devel@handhelds.org>
.=l.
           .>+-=
 _;:,     .>    :=|. This program is free software; you can
.> <`_,   >  .   <= redistribute it and/or modify it under
:`=1 )Y*s>-.--   : the terms of the GNU Library General Public
.="- .-=="i,     .._ License as published by the Free Software
 - .   .-<_>     .<> Foundation; either version 2 of the License,
     ._= =}       : or (at your option) any later version.
    .%`+i>       _;_.
    .i_,=:_.      -<s. This program is distributed in the hope that
     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
    : ..    .:,     . . . without even the implied warranty of
    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A
  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU
..}^=.=       =       ; Library General Public License for more
++=   -.     .`     .: details.
 :     =  ...= . :.=-
 -.   .:....=;==+<; You should have received a copy of the GNU
  -_. . .   )=.  = Library General Public License along with
    --        :-=` this library; see the file COPYING.LIB.
If not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
*/
/* OPIE */
-#include <opie2/otimepicker.h>
+#include "otimepicker.h"
/* QT */
#include <qgroupbox.h>
#include <qlayout.h>
#include <qlineedit.h>
namespace Opie {
namespace Ui {
/**
* Constructs the widget
* @param parent The parent of the OTimePicker
* @param name The name of the object
* @param fl Window Flags
*/
OTimePicker::OTimePicker(QWidget* parent, const char* name, Qt::WFlags fl)
:QWidget(parent,name,fl)
{
QVBoxLayout *vbox=new QVBoxLayout(this);
OClickableLabel *r;
QString s;
// Hour Row
QWidget *row=new QWidget(this);
QHBoxLayout *l=new QHBoxLayout(row);
vbox->addWidget(row);
for (int i=0; i<24; i++)
{
r=new OClickableLabel(row);
hourLst.append(r);
s.sprintf("%.2d",i);
r->setText(s);
r->setToggleButton(true);
r->setAlignment(AlignHCenter | AlignVCenter);
l->addWidget(r);
connect(r, SIGNAL(toggled(bool)),
this, SLOT(slotHour(bool)));
if (i==11)
{ // Second row
row=new QWidget(this);
l=new QHBoxLayout(row);
vbox->addWidget(row);
}
}
// Minute Row
row=new QWidget(this);
l=new QHBoxLayout(row);
vbox->addWidget(row);
for (int i=0; i<60; i+=5)
{
r=new OClickableLabel(row);
minuteLst.append(r);
s.sprintf("%.2d",i);
r->setText(s);
r->setToggleButton(true);
r->setAlignment(AlignHCenter | AlignVCenter);
l->addWidget(r);
connect(r, SIGNAL(toggled(bool)),
this, SLOT(slotMinute(bool)));
}
}
/**
* This method return the current time
* @return the time
*/
QTime OTimePicker::time()const
{
return tm;
}
void OTimePicker::slotHour(bool b)
{
OClickableLabel *r = (OClickableLabel *) sender();
if (b)
{
QValueListIterator<OClickableLabel *> it;
for (it=hourLst.begin(); it!=hourLst.end(); it++)
{
if (*it != r) (*it)->setOn(false);
else tm.setHMS((*it)->text().toInt(), tm.minute(), 0);
}
emit timeChanged(tm);
}
else
{
r->setOn(true);