Diffstat (limited to 'pwmanager/pwmanager/configwnd.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | pwmanager/pwmanager/configwnd.cpp | 264 |
1 files changed, 264 insertions, 0 deletions
diff --git a/pwmanager/pwmanager/configwnd.cpp b/pwmanager/pwmanager/configwnd.cpp new file mode 100644 index 0000000..230ca1b --- a/dev/null +++ b/pwmanager/pwmanager/configwnd.cpp @@ -0,0 +1,264 @@ +/**************************************************************************** +** Form implementation generated from reading ui file 'configwnd.ui' +** +** Created: Tue Sep 14 15:20:58 2004 +** by: The User Interface Compiler ($Id$) +** +** WARNING! All changes made in this file will be lost! +****************************************************************************/ + +#include "configwnd.h" + +#include <qvariant.h> +#include <qpushbutton.h> +#include <qtabwidget.h> +#include <qwidget.h> +#include <qcombobox.h> +#include <qlabel.h> +#include <qlineedit.h> +#include <qcheckbox.h> +#include <qspinbox.h> +#include <qlayout.h> +#include <qtooltip.h> +#include <qwhatsthis.h> + +/* + * Constructs a configWnd as 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. + */ +configWnd::configWnd( QWidget* parent, const char* name, bool modal, WFlags fl ) + : QDialog( parent, name, modal, fl ) +{ + if ( !name ) + setName( "configWnd" ); + + okButton = new QPushButton( this, "okButton" ); + okButton->setGeometry( QRect( 10, 280, 107, 27 ) ); + + cancelButton = new QPushButton( this, "cancelButton" ); + cancelButton->setGeometry( QRect( 370, 280, 107, 27 ) ); + + tabWidget2 = new QTabWidget( this, "tabWidget2" ); + tabWidget2->setGeometry( QRect( 10, 10, 470, 260 ) ); + + tab = new QWidget( tabWidget2, "tab" ); + + windowStyleComboBox = new QComboBox( FALSE, tab, "windowStyleComboBox" ); + windowStyleComboBox->setGeometry( QRect( 220, 180, 210, 28 ) ); + + textLabel1_5 = new QLabel( tab, "textLabel1_5" ); + textLabel1_5->setGeometry( QRect( 30, 180, 180, 20 ) ); + textLabel1_5->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) ); + + textLabel1_4 = new QLabel( tab, "textLabel1_4" ); + textLabel1_4->setGeometry( QRect( 30, 40, 400, 20 ) ); + + selEntrFontButton = new QPushButton( tab, "selEntrFontButton" ); + selEntrFontButton->setGeometry( QRect( 30, 90, 160, 27 ) ); + + currEntrFont = new QLabel( tab, "currEntrFont" ); + currEntrFont->setGeometry( QRect( 30, 70, 230, 20 ) ); + tabWidget2->insertTab( tab, QString("") ); + + TabPage = new QWidget( tabWidget2, "TabPage" ); + + compressionComboBox = new QComboBox( FALSE, TabPage, "compressionComboBox" ); + compressionComboBox->setGeometry( QRect( 290, 50, 150, 28 ) ); + + textLabel1_6 = new QLabel( TabPage, "textLabel1_6" ); + textLabel1_6->setGeometry( QRect( 10, 50, 270, 20 ) ); + textLabel1_6->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) ); + + textLabel1_8 = new QLabel( TabPage, "textLabel1_8" ); + textLabel1_8->setGeometry( QRect( 10, 90, 270, 20 ) ); + textLabel1_8->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) ); + + permissionLineEdit = new QLineEdit( TabPage, "permissionLineEdit" ); + permissionLineEdit->setGeometry( QRect( 290, 90, 142, 27 ) ); + permissionLineEdit->setMaxLength( 3 ); + + fileBackupCheckBox = new QCheckBox( TabPage, "fileBackupCheckBox" ); + fileBackupCheckBox->setGeometry( QRect( 80, 140, 360, 23 ) ); + tabWidget2->insertTab( TabPage, QString("") ); + + tab_2 = new QWidget( tabWidget2, "tab_2" ); + + pwTimeoutSpinBox = new QSpinBox( tab_2, "pwTimeoutSpinBox" ); + pwTimeoutSpinBox->setGeometry( QRect( 390, 50, 55, 23 ) ); + + textLabel1 = new QLabel( tab_2, "textLabel1" ); + textLabel1->setGeometry( QRect( 10, 20, 370, 80 ) ); + textLabel1->setAlignment( int( QLabel::WordBreak | QLabel::AlignVCenter ) ); + + textLabel1_7 = new QLabel( tab_2, "textLabel1_7" ); + textLabel1_7->setGeometry( QRect( 10, 110, 370, 80 ) ); + textLabel1_7->setAlignment( int( QLabel::WordBreak | QLabel::AlignVCenter ) ); + + lockTimeoutSpinBox = new QSpinBox( tab_2, "lockTimeoutSpinBox" ); + lockTimeoutSpinBox->setGeometry( QRect( 390, 140, 55, 23 ) ); + + autoDeepLockCheckBox = new QCheckBox( tab_2, "autoDeepLockCheckBox" ); + autoDeepLockCheckBox->setGeometry( QRect( 60, 180, 380, 25 ) ); + tabWidget2->insertTab( tab_2, QString("") ); + + tab_3 = new QWidget( tabWidget2, "tab_3" ); + + textLabel1_3 = new QLabel( tab_3, "textLabel1_3" ); + textLabel1_3->setGeometry( QRect( 30, 30, 400, 20 ) ); + + autoStartLineEdit = new QLineEdit( tab_3, "autoStartLineEdit" ); + autoStartLineEdit->setGeometry( QRect( 30, 50, 360, 20 ) ); + + browseAutoStButton = new QPushButton( tab_3, "browseAutoStButton" ); + browseAutoStButton->setGeometry( QRect( 400, 50, 30, 20 ) ); + + autostartDeeplockedCheckBox = new QCheckBox( tab_3, "autostartDeeplockedCheckBox" ); + autostartDeeplockedCheckBox->setGeometry( QRect( 40, 80, 390, 25 ) ); + tabWidget2->insertTab( tab_3, QString("") ); + + tab_4 = new QWidget( tabWidget2, "tab_4" ); + + textLabel2 = new QLabel( tab_4, "textLabel2" ); + textLabel2->setGeometry( QRect( 20, 40, 280, 20 ) ); + textLabel2->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) ); + + browserLineEdit = new QLineEdit( tab_4, "browserLineEdit" ); + browserLineEdit->setGeometry( QRect( 310, 40, 130, 27 ) ); + + xtermLineEdit = new QLineEdit( tab_4, "xtermLineEdit" ); + xtermLineEdit->setGeometry( QRect( 310, 100, 130, 27 ) ); + + textLabel3 = new QLabel( tab_4, "textLabel3" ); + textLabel3->setGeometry( QRect( 20, 100, 280, 20 ) ); + textLabel3->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) ); + tabWidget2->insertTab( tab_4, QString("") ); + + tab_5 = new QWidget( tabWidget2, "tab_5" ); + + trayCheckBox = new QCheckBox( tab_5, "trayCheckBox" ); + trayCheckBox->setGeometry( QRect( 30, 30, 400, 20 ) ); + + openUnlockedCheckBox = new QCheckBox( tab_5, "openUnlockedCheckBox" ); + openUnlockedCheckBox->setGeometry( QRect( 30, 80, 400, 20 ) ); + + autoMinimizeCheckBox = new QCheckBox( tab_5, "autoMinimizeCheckBox" ); + autoMinimizeCheckBox->setEnabled( FALSE ); + autoMinimizeCheckBox->setGeometry( QRect( 50, 50, 380, 25 ) ); + + minimizeLockComboBox = new QComboBox( FALSE, tab_5, "minimizeLockComboBox" ); + minimizeLockComboBox->setGeometry( QRect( 310, 170, 120, 27 ) ); + + textLabel1_9 = new QLabel( tab_5, "textLabel1_9" ); + textLabel1_9->setGeometry( QRect( 30, 180, 270, 20 ) ); + textLabel1_9->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) ); + + kwalletEmuCheckBox = new QCheckBox( tab_5, "kwalletEmuCheckBox" ); + kwalletEmuCheckBox->setGeometry( QRect( 30, 110, 400, 25 ) ); + + wndCloseCheckBox = new QCheckBox( tab_5, "wndCloseCheckBox" ); + wndCloseCheckBox->setGeometry( QRect( 30, 140, 430, 24 ) ); + tabWidget2->insertTab( tab_5, QString("") ); + languageChange(); + resize( QSize(490, 318).expandedTo(minimumSizeHint()) ); + clearWState( WState_Polished ); + + // signals and slots connections + connect( okButton, SIGNAL( clicked() ), this, SLOT( okButton_slot() ) ); + connect( cancelButton, SIGNAL( clicked() ), this, SLOT( cancelButton_slot() ) ); + connect( browseAutoStButton, SIGNAL( clicked() ), this, SLOT( browseAutoStButton_slot() ) ); + connect( selEntrFontButton, SIGNAL( clicked() ), this, SLOT( selEntrFontButton_slot() ) ); + connect( trayCheckBox, SIGNAL( toggled(bool) ), autoMinimizeCheckBox, SLOT( setEnabled(bool) ) ); + + // tab order + setTabOrder( pwTimeoutSpinBox, trayCheckBox ); + setTabOrder( trayCheckBox, okButton ); + setTabOrder( okButton, cancelButton ); +} + +/* + * Destroys the object and frees any allocated resources + */ +configWnd::~configWnd() +{ + // no need to delete child widgets, Qt does it all for us +} + +/* + * Sets the strings of the subwidgets using the current + * language. + */ +void configWnd::languageChange() +{ + setCaption( tr( "PwManager Configuration" ) ); + okButton->setText( tr( "&OK" ) ); + //US ENH okButton->setAccel( QKeySequence( tr( "Alt+O" ) ) ); + cancelButton->setText( tr( "&Cancel" ) ); + //US ENH cancelButton->setAccel( QKeySequence( tr( "Alt+C" ) ) ); + windowStyleComboBox->clear(); + windowStyleComboBox->insertItem( tr( "Category on top" ) ); + windowStyleComboBox->insertItem( tr( "Category-list left" ) ); + textLabel1_5->setText( tr( "Window-style:" ) ); + textLabel1_4->setText( tr( "Font for the password entries:" ) ); + selEntrFontButton->setText( tr( "select Font" ) ); + currEntrFont->setText( QString::null ); + tabWidget2->changeTab( tab, tr( "Look && feel" ) ); + compressionComboBox->clear(); + compressionComboBox->insertItem( tr( "none" ) ); + compressionComboBox->insertItem( tr( "gzip" ) ); + compressionComboBox->insertItem( tr( "bzip2" ) ); + textLabel1_6->setText( tr( "*.pwm file compression:" ) ); + textLabel1_8->setText( tr( "permissions:" ) ); + fileBackupCheckBox->setText( tr( "Make file backup before saving" ) ); + tabWidget2->changeTab( TabPage, tr( "File" ) ); + textLabel1->setText( tr( "Password timeout (timeout to hold password in memory, so you don't have to re-enter it, if you already have entered it) [set to 0 to disable]:" ) ); + textLabel1_7->setText( tr( "Auto-lock timeout (auto lock document after this amount of seconds) [set to 0 to disable]:" ) ); + autoDeepLockCheckBox->setText( tr( "deep-lock on autolock" ) ); + tabWidget2->changeTab( tab_2, tr( "Timeout" ) ); + textLabel1_3->setText( tr( "Open this file automatically on startup:" ) ); + browseAutoStButton->setText( tr( "..." ) ); + autostartDeeplockedCheckBox->setText( tr( "open deeplocked" ) ); + tabWidget2->changeTab( tab_3, tr( "Autostart" ) ); + textLabel2->setText( tr( "Favourite browser:" ) ); + textLabel3->setText( tr( "Favourite X-terminal:" ) ); + tabWidget2->changeTab( tab_4, tr( "External apps" ) ); + trayCheckBox->setText( tr( "Show icon in system-tray" ) ); + openUnlockedCheckBox->setText( tr( "Open document with passwords unlocked" ) ); + autoMinimizeCheckBox->setText( tr( "auto-minimize to tray on startup" ) ); + minimizeLockComboBox->clear(); + minimizeLockComboBox->insertItem( tr( "don't lock" ) ); + minimizeLockComboBox->insertItem( tr( "normal lock" ) ); + minimizeLockComboBox->insertItem( tr( "deep-lock" ) ); + textLabel1_9->setText( tr( "auto-lock on minimize:" ) ); + kwalletEmuCheckBox->setText( tr( "KWallet emulation" ) ); + wndCloseCheckBox->setText( tr( "Do not minimize windows into tray. (Close the window)" ) ); + tabWidget2->changeTab( tab_5, tr( "Miscellaneous" ) ); +} + +void configWnd::okButton_slot() +{ + qWarning( "configWnd::okButton_slot(): Not implemented yet" ); +} + +void configWnd::cancelButton_slot() +{ + qWarning( "configWnd::cancelButton_slot(): Not implemented yet" ); +} + +void configWnd::browseBgButton_slot() +{ + qWarning( "configWnd::browseBgButton_slot(): Not implemented yet" ); +} + +void configWnd::browseAutoStButton_slot() +{ + qWarning( "configWnd::browseAutoStButton_slot(): Not implemented yet" ); +} + +void configWnd::selEntrFontButton_slot() +{ + qWarning( "configWnd::selEntrFontButton_slot(): Not implemented yet" ); +} + |