libopie API Documentation

otimepickerbase.cpp

00001 /****************************************************************************
00002 ** Form implementation generated from reading ui file 'otimepickerbase.ui'
00003 **
00004 ** Created: Sun Jan 11 13:40:23 2004
00005 **      by:  The User Interface Compiler (uic)
00006 **
00007 ** WARNING! All changes made in this file will be lost!
00008 ****************************************************************************/
00009 #include "otimepickerbase.h"
00010 
00011 #include <qframe.h>
00012 #include <qgroupbox.h>
00013 #include <qlabel.h>
00014 #include <qlineedit.h>
00015 #include <qpushbutton.h>
00016 #include "otimepicker.h"
00017 #include <qlayout.h>
00018 #include <qvariant.h>
00019 #include <qtooltip.h>
00020 #include <qwhatsthis.h>
00021 
00022 /* 
00023  *  Constructs a OTimePickerDialogBase which is a child of 'parent', with the 
00024  *  name 'name' and widget flags set to 'f' 
00025  *
00026  *  The dialog will by default be modeless, unless you set 'modal' to
00027  *  TRUE to construct a modal dialog.
00028  */
00029 OTimePickerDialogBase::OTimePickerDialogBase( QWidget* parent,  const char* name, bool modal, WFlags fl )
00030     : QDialog( parent, name, modal, fl )
00031 {
00032     if ( !name )
00033     setName( "OTimePickerDialogBase" );
00034     resize( 210, 137 ); 
00035     setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)1, sizePolicy().hasHeightForWidth() ) );
00036     setCaption( tr( "OTimePickerDialogBase" ) );
00037     OTimePickerDialogBaseLayout = new QVBoxLayout( this ); 
00038     OTimePickerDialogBaseLayout->setSpacing( 4 );
00039     OTimePickerDialogBaseLayout->setMargin( 5 );
00040 
00041     Frame10 = new QFrame( this, "Frame10" );
00042     Frame10->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)7, Frame10->sizePolicy().hasHeightForWidth() ) );
00043     Frame10->setFrameShape( QFrame::NoFrame );
00044     Frame10->setFrameShadow( QFrame::Raised );
00045     Frame10Layout = new QHBoxLayout( Frame10 ); 
00046     Frame10Layout->setSpacing( 6 );
00047     Frame10Layout->setMargin( 2 );
00048     QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::MinimumExpanding, QSizePolicy::Minimum );
00049     Frame10Layout->addItem( spacer );
00050 
00051     Frame4 = new QFrame( Frame10, "Frame4" );
00052     Frame4->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)4, (QSizePolicy::SizeType)4, Frame4->sizePolicy().hasHeightForWidth() ) );
00053     Frame4->setFrameShape( QFrame::Box );
00054     Frame4->setFrameShadow( QFrame::Sunken );
00055     Frame4Layout = new QHBoxLayout( Frame4 ); 
00056     Frame4Layout->setSpacing( 6 );
00057     Frame4Layout->setMargin( 4 );
00058 
00059     TextLabel1 = new QLabel( Frame4, "TextLabel1" );
00060     TextLabel1->setText( tr( "Time:" ) );
00061     Frame4Layout->addWidget( TextLabel1 );
00062 
00063     hourField = new QLineEdit( Frame4, "hourField" );
00064     hourField->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)4, (QSizePolicy::SizeType)0, hourField->sizePolicy().hasHeightForWidth() ) );
00065     hourField->setAlignment( int( QLineEdit::AlignHCenter ) );
00066     Frame4Layout->addWidget( hourField );
00067 
00068     TextLabel1_2 = new QLabel( Frame4, "TextLabel1_2" );
00069     QFont TextLabel1_2_font(  TextLabel1_2->font() );
00070     TextLabel1_2_font.setBold( TRUE );
00071     TextLabel1_2->setFont( TextLabel1_2_font ); 
00072     TextLabel1_2->setText( tr( ":" ) );
00073     Frame4Layout->addWidget( TextLabel1_2 );
00074 
00075     minuteField = new QLineEdit( Frame4, "minuteField" );
00076     minuteField->setAlignment( int( QLineEdit::AlignHCenter ) );
00077     Frame4Layout->addWidget( minuteField );
00078     Frame10Layout->addWidget( Frame4 );
00079     QSpacerItem* spacer_2 = new QSpacerItem( 20, 20, QSizePolicy::MinimumExpanding, QSizePolicy::Minimum );
00080     Frame10Layout->addItem( spacer_2 );
00081     OTimePickerDialogBaseLayout->addWidget( Frame10 );
00082 
00083     GroupBox1 = new QGroupBox( this, "GroupBox1" );
00084     GroupBox1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)3, GroupBox1->sizePolicy().hasHeightForWidth() ) );
00085     GroupBox1->setMargin( 0 );
00086     GroupBox1->setTitle( tr( "Pick Time:" ) );
00087     GroupBox1->setColumnLayout(0, Qt::Vertical );
00088     GroupBox1->layout()->setSpacing( 0 );
00089     GroupBox1->layout()->setMargin( 0 );
00090     GroupBox1Layout = new QGridLayout( GroupBox1->layout() );
00091     GroupBox1Layout->setAlignment( Qt::AlignTop );
00092     GroupBox1Layout->setSpacing( 6 );
00093     GroupBox1Layout->setMargin( 11 );
00094 
00095     m_timePicker = new OTimePicker( GroupBox1, "m_timePicker" );
00096     m_timePicker->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)3, m_timePicker->sizePolicy().hasHeightForWidth() ) );
00097 
00098     GroupBox1Layout->addWidget( m_timePicker, 0, 0 );
00099     OTimePickerDialogBaseLayout->addWidget( GroupBox1 );
00100 }
00101 
00102 /*  
00103  *  Destroys the object and frees any allocated resources
00104  */
00105 OTimePickerDialogBase::~OTimePickerDialogBase()
00106 {
00107     // no need to delete child widgets, Qt does it all for us
00108 }
00109 
00110 /*  
00111  *  Main event handler. Reimplemented to handle application
00112  *  font changes
00113  */
00114 bool OTimePickerDialogBase::event( QEvent* ev )
00115 {
00116     bool ret = QDialog::event( ev ); 
00117     if ( ev->type() == QEvent::ApplicationFontChange ) {
00118     QFont TextLabel1_2_font(  TextLabel1_2->font() );
00119     TextLabel1_2_font.setBold( TRUE );
00120     TextLabel1_2->setFont( TextLabel1_2_font ); 
00121     }
00122     return ret;
00123 }
00124 
KDE Logo
This file is part of the documentation for OPIE Version 1.1.
Documentation copyright © 1997-2003 the KDE developers. 2003 OPIE developers
Generated on Tue Feb 10 20:24:45 2004 by doxygen 1.3.5 written by Dimitri van Heesch, © 1997-2001