summaryrefslogtreecommitdiff
path: root/libopie2/opieui/otimepicker.cpp
Side-by-side diff
Diffstat (limited to 'libopie2/opieui/otimepicker.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opieui/otimepicker.cpp15
1 files changed, 12 insertions, 3 deletions
diff --git a/libopie2/opieui/otimepicker.cpp b/libopie2/opieui/otimepicker.cpp
index 66f9ce0..7de0fd3 100644
--- a/libopie2/opieui/otimepicker.cpp
+++ b/libopie2/opieui/otimepicker.cpp
@@ -18,32 +18,36 @@
  _.=:.       :    :=>`: 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>
+
/* QT */
+#include <qgroupbox.h>
#include <qlayout.h>
#include <qlineedit.h>
-/* OPIE */
-#include <opie2/otimepicker.h>
-using namespace Opie;
+
+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);
@@ -211,24 +215,26 @@ void OTimePicker::setHour(int h)
/**
* This is a modal Dialog.
*
* @param parent The parent widget
* @param name The name of the object
* @param fl Possible window flags
*/
OTimePickerDialog::OTimePickerDialog ( QWidget* parent, const char* name, WFlags fl )
: OTimePickerDialogBase (parent , name, true , fl)
{
+ m_timePicker = new OTimePicker( GroupBox1, "m_timePicker" );
+ GroupBox1Layout->addWidget( m_timePicker, 0, 0 );
connect ( m_timePicker, SIGNAL( timeChanged(const QTime&) ),
this, SLOT( setTime(const QTime&) ) );
connect ( minuteField, SIGNAL( textChanged(const QString&) ),
this, SLOT ( setMinute(const QString&) ) );
connect ( hourField, SIGNAL( textChanged(const QString&) ),
this, SLOT ( setHour(const QString&) ) );
}
/**
* @return the time
@@ -281,12 +287,15 @@ void OTimePickerDialog::setHour ( const QString& hour )
* Method to set a new minute. It tries to convert the string to int and
* if the resulting date is valid a new date is set.
* @see setHour
*/
void OTimePickerDialog::setMinute ( const QString& minute )
{
if ( QTime::isValid ( m_time.hour(), minute.toInt(), 00 ) )
{
m_time.setHMS ( m_time.hour(), minute.toInt(), 00 );
setTime ( m_time );
}
}
+
+}
+}