Diffstat (limited to 'noncore/settings/netsystemtime/ntpbase.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/netsystemtime/ntpbase.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/noncore/settings/netsystemtime/ntpbase.cpp b/noncore/settings/netsystemtime/ntpbase.cpp index 0a7a57e..878c158 100644 --- a/noncore/settings/netsystemtime/ntpbase.cpp +++ b/noncore/settings/netsystemtime/ntpbase.cpp @@ -1,54 +1,58 @@ /**************************************************************************** ** Form implementation generated from reading ui file 'ntpbase.ui' ** -** Created: Sun Nov 10 17:59:14 2002 +** Created: Sat Nov 16 15:49:54 2002 ** by: The User Interface Compiler (uic) ** ** WARNING! All changes made in this file will be lost! ****************************************************************************/ #include "ntpbase.h" #include <qcheckbox.h> #include <qcombobox.h> #include <qframe.h> #include <qlabel.h> #include <qmultilineedit.h> #include <qpushbutton.h> #include <qspinbox.h> #include <qtable.h> #include <qtabwidget.h> +#include <qwidget.h> #include <qlayout.h> #include <qvariant.h> #include <qtooltip.h> #include <qwhatsthis.h> /* * Constructs a NtpBase which is a child of 'parent', with the * name 'name' and widget flags set to 'f' + * + * The dialog will by default be modeless, unless you set 'modal' to + * TRUE to construct a modal dialog. */ -NtpBase::NtpBase( QWidget* parent, const char* name, WFlags fl ) - : QWidget( parent, name, fl ) +NtpBase::NtpBase( QWidget* parent, const char* name, bool modal, WFlags fl ) + : QDialog( parent, name, modal, fl ) { if ( !name ) setName( "NtpBase" ); resize( 317, 411 ); setCaption( tr( "Network Time" ) ); NtpBaseLayout = new QGridLayout( this ); NtpBaseLayout->setSpacing( 2 ); NtpBaseLayout->setMargin( 2 ); TabWidgetMain = new QTabWidget( this, "TabWidgetMain" ); tabMain = new QWidget( TabWidgetMain, "tabMain" ); tabMainLayout = new QGridLayout( tabMain ); tabMainLayout->setSpacing( 2 ); tabMainLayout->setMargin( 2 ); FrameSystemTime = new QFrame( tabMain, "FrameSystemTime" ); tabMainLayout->addWidget( FrameSystemTime, 0, 0 ); TabWidgetMain->insertTab( tabMain, tr( "Main" ) ); tabNtp = new QWidget( TabWidgetMain, "tabNtp" ); tabNtpLayout = new QGridLayout( tabNtp ); tabNtpLayout->setSpacing( 2 ); @@ -296,36 +300,36 @@ NtpBase::NtpBase( QWidget* parent, const char* name, WFlags fl ) PushButtonSetManualTime = new QPushButton( tabManualSetTime, "PushButtonSetManualTime" ); PushButtonSetManualTime->setText( tr( "Set time" ) ); tabManualSetTimeLayout->addWidget( PushButtonSetManualTime ); QSpacerItem* spacer_4 = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding ); tabManualSetTimeLayout->addItem( spacer_4 ); TabWidgetMain->insertTab( tabManualSetTime, tr( "Manual" ) ); NtpBaseLayout->addWidget( TabWidgetMain, 0, 0 ); } /* * Destroys the object and frees any allocated resources */ NtpBase::~NtpBase() { // no need to delete child widgets, Qt does it all for us } /* * Main event handler. Reimplemented to handle application * font changes */ bool NtpBase::event( QEvent* ev ) { - bool ret = QWidget::event( ev ); + bool ret = QDialog::event( ev ); if ( ev->type() == QEvent::ApplicationFontChange ) { QFont MultiLineEditntpOutPut_font( MultiLineEditntpOutPut->font() ); MultiLineEditntpOutPut_font.setPointSize( 7 ); MultiLineEditntpOutPut->setFont( MultiLineEditntpOutPut_font ); QFont TableLookups_font( TableLookups->font() ); TableLookups_font.setPointSize( 8 ); TableLookups->setFont( TableLookups_font ); } return ret; } |