source: trunk/examples/extension/mainform.ui.h@ 203

Last change on this file since 203 was 160, checked in by dmik, 19 years ago

Imported table and iconview modules and a bunch of dependent examples from the official release 3.3.1 from Trolltech.

  • Property svn:keywords set to Id
File size: 1.4 KB
Line 
1/****************************************************************************
2** ui.h extension file, included from the uic-generated form implementation.
3**
4** If you wish to add, delete or rename functions use Qt Designer which will
5** update this file, preserving your code. Create an init() function in place
6** of a constructor, and a destroy() function in place of a destructor.
7*****************************************************************************/
8#include "dialogform.h"
9#include "extension.h"
10#include <qapplication.h>
11#include <qcheckbox.h>
12#include <qlineedit.h>
13
14void MainForm::init()
15{
16 sessions = FALSE;
17 logging = FALSE;
18 log_filename = QString::null;
19 log_errors = TRUE;
20 log_actions = TRUE;
21}
22
23void MainForm::optionsDlg()
24{
25 DialogForm *dlg = new DialogForm( this, "dialog", TRUE );
26 Extension *ext = (Extension*)dlg->extension()->qt_cast( "Extension" );
27 if ( !ext )
28 return;
29 dlg->sessionsCheckBox->setChecked( sessions );
30 dlg->loggingCheckBox->setChecked( logging );
31 ext->logfileLineEdit->setText( log_filename );
32 ext->logErrorsCheckBox->setChecked( log_errors );
33
34 if ( dlg->exec() ) {
35 sessions = dlg->sessionsCheckBox->isChecked();
36 logging = dlg->loggingCheckBox->isChecked();
37 log_filename = ext->logfileLineEdit->text();
38 log_errors = ext->logErrorsCheckBox->isChecked();
39 }
40}
41
42
43void MainForm::quit()
44{
45 QApplication::exit( 0 );
46}
Note: See TracBrowser for help on using the repository browser.