summaryrefslogtreecommitdiffabout
path: root/pwmanager/pwmanager/kcmconfigs/pwmconfigwidget.cpp
Side-by-side diff
Diffstat (limited to 'pwmanager/pwmanager/kcmconfigs/pwmconfigwidget.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--pwmanager/pwmanager/kcmconfigs/pwmconfigwidget.cpp27
1 files changed, 15 insertions, 12 deletions
diff --git a/pwmanager/pwmanager/kcmconfigs/pwmconfigwidget.cpp b/pwmanager/pwmanager/kcmconfigs/pwmconfigwidget.cpp
index 2c5189c..04771b3 100644
--- a/pwmanager/pwmanager/kcmconfigs/pwmconfigwidget.cpp
+++ b/pwmanager/pwmanager/kcmconfigs/pwmconfigwidget.cpp
@@ -13,64 +13,67 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
As a special exception, permission is given to link this program
with any edition of Qt, and distribute the resulting executable,
without including the source code for Qt in the source distribution.
*/
#include <qcheckbox.h>
-#include <qframe.h>
-#include <qgroupbox.h>
+#include <q3frame.h>
+#include <q3groupbox.h>
#include <qlayout.h>
#include <qpushbutton.h>
#include <qtabwidget.h>
#include <qcombobox.h>
#include <qlineedit.h>
#include <qspinbox.h>
#include <qlabel.h>
#include <qfile.h>
-#include <qvbox.h>
+#include <q3vbox.h>
+//Added by qt3to4:
+#include <Q3GridLayout>
+#include <Q3VBoxLayout>
#include <kconfig.h>
#include <kdebug.h>
#include <kdialog.h>
#include <klistview.h>
#include <klocale.h>
#include <kglobal.h>
#include <kmessagebox.h>
#include <kstandarddirs.h>
#include <kio/kfile/kurlrequester.h>
#include "pwmprefs.h"
#include "pwmconfigwidget.h"
#include "pwmexception.h"
PWMConfigWidget::PWMConfigWidget(PWMPrefs *prefs, QWidget *parent, const char *name )
: KPrefsWidget(prefs, parent, name )
{
- QVBoxLayout *topLayout = new QVBoxLayout( this, 0,
+ Q3VBoxLayout *topLayout = new Q3VBoxLayout( this, 0,
KDialog::spacingHint() );
QTabWidget *tabWidget = new QTabWidget( this );
topLayout->addWidget( tabWidget );
// windowsStyle page
//////////////////////////////////////////////////////
QWidget *windowStylePage = new QWidget( this );
- QGridLayout *windowStyleLayout = new QGridLayout( windowStylePage, 3, 3);
+ Q3GridLayout *windowStyleLayout = new Q3GridLayout( windowStylePage, 3, 3);
int i = 0;
KPrefsWidRadios * windowStyle = addWidRadios(i18n("Window-style:") ,&(prefs->mMainViewStyle), windowStylePage);
windowStyle->addRadio(i18n("Category on top"));
windowStyle->addRadio(i18n("Category-list left/top"));
windowStyleLayout->addMultiCellWidget( (QWidget*)windowStyle->groupBox(),i,i,0,2);
++i;
QLabel* lab = new QLabel(i18n("Font for Password entries:"), windowStylePage);
windowStyleLayout->addMultiCellWidget( lab,i,i,0,2);
++i;
KPrefsWidFont *selEntrFont =
@@ -89,25 +92,25 @@ PWMConfigWidget::PWMConfigWidget(PWMPrefs *prefs, QWidget *parent, const char *n
&(prefs->mViewFont),windowStylePage);
windowStyleLayout->addWidget(selEntrFont->label(),i,0);
windowStyleLayout->addWidget(selEntrFont->preview(),i,1);
windowStyleLayout->addWidget(selEntrFont->button(),i,2);
++i;
lab = new QLabel(i18n(""), windowStylePage);
windowStyleLayout->addMultiCellWidget( lab,i,i,0,2);
// File page
//////////////////////////////////////////////////////
QWidget *filePage = new QWidget( this );
- QGridLayout *fileLayout = new QGridLayout( filePage, 3, 2);
+ Q3GridLayout *fileLayout = new Q3GridLayout( filePage, 3, 2);
i = 0;
QLabel* kcfg_compression_label = new QLabel(i18n("Compression:"), filePage);
fileLayout->addWidget(kcfg_compression_label,i,0);
kcfg_compression = new QComboBox(filePage, "kcfg_compression");
kcfg_compression->insertItem(i18n("None"));
kcfg_compression->insertItem(i18n("gzip"));
//US not yet supported: kcfg_compression->insertItem(i18n("bzip2"));
fileLayout->addWidget( kcfg_compression,i,1);
++i;
QLabel* kcfg_crypt_label = new QLabel(i18n("Encryption:"), filePage);
@@ -145,25 +148,25 @@ PWMConfigWidget::PWMConfigWidget(PWMPrefs *prefs, QWidget *parent, const char *n
fileLayout->addWidget(permissionLineLabel,i,0);
fileLayout->addWidget(permissionLineEdit,i,1);
++i;
KPrefsWidBool *sb = addWidBool(i18n("Make backup before saving"),
&(prefs->mMakeFileBackup),filePage);
fileLayout->addMultiCellWidget(sb->checkBox(), i,i,0,1);
++i;
// Timeout page
//////////////////////////////////////////////////////
QWidget *timeoutPage = new QWidget( this );
- QGridLayout *timeoutLayout = new QGridLayout( timeoutPage, 3, 2);
+ Q3GridLayout *timeoutLayout = new Q3GridLayout( timeoutPage, 3, 2);
i = 0;
pwTimeoutSpinBox = new QSpinBox( 0,600,10,timeoutPage, "pwTimeoutSpinBox" );
QLabel* timeoutLabel = new QLabel(pwTimeoutSpinBox, i18n("<b>Password timeout</b> (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]:"), timeoutPage);
timeoutLayout->addMultiCellWidget(timeoutLabel, i, i, 0 ,1);
++i;
timeoutLayout->addMultiCellWidget(pwTimeoutSpinBox,i,i,0,1);
++i;
pwTimeoutSpinBox->setSuffix ( i18n(" sec") );
lockTimeoutSpinBox = new QSpinBox( 0,600,10,timeoutPage, "lockTimeoutSpinBox" );
QLabel* lockTimeoutLabel = new QLabel(lockTimeoutSpinBox, i18n("<b>Auto-lock timeout</b> (auto lock document after this\namount of seconds) [set to 0 to disable]:"), timeoutPage);
timeoutLayout->addMultiCellWidget(lockTimeoutLabel,i, i, 0 ,1);
@@ -174,65 +177,65 @@ PWMConfigWidget::PWMConfigWidget(PWMPrefs *prefs, QWidget *parent, const char *n
sb = addWidBool(i18n("deep-lock on autolock"),
&(prefs->mAutoDeeplock),timeoutPage);
timeoutLayout->addMultiCellWidget(sb->checkBox(), i,i,0,1);
++i;
sb = addWidBool(i18n("Open document with passwords unlocked"),&(prefs->mUnlockOnOpen),timeoutPage);
timeoutLayout->addMultiCellWidget(sb->checkBox(), i,i,0,1);
++i;
// Autostart page
//////////////////////////////////////////////////////
QWidget *autostartPage = new QWidget( this );
- QGridLayout *autostartLayout = new QGridLayout( autostartPage, 3, 2);
+ Q3GridLayout *autostartLayout = new Q3GridLayout( autostartPage, 3, 2);
i = 0;
autostartLineEdit = new KURLRequester(autostartPage, "autoStartLineEdit");
QLabel* autostartLineLabel = new QLabel(autostartLineEdit, "Open this file automatically on startup:",autostartPage);
autostartLayout->addMultiCellWidget(autostartLineLabel,i,i,0,1);
++i;
autostartLayout->addMultiCellWidget(autostartLineEdit,i,i,0,1);
++i;
sb = addWidBool(i18n("open deeplocked"),
&(prefs->mAutostartDeeplocked),autostartPage);
autostartLayout->addMultiCellWidget(sb->checkBox(), i,i,0,1);
++i;
// external app page
//////////////////////////////////////////////////////
QWidget *externalappPage = new QWidget( this );
- QGridLayout *externalappLayout = new QGridLayout( externalappPage, 3, 2);
+ Q3GridLayout *externalappLayout = new Q3GridLayout( externalappPage, 3, 2);
i = 0;
browserLineEdit = new QLineEdit(externalappPage);
QLabel* browserLineLabel = new QLabel(browserLineEdit, i18n("Favourite browser:"), externalappPage);
externalappLayout->addWidget(browserLineLabel,i,0);
externalappLayout->addWidget(browserLineEdit,i,1);
++i;
xtermLineEdit = new QLineEdit(externalappPage);
QLabel* xtermLineLabel = new QLabel(xtermLineEdit, i18n("Favourite x-terminal:"), externalappPage);
externalappLayout->addWidget(xtermLineLabel,i,0);
externalappLayout->addWidget(xtermLineEdit,i,1);
++i;
#if 0
// miscelaneous page
//////////////////////////////////////////////////////
QWidget *miscPage = new QWidget( this );
- QGridLayout *miscLayout = new QGridLayout( miscPage, 3, 2);
+ Q3GridLayout *miscLayout = new Q3GridLayout( miscPage, 3, 2);
i = 0;
/*US ENH: PWM/Pi has no tray and con be minimized
sb = addWidBool(i18n("Show icon in system-tray"),&(prefs->mTray),miscPage);
miscLayout->addMultiCellWidget(sb->checkBox(), i,i,0,1);
++i;
*/
sb = addWidBool(i18n("Open document with passwords unlocked"),&(prefs->mUnlockOnOpen),miscPage);
miscLayout->addMultiCellWidget(sb->checkBox(), i,i,0,1);
++i;
@@ -350,16 +353,16 @@ int PWMConfigWidget::getFilePermissions()
return ret;
}
void PWMConfigWidget::setFilePermissions(int perm)
{
char tmpBuf[30];
sprintf(tmpBuf, "%o", perm);
permissionLineEdit->setText(tmpBuf);
}
-#ifndef PWM_EMBEDDED
-#include "pwmconfigwidget.moc"
+#ifndef PWM_EMBEDDED_
+#include "moc_pwmconfigwidget.cpp"
#endif //PWM_EMBEDDED