git-svn-id: https://svn.code.sf.net/p/keepassx/code/trunk@6 b624d157-de02-0410-bad0-e51aec6abb33
This commit is contained in:
tariq
2006-01-10 21:34:05 +00:00
parent 28c71dfe1e
commit c83a68ed4e
39 changed files with 1959 additions and 2693 deletions

View File

@@ -18,20 +18,20 @@
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#include "mainwindow.h"
#include <qmessagebox.h>
#include <q3scrollview.h>
#include <qlabel.h>
#include <qdialog.h>
#include <qfile.h>
#include "main.h"
#include "AboutDlg.h"
CAboutDialog::CAboutDialog(QWidget* parent, const char* name, bool modal, Qt::WFlags fl)
: AboutDlg(parent,name, modal,fl)
: QDialog(parent,name, modal,fl)
{
mainwnd=((CMainWindow*)parentWidget());
mainwnd->CreateBanner(Banner,mainwnd->Icon_Key32x32,trUtf8("Keepass für Linux"));
setupUi(this);
createBanner(Banner,Icon_Key32x32,trUtf8("Keepass für Linux"));
Link_Homepage=new LinkLabel(this,"Link_Homepage",trUtf8("http://keepass.de.vu"),80,143);
Link_EMail=new LinkLabel(this,"Link_EMail",trUtf8("tarek.saidi@arcor.de"),80,163);
Link_License=new LinkLabel(this,"Link_License",trUtf8("Lizenz"),80,183);
@@ -60,7 +60,7 @@ QDialog dlg(this,NULL,true);
Q3ScrollView scroll(&dlg);
QLabel label(&scroll,"License-Scroll");
scroll.addChild(&label);
QFile gpl(((CMainWindow*)parentWidget())->appdir+"/../share/keepass/license.txt");
QFile gpl(AppDir+"/../share/keepass/license.txt");
if(!gpl.exists()){
QMessageBox::critical(this,trUtf8("Fehler"),trUtf8("Die Datei '%1' konnte nicht gefunden werden.")
.arg("'license.txt'")+"\n"+trUtf8("Die Anwendung wurde möglicherweiße nicht korrekt installiert.")
@@ -89,10 +89,10 @@ delete buffer;
}
void CAboutDialog::OnHomepageClicked(){
mainwnd->OpenURL("http://keepass.de.vu");
openBrowser(tr("http://keepass.berlios.de/index.php"));
}
void CAboutDialog::OnEMailClicked(){
mainwnd->OpenURL("mailto:tarek.saidi@arcor.de");
openBrowser("mailto:tarek.saidi@arcor.de");
}

View File

@@ -21,11 +21,11 @@
#define _ABOUTDIALOG_H_
#include "ui_AboutDlg.h"
#include "lib/UrlLabel.h"
#include "mainwindow.h"
#include "main.h"
class CAboutDialog : public AboutDlg
class CAboutDialog : public QDialog, public Ui_AboutDlg
{
Q_OBJECT
@@ -34,7 +34,6 @@ public:
CAboutDialog(QWidget* parent = 0, const char* name = 0, bool modal = FALSE, Qt::WFlags fl = 0 );
~CAboutDialog();
CMainWindow* mainwnd;
/*$PUBLIC_FUNCTIONS$*/
public slots:

View File

@@ -17,7 +17,7 @@
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#include "mainwindow.h"
#include "main.h"
#include "PwManager.h"
#include "../lib/random.h"
#include "ChangeKeyDlg.h"
@@ -33,12 +33,21 @@
CChangeKeyDlg::CChangeKeyDlg(QWidget* parent,PwDatabase* _db,const char* name, bool modal, Qt::WFlags fl)
: ChangeKeyDialog(parent,name, modal,fl)
: QDialog(parent,name, modal,fl)
{
setupUi(this);
connect( ButtonOK, SIGNAL( clicked() ), this, SLOT( OnOK() ) );
connect( ButtonCancel, SIGNAL( clicked() ), this, SLOT( OnCancel() ) );
connect( Button_Browse, SIGNAL( clicked() ), this, SLOT( OnBrowse() ) );
connect( Edit_Password, SIGNAL( textChanged(const QString&) ), this, SLOT( OnPasswordChanged(const QString&) ) );
connect( Edit_Password_2, SIGNAL( textChanged(const QString&) ), this, SLOT( OnPassword2Changed(const QString&) ) );
connect( Combo_Dirs, SIGNAL( activated(int) ), this, SLOT( OnComboChanged(int) ) );
connect( CheckBox_Both, SIGNAL( stateChanged(int) ), this, SLOT( OnCheckBoxChanged(int) ) );
connect( ButtonChangeEchoMode, SIGNAL( clicked() ), this, SLOT( ChangeEchoMode() ) );
db=_db;
parentwnd=((CMainWindow*)parentWidget());
parentwnd->CreateBanner(Banner,parentwnd->Icon_Key32x32,trUtf8("Hauptschlüssel ändern"));
if(!parentwnd->config->ShowPasswords)ChangeEchoMode();
createBanner(Banner,Icon_Key32x32,trUtf8("Hauptschlüssel ändern"));
if(!config.ShowPasswords)ChangeEchoMode();
///@PlatformSpecific
QDir media("/media");
if(media.exists()){

View File

@@ -17,15 +17,16 @@
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#include "mainwindow.h"
#ifndef _CHANGEKEYDLG_H_
#define _CHANGEKEYDLG_H_
#include "ui_ChangeKeyDlg.h"
#include <qstringlist.h>
#include <q3valuelist.h>
#include <qfile.h>
#include "main.h"
#include "PwManager.h"
class CChangeKeyDlg : public ChangeKeyDialog
class CChangeKeyDlg : public QDialog, public Ui_ChangeKeyDialog
{
Q_OBJECT
@@ -57,7 +58,6 @@ public slots:
private:
PwDatabase* db;
CMainWindow* parentwnd;
QStringList Paths;
Q3ValueList<bool> IsFile;

View File

@@ -22,14 +22,17 @@
#include <qmessagebox.h>
//Added by qt3to4:
#include <QShowEvent>
#include "mainwindow.h"
#include "main.h"
#include "DatabaseSettingsDlg.h"
CDbSettingsDlg::CDbSettingsDlg(CMainWindow* parent,Database* db, const char* name, bool modal, Qt::WFlags fl)
: dbsettingdlg_base(parent,name, modal,fl)
CDbSettingsDlg::CDbSettingsDlg(QWidget* parent,Database* db, const char* name, bool modal, Qt::WFlags fl)
: QDialog(parent,name, modal,fl)
{
setupUi(this);
database=db;
connect( ButtonOK, SIGNAL( clicked() ), this, SLOT( OnOK() ) );
connect( ButtonCancel, SIGNAL( clicked() ), this, SLOT( OnCancel() ) );
}
CDbSettingsDlg::~CDbSettingsDlg()
@@ -38,7 +41,7 @@ CDbSettingsDlg::~CDbSettingsDlg()
void CDbSettingsDlg::showEvent(QShowEvent *event){
if(event->spontaneous()==false){
((CMainWindow*)parentWidget())->CreateBanner(Banner,((CMainWindow*)parentWidget())->Icon_Settings32x32,"Einstellungen");
createBanner(Banner,Icon_Settings32x32,"Einstellungen");
ComboAlgo->insertItem(trUtf8("AES(Rijndael): 256 Bit (Standard)"),0);
ComboAlgo->insertItem(trUtf8("Twofish: 256 Bit"),1);
ComboAlgo->setCurrentItem(database->CryptoAlgorithmus); //Achtung: AlgoID muss gleich dem ComboBox Index sein!
@@ -49,7 +52,7 @@ EditRounds->setText(QString::number(database->KeyEncRounds));
void CDbSettingsDlg::OnCancel()
{
close();
done(0);
}
@@ -72,7 +75,7 @@ return;
database->KeyEncRounds=rounds;
database->CryptoAlgorithmus=ComboAlgo->currentItem();
close();
done(1);
}

View File

@@ -20,17 +20,17 @@
#ifndef DBSETTINGSDLG_H
#define DBSETTINGSDLG_H
#include "ui_DatabaseSettingsDlg.h"
#include "mainwindow.h"
#include "main.h"
#include "Database.h"
//Added by qt3to4:
#include <QShowEvent>
class CDbSettingsDlg : public dbsettingdlg_base
class CDbSettingsDlg : public QDialog, public Ui_dbsettingdlg_base
{
Q_OBJECT
public:
CDbSettingsDlg(CMainWindow* parent,Database* db,const char* name = 0, bool modal = FALSE, Qt::WFlags fl = 0 );
CDbSettingsDlg(QWidget* parent,Database* db,const char* name = 0, bool modal = FALSE, Qt::WFlags fl = 0 );
~CDbSettingsDlg();
virtual void showEvent(QShowEvent *);
/*$PUBLIC_FUNCTIONS$*/

View File

@@ -17,7 +17,7 @@
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#include "mainwindow.h"
#include "main.h"
#include <qpushbutton.h>
#include <qpalette.h>
@@ -43,14 +43,77 @@
CEditEntryDlg::CEditEntryDlg(QWidget* parent, const char* name, bool modal, Qt::WFlags fl)
: EditEntryDialog(parent,name, modal,fl)
CEditEntryDlg::CEditEntryDlg(PwDatabase* _db, CEntry* _entry,QWidget* parent, const char* name, bool modal, Qt::WFlags fl)
: QDialog(parent,name, modal,fl)
{
pw=((CMainWindow*)parentWidget())->db;
mainwnd=((CMainWindow*)parentWidget());
mainwnd->CreateBanner(Banner,mainwnd->Icon_Key32x32,trUtf8("Eintrag bearbeiten"));
Q_ASSERT(_db);
Q_ASSERT(_entry);
entry=_entry;
db=_db;
setupUi(this);
createBanner(Banner,Icon_Key32x32,trUtf8("Eintrag bearbeiten"));
ModFlag=false;
connect(Edit_Password_w, SIGNAL(editingFinished()), this, SLOT(OnPasswordwLostFocus()));
connect(Edit_Password_w, SIGNAL(textChanged(const QString&)), this, SLOT( OnPasswordwTextChanged(const QString&)));
connect(Edit_Password, SIGNAL(textChanged(const QString&)), this, SLOT( OnPasswordTextChanged(const QString&)));
connect(ButtonEchoMode, SIGNAL(clicked()), this, SLOT( ChangeEchoMode()));
connect(ButtonCancel, SIGNAL(clicked()), this, SLOT( OnButtonCancel()));
connect(ButtonOpenAttachment, SIGNAL(clicked()), this, SLOT( OnNewAttachment()));
connect(ButtonDeleteAttachment, SIGNAL(clicked()), this, SLOT( OnDeleteAttachment()));
connect(ButtonSaveAttachment, SIGNAL(clicked()), this, SLOT( OnSaveAttachment()));
connect(ButtonGenPw, SIGNAL(clicked()), this, SLOT( OnButtonGenPw()));
connect(ButtonOK, SIGNAL(clicked()),this,SLOT(OnButtonOK()));
connect(CheckBox_ExpiresNever,SIGNAL(stateChanged(int)),this,SLOT(OnCheckBoxExpiresNeverChanged(int)));
ButtonOpenAttachment->setIcon(*Icon_FileOpen);
ButtonDeleteAttachment->setIcon(*Icon_EditDelete);
ButtonSaveAttachment->setIcon(*Icon_FileSave);
if(entry->pBinaryData==NULL){
ButtonSaveAttachment->setDisabled(true);
ButtonDeleteAttachment->setDisabled(true);}
setCaption(entry->Title);
setIcon(EntryIcons[entry->ImageID]);
Edit_Title->setText(entry->Title);
Edit_UserName->setText(entry->UserName);
Edit_URL->setText(entry->URL);
Edit_Password->setText(entry->Password.getString());
Edit_Password_w->setText(entry->Password.getString());
entry->Password.delRef();
if(!config.ShowPasswords)
ChangeEchoMode();
OnPasswordwLostFocus();
int bits=(entry->Password.length()*8);
Label_Bits->setText(QString::number(bits)+" Bit");
if(bits>128)
bits=128;
Progress_Quali->setValue(100*bits/128);
Edit_Attachment->setText(entry->BinaryDesc);
Edit_Comment->setText(entry->Additional);
InitGroupComboBox();
InitIconComboBox();
if(entry->BinaryDataLength==0)
Label_AttachmentSize->setText("");
else{
QString unit;
int faktor;
int prec;
if(entry->BinaryDataLength<1000){unit=" Byte";faktor=1;prec=0;}
else {if(entry->BinaryDataLength<1000000){unit=" kB";faktor=1000;prec=1;}
else{unit=" MB";faktor=1000000;prec=1;}
}
Label_AttachmentSize->setText(QString::number((float)entry->BinaryDataLength/(float)faktor,'f',prec)+unit);
}
if(entry->Expire==Date_Never){
DateTime_Expire->setDisabled(true);
CheckBox_ExpiresNever->setChecked(true);
}
else{
DateTime_Expire->setDateTime(entry->Expire);
}
}
CEditEntryDlg::~CEditEntryDlg()
@@ -63,52 +126,14 @@ CEditEntryDlg::~CEditEntryDlg()
void CEditEntryDlg::showEvent(QShowEvent *event){
if(event->spontaneous()==false){
if(entry->pBinaryData==NULL){
ButtonSaveAttachment->setDisabled(true);
ButtonDeleteAttachment->setDisabled(true);
}
setCaption(entry->Title);
setIcon(mainwnd->EntryIcons[entry->ImageID]);
Edit_Title->setText(entry->Title);
Edit_UserName->setText(entry->UserName);
Edit_URL->setText(entry->URL);
Edit_Password->setText(entry->Password.getString());
Edit_Password_w->setText(entry->Password.getString());
entry->Password.delRef();
if(!mainwnd->config->ShowPasswords)ChangeEchoMode();
OnPasswordwLostFocus();
int bits=(entry->Password.length()*8);
Label_Bits->setText(QString::number(bits)+" Bit");
if(bits>128)bits=128;
Progress_Quali->setProgress(bits,128);
Progress_Quali->setPercentageVisible(false);
Edit_Attachment->setText(entry->BinaryDesc);
Edit_Comment->setText(entry->Additional);
InitGroupComboBox();
InitIconComboBox();
Edit_Expire_Date->setText((entry->Expire.GetString(0)).mid(0,10));
Edit_Expire_Time->setText((entry->Expire.GetString(0)).mid(11,8));
if(entry->BinaryDataLength==0){
Label_AttachmentSize->setText("");
}
else
{
QString unit;
int faktor;
int prec;
if(entry->BinaryDataLength<1000){unit=" Byte";faktor=1;prec=0;}
else {if(entry->BinaryDataLength<1000000){unit=" kB";faktor=1000;prec=1;}
else{unit=" MB";faktor=1000000;prec=1;}
}
Label_AttachmentSize->setText(QString::number((float)entry->BinaryDataLength/(float)faktor,'f',prec)+unit);
}
}
}
void CEditEntryDlg::InitIconComboBox(){
for(int i=0;i<52;i++){
Combo_IconPicker->insertItem(((CMainWindow*)parentWidget())->EntryIcons[i],"",i);
Combo_IconPicker->insertItem(EntryIcons[i],"",i);
}
Combo_IconPicker->setCurrentItem(entry->ImageID);
}
@@ -117,38 +142,26 @@ Combo_IconPicker->setCurrentItem(entry->ImageID);
void CEditEntryDlg::InitGroupComboBox(){
QString tmp;
int i;
for(i=0;i!=pw->Groups.size();i++){
for(i=0;i!=db->Groups.size();i++){
tmp="";
for(int j=0;j<pw->Groups[i].Level;j++)tmp+=" ";
Combo_Group->insertItem(((CMainWindow*)parentWidget())->EntryIcons[pw->Groups[i].ImageID],
tmp+pw->Groups[i].Name,i);
for(int j=0;j<db->Groups[i].Level;j++)tmp+=" ";
Combo_Group->insertItem(EntryIcons[db->Groups[i].ImageID],
tmp+db->Groups[i].Name,i);
}
Combo_Group->setCurrentItem(pw->getGroupIndex(entry->GroupID));
Combo_Group->setCurrentItem(db->getGroupIndex(entry->GroupID));
}
void CEditEntryDlg::OnButtonOK()
{
if(QString::compare(Edit_Password->text(),Edit_Password_w->text())!=0){
QMessageBox::warning(NULL,"Stopp",QString::fromUtf8("Passwort und Passwortwiederholung stimmen\nnicht überein."),"OK");
return;
}
QString str=Edit_Expire_Date->text();
if(CPwmTime::IsValidDate(str)==false){
QMessageBox::warning(NULL,"Stopp",QString::fromUtf8(str+" ist kein gültiges Datum."),"OK");
return;
}
str=Edit_Expire_Time->text();
if(CPwmTime::IsValidTime(str)==false){
QMessageBox::warning(NULL,"Stopp",QString::fromUtf8(str+" ist keine gültige Uhrzeit."),"OK");
return;
}
if(CheckBox_ExpiresNever->state()==Qt::Checked){
DateTime_Expire->setDateTime(Date_Never);}
CPwmTime tmp_Expire;
tmp_Expire.SetDate(Edit_Expire_Date->text());
tmp_Expire.SetTime(Edit_Expire_Time->text());
if(tmp_Expire!=entry->Expire)
if(DateTime_Expire->dateTime()!=entry->Expire)
ModFlag=true;
if(entry->Title!=Edit_Title->text())
ModFlag=true;
@@ -163,18 +176,17 @@ if(passw!=Edit_Password->text())
ModFlag=true;
entry->Password.delRef();
entry->Expire.SetDate(Edit_Expire_Date->text());
entry->Expire.SetTime(Edit_Expire_Time->text());
entry->LastAccess.SetToNow();
if(ModFlag)entry->LastMod.SetToNow();
entry->Expire=DateTime_Expire->dateTime();
entry->LastAccess=QDateTime::currentDateTime();
if(ModFlag)entry->LastMod=QDateTime::currentDateTime();
entry->Title=Edit_Title->text();
entry->UserName=Edit_UserName->text();
entry->URL=Edit_URL->text();
QString s=Edit_Password->text();
entry->Password.setString(s,true);
entry->Additional=Edit_Comment->text();
if(Combo_Group->currentItem()!=pw->getGroupIndex(entry->GroupID)){
pw->moveEntry(entry,&pw->Groups[Combo_Group->currentItem()]);
if(Combo_Group->currentItem()!=db->getGroupIndex(entry->GroupID)){
db->moveEntry(entry,&db->Groups[Combo_Group->currentItem()]);
}
entry->ImageID=Combo_IconPicker->currentItem();
done(1);
@@ -182,7 +194,7 @@ done(1);
void CEditEntryDlg::OnButtonCancel()
{
entry->LastAccess.SetToNow();
entry->LastAccess=QDateTime::currentDateTime();
done(0);
}
@@ -207,7 +219,7 @@ Edit_Password_w->setText("");
int bits=(Edit_Password->text().length()*8);
Label_Bits->setText(QString::number(bits)+" Bit");
if(bits>128)bits=128;
Progress_Quali->setProgress(bits,128);
Progress_Quali->setValue(100*bits/128);
}
void CEditEntryDlg::OnPasswordwTextChanged(const QString& w)
@@ -237,30 +249,6 @@ Edit_Password_w->setPaletteBackgroundColor(QColor(255,255,255)); ///@FIXME Stand
}
void CEditEntryDlg::OnExpDateLostFocus()
{
QString str=Edit_Expire_Date->text();
if(CPwmTime::IsValidDate(str)==false){
Edit_Expire_Date->setPaletteBackgroundColor(QColor(255,125,125));
}
else
{
Edit_Expire_Date->setPaletteBackgroundColor(QColor(255,255,255));///@FIXME Standart-Hintergrundfarbe nicht weiß
}
}
void CEditEntryDlg::OnExpTimeLostFocus()
{
QString str=Edit_Expire_Time->text();
if(CPwmTime::IsValidTime(str)==false){
Edit_Expire_Time->setPaletteBackgroundColor(QColor(255,125,125));
}
else
{
Edit_Expire_Time->setPaletteBackgroundColor(QColor(255,255,255));///@FIXME Standart-Hintergrundfarbe nicht weiß
}
}
void CEditEntryDlg::OnNewAttachment()
{
QString filename=Q3FileDialog::getOpenFileName(QDir::homeDirPath(),"",this,QString::fromUtf8("Anhang hinzufügen..."));
@@ -355,12 +343,15 @@ pDlg->show();
}
void CEditEntryDlg::OnCheckBoxExpiresNeverChanged(int state){
if(state==Qt::Unchecked){
DateTime_Expire->setDisabled(false);
}
else
{
DateTime_Expire->setDisabled(true);
}
}

View File

@@ -17,20 +17,21 @@
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#include "mainwindow.h"
#ifndef EDITENTRYDLG_H
#define EDITENTRYDLG_H
#include "ui_EditEntryDlg.h"
//Added by qt3to4:
#include <QPixmap>
#include <QShowEvent>
#include "main.h"
#include "PwManager.h"
class CEditEntryDlg : public EditEntryDialog
class CEditEntryDlg : public QDialog, public Ui_EditEntryDialog
{
Q_OBJECT
public:
CEditEntryDlg(QWidget* parent = 0, const char* name = 0, bool modal = FALSE, Qt::WFlags fl = 0);
CEditEntryDlg(PwDatabase* _db, CEntry* _entry,QWidget* parent = 0, const char* name = 0, bool modal = FALSE, Qt::WFlags fl = 0);
~CEditEntryDlg();
virtual void showEvent(QShowEvent *);
/*$PUBLIC_FUNCTIONS$*/
@@ -46,9 +47,8 @@ protected slots:
/*$PROTECTED_SLOTS$*/
public:
CMainWindow* mainwnd;
CEntry* entry;
PwDatabase* pw;
PwDatabase* db;
QPixmap* banner_pixmap;
bool ModFlag;
@@ -59,17 +59,16 @@ void InitIconComboBox();
public slots:
virtual void OnExpTimeLostFocus();
virtual void OnExpDateLostFocus();
virtual void OnPasswordwLostFocus();
virtual void OnPasswordwTextChanged(const QString&);
virtual void OnPasswordTextChanged(const QString&);
virtual void ChangeEchoMode();
virtual void OnButtonCancel();
virtual void OnNewAttachment();
virtual void OnDeleteAttachment();
virtual void OnSaveAttachment();
virtual void OnButtonGenPw();
void OnPasswordwLostFocus();
void OnPasswordwTextChanged(const QString&);
void OnPasswordTextChanged(const QString&);
void ChangeEchoMode();
void OnButtonCancel();
void OnNewAttachment();
void OnDeleteAttachment();
void OnSaveAttachment();
void OnButtonGenPw();
void OnCheckBoxExpiresNeverChanged(int state);
};

View File

@@ -18,7 +18,7 @@
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#include "mainwindow.h"
#include "main.h"
#include <qcombobox.h>
#include <qlineedit.h>
@@ -28,8 +28,9 @@
CEditGroupDialog::CEditGroupDialog(QWidget* parent, const char* name, bool modal, Qt::WFlags fl)
: EditGroupDialog(parent,name, modal,fl)
: QDialog(parent,name, modal,fl)
{
setupUi(this);
IconID=0;
}
@@ -41,7 +42,7 @@ void CEditGroupDialog::showEvent(QShowEvent *event){
if(event->spontaneous()==false){
EditTitle->setText(GroupName);
for(int i=0;i<52;i++){
ComboIconPicker->insertItem(((CMainWindow*)parentWidget())->EntryIcons[i],"",i);
ComboIconPicker->insertItem(EntryIcons[i],"",i);
}
ComboIconPicker->setCurrentItem(IconID);
}}

View File

@@ -26,7 +26,7 @@
//Added by qt3to4:
#include <QShowEvent>
class CEditGroupDialog : public EditGroupDialog
class CEditGroupDialog : public QDialog, public Ui_EditGroupDialog
{
Q_OBJECT

View File

@@ -17,7 +17,7 @@
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#include "mainwindow.h"
#include "main.h"
#include "LanguageDlg.h"
#include <qtranslator.h>
#include <qdir.h>
@@ -26,7 +26,8 @@
#include <qmessagebox.h>
//Added by qt3to4:
#include <QShowEvent>
#include <iostream.h>
#include <iostream>
using namespace std;
const char* infostrings[]={
QT_TRANSLATE_NOOP("_INFO","$TRANSL_AUTHOR"),
@@ -38,23 +39,24 @@ const char* msg[]={QT_TRANSLATE_NOOP("_MSG","Die Änderung der Sprache wird erst
QT_TRANSLATE_NOOP("_MSG","Hinweis")};
CLanguageDlg::CLanguageDlg(QWidget* parent, const char* name, Qt::WFlags fl)
: LanguageDlg(parent,name,fl)
: QDialog(parent,name,fl)
{
parentwnd=((CMainWindow*)parentWidget());
parentwnd->CreateBanner(Banner,parentwnd->Icon_I18n32x32,trUtf8("Spracheinstellungen"));
setupUi(this);
createBanner(Banner,Icon_I18n32x32,trUtf8("Spracheinstellungen"));
Q3ListViewItem* item;
QString& config_lang=parentwnd->config->Language;
QString& config_lang=config.Language;
QStringList files;
QString langdir=parentwnd->appdir+"/../share/keepass/i18n/";
QString langdir=AppDir+"/../share/keepass/i18n/";
QDir dir(langdir);
if(dir.exists()){
files=dir.entryList("*.qm",QDir::Files);
}
List->insertItem(item=new Q3ListViewItem(List,"","Deutsch","-","-"));
if(config_lang=="_DEUTSCH_")item->setPixmap(0,*parentwnd->Icon_Ok16x16);
if(config_lang=="_DEUTSCH_")item->setPixmap(0,*Icon_Ok16x16);
pItems.push_back(item);
filenames.push_back("_DEUTSCH_");
@@ -67,7 +69,7 @@ QTranslator translator;
List->insertItem(item=new Q3ListViewItem(List,"",translator.translate("_INFO","$TRANSL_LANGUAGE")
,translator.translate("_INFO","$TRANSL_VERSION")
,translator.translate("_INFO","$TRANSL_AUTHOR")));
if(config_lang==files[i])item->setPixmap(0,*parentwnd->Icon_Ok16x16);
if(config_lang==files[i])item->setPixmap(0,*Icon_Ok16x16);
pItems.push_back(item);
filenames.push_back(files[i]);
}
@@ -96,7 +98,7 @@ void CLanguageDlg::OnItemRightClick(Q3ListViewItem* item)
void CLanguageDlg::OnItemDoubleClicked(Q3ListViewItem* item) // == Slot für Button "wählen"
{
int i;
QString langdir=parentwnd->appdir+"/../share/keepass/i18n/";
QString langdir=AppDir+"/../share/keepass/i18n/";
for(i=0;i<pItems.size();i++){
if(item==pItems[i])break;
@@ -116,10 +118,10 @@ QMessageBox::information(this,translator.translate("_MSG",msg[2])
,0,0,0);
}
else QMessageBox::information(this,QString::fromUtf8(msg[2]),QString::fromUtf8(msg[0]),QString::fromUtf8(msg[1]),0,0,2,1);
parentwnd->config->Language=filenames[i];
config.Language=filenames[i];
for(int j=0;j<pItems.size();j++){
if(j==i)pItems[j]->setPixmap(0,*parentwnd->Icon_Ok16x16);
if(j==i)pItems[j]->setPixmap(0,*Icon_Ok16x16);
else pItems[j]->setPixmap(0,0);}
List->setColumnWidth(0,20);

View File

@@ -17,7 +17,7 @@
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#include "mainwindow.h"
#include "main.h"
#ifndef _LANGUAGEDLG_H_
#define _LANGUAGEDLG_H_
#include "ui_LanguageDlg.h"
@@ -27,14 +27,13 @@
class CLanguageDlg : public LanguageDlg
class CLanguageDlg : public QDialog, public Ui_LanguageDlg
{
Q_OBJECT
public:
CLanguageDlg(QWidget* parent = 0, const char* name = 0, Qt::WFlags fl = 0 );
~CLanguageDlg();
CMainWindow* parentwnd;
vector<QString> filenames;
vector<Q3ListViewItem*> pItems;
/*$PUBLIC_FUNCTIONS$*/

View File

@@ -18,7 +18,7 @@
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#include "mainwindow.h"
#include "main.h"
#include "PasswordDlg.h"
#include <qdir.h>
@@ -34,12 +34,20 @@
CPasswordDialog::CPasswordDialog(QWidget* parent, const char* name, bool modal, Qt::WFlags fl)
: PasswordDlg(parent,name, modal,fl)
: QDialog(parent,name, modal,fl)
{
parentwnd=((CMainWindow*)parentWidget());
parentwnd->CreateBanner(Banner,parentwnd->Icon_Key32x32,trUtf8("Datenbank öffnen"));
setupUi(this);
createBanner(Banner,Icon_Key32x32,trUtf8("Datenbank öffnen"));
Label_select=new LinkLabel((QWidget*)groupframe,"Select",trUtf8("Datei manuell wählen..."),410,100);
connect(Label_select,SIGNAL(clicked()),this,SLOT(OnSelectClicked()));
connect( Combo_Dirs, SIGNAL( activated(int) ), this, SLOT( OnComboSelectionChanged(int) ) );
connect( ButtonBrowse, SIGNAL( clicked() ), this, SLOT( OnButtonBrowse() ) );
connect( ButtonOK, SIGNAL( clicked() ), this, SLOT( OnOK() ) );
connect( ButtonCancel, SIGNAL( clicked() ), this, SLOT( OnCancel() ) );
connect( Edit_Password, SIGNAL( textChanged(const QString&) ), this, SLOT( OnPasswordChanged(const QString&) ) );
connect( CheckBox_Both, SIGNAL( stateChanged(int) ), this, SLOT( OnCheckBox_BothChanged(int) ) );
connect( ButtonChangeEchoMode, SIGNAL( clicked() ), this, SLOT( ChangeEchoMode() ) );
connect( Edit_Password, SIGNAL( returnPressed() ), this, SLOT( OnOK() ) );
///@PlatformSpecific
QDir media("/media");
if(media.exists()){
@@ -57,7 +65,7 @@ Combo_Dirs->insertItem(0,Paths[i]);
IsFile.append(false);
}
if(!parentwnd->config->ShowPasswords)ChangeEchoMode();
if(!config.ShowPasswords)ChangeEchoMode();
}
@@ -116,7 +124,7 @@ QMessageBox::warning(this,"Datei nicht gefunden",QString::fromUtf8("Im gewählte
void CPasswordDialog::OnSelectClicked()
{
if(Button_Browse->isEnabled()){
if(ButtonBrowse->isEnabled()){
keyfile=Q3FileDialog::getOpenFileName(QDir::homeDirPath(),"",this,QString::fromUtf8("Schlüsseldatei öffnen"));
if(keyfile=="")return;
Combo_Dirs->insertItem(keyfile);
@@ -133,13 +141,11 @@ IsFile.append(true);
void CPasswordDialog::OnCancel()
{
canceled=true;
close();
done(0);
}
void CPasswordDialog::OnOK()
{
canceled=false;
if(CheckBox_Both->isChecked()){
if(password==""){QMessageBox::warning(this,trUtf8("Fehler"),trUtf8("Bitte geben Sie ein Passwort ein.")
@@ -155,7 +161,7 @@ else
,trUtf8("OK"),"","",0,0);
return;}
}
close();
done(1);
}
void CPasswordDialog::OnPasswordChanged(const QString &txt)
@@ -163,10 +169,10 @@ void CPasswordDialog::OnPasswordChanged(const QString &txt)
password=Edit_Password->text();
if(txt!="" && !(CheckBox_Both->isChecked())){
Combo_Dirs->setDisabled(true);
Button_Browse->setDisabled(true);}
ButtonBrowse->setDisabled(true);}
else{
Combo_Dirs->setEnabled(true);
Button_Browse->setEnabled(true);}
ButtonBrowse->setEnabled(true);}
}
@@ -174,7 +180,7 @@ void CPasswordDialog::OnCheckBox_BothChanged(int state)
{
if(state==QCheckBox::On){
Combo_Dirs->setEnabled(true);
Button_Browse->setEnabled(true);
ButtonBrowse->setEnabled(true);
Edit_Password->setEnabled(true);}
else{
Edit_Password->setText("");

View File

@@ -17,7 +17,7 @@
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#include "mainwindow.h"
#include "main.h"
#ifndef PASSWORDDIALOG_H
#define PASSWORDDIALOG_H
#include "lib/UrlLabel.h"
@@ -25,12 +25,11 @@
//Added by qt3to4:
#include <Q3ValueList>
class CPasswordDialog : public PasswordDlg
class CPasswordDialog : public QDialog, public Ui_PasswordDlg
{
Q_OBJECT
private:
CMainWindow* parentwnd;
int NumComboEntries;
QStringList Paths;
Q3ValueList<bool> IsFile;
@@ -41,7 +40,7 @@ public:
QString keyfile;
QString password;
bool canceled;
public:
@@ -51,22 +50,21 @@ public:
public slots:
/*$PUBLIC_SLOTS$*/
virtual void OnOK();
virtual void OnCancel();
virtual void OnSelectClicked();
virtual void OnButtonBrowse();
virtual void OnComboSelectionChanged(int);
virtual void OnPasswordChanged(const QString &txt);
virtual void OnCheckBox_BothChanged(int state);
virtual void ChangeEchoMode();
protected:
/*$PROTECTED_FUNCTIONS$*/
protected slots:
/*$PROTECTED_SLOTS$*/
public slots:
virtual void OnComboSelectionChanged(int);
virtual void OnPasswordChanged(const QString &txt);
virtual void OnCheckBox_BothChanged(int state);
virtual void ChangeEchoMode();
};
#endif

View File

@@ -25,29 +25,29 @@
#include <qradiobutton.h>
#include <qlineedit.h>
#include <qcheckbox.h>
#include <q3progressbar.h>
#include <QProgressBar>
CGenPwDialog::CGenPwDialog(QWidget* parent, const char* name, bool modal, Qt::WFlags fl)
: GenPwDlg(parent,name, modal,fl)
: QDialog(parent,name, modal,fl)
{
mainwnd=(CMainWindow*)(((CEditEntryDlg*)parentWidget())->parentWidget());
mainwnd->CreateBanner(Banner,mainwnd->Icon_Key32x32,QString::fromUtf8("Passwort generieren"));
setupUi(this);
createBanner(Banner,Icon_Key32x32,QString::fromUtf8("Passwort generieren"));
Radio_1->setChecked(true);
Edit_chars->setDisabled(true);
connect(ButtonGenerate,SIGNAL(clicked()),this,SLOT(OnGeneratePw()));
connect(Radio_1,SIGNAL(toggled(bool)),this,SLOT(OnRadio1StateChanged(bool)));
connect(Radio_2,SIGNAL(toggled(bool)),this,SLOT(OnRadio2StateChanged(bool)));
connect(Button_Cancel,SIGNAL(clicked()),this,SLOT(OnCancel()));
connect(ButtonOK,SIGNAL(clicked()),this,SLOT(OnAccept()));
}
CGenPwDialog::~CGenPwDialog()
{
}
void CGenPwDialog::OnRadio1StateChanged(int state)
void CGenPwDialog::OnRadio1StateChanged(bool state)
{
switch (state){
case QCheckBox::On:
if(state){
Radio_2->setChecked(false);
checkBox1->setEnabled(true);
checkBox2->setEnabled(true);
@@ -57,8 +57,7 @@ switch (state){
checkBox6->setEnabled(true);
checkBox7->setEnabled(true);
checkBox8->setEnabled(true);
break;
case QCheckBox::Off:
}else{
if(Radio_2->isChecked()==false)Radio_2->setChecked(true);
checkBox1->setDisabled(true);
checkBox2->setDisabled(true);
@@ -68,27 +67,19 @@ switch (state){
checkBox6->setDisabled(true);
checkBox7->setDisabled(true);
checkBox8->setDisabled(true);
break;
case QCheckBox::NoChange:
break;
}
}
void CGenPwDialog::OnRadio2StateChanged(int state)
void CGenPwDialog::OnRadio2StateChanged(bool state)
{
switch (state){
case QCheckBox::On:
if(state){
Radio_1->setChecked(false);
Edit_chars->setEnabled(true);
break;
case QCheckBox::Off:
}
else{
if(Radio_1->isChecked()==false)Radio_1->setChecked(true);
Edit_chars->setDisabled(true);
break;
case QCheckBox::NoChange:
break;
}
}

View File

@@ -17,7 +17,7 @@
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#include "mainwindow.h"
#include "main.h"
#ifndef GENPWDIALOG_H
#define GENPWDIALOG_H
#include "ui_PasswordGenDlg.h"
@@ -25,7 +25,7 @@
class CGenPwDialog : public GenPwDlg
class CGenPwDialog : public QDialog, public Ui_GenPwDlg
{
Q_OBJECT
private:
@@ -44,14 +44,10 @@ protected:
protected slots:
/*$PROTECTED_SLOTS$*/
public:
CMainWindow* mainwnd;
public slots:
virtual void OnGeneratePw();
public slots:
virtual void OnRadio2StateChanged(int);
public slots:
virtual void OnRadio1StateChanged(int);
virtual void OnRadio2StateChanged(bool);
virtual void OnRadio1StateChanged(bool);
virtual void OnCancel();
virtual void OnAccept();
};

View File

@@ -18,6 +18,7 @@
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#include "main.h"
#include "PwManager.h"
#include "SearchDlg.h"
#include <qlineedit.h>
@@ -26,33 +27,30 @@
#include <qmessagebox.h>
CSearchDlg::CSearchDlg(CGroup* pGroup,QWidget* parent, const char* name, bool modal, Qt::WFlags fl)
: Search_Dlg(parent,name, modal,fl)
: QDialog(parent,name, modal,fl)
{
parentwnd=(CMainWindow*)parent;
parentwnd->CreateBanner(Banner,parentwnd->Icon_Search32x32,tr("Suchen"));
group=pGroup;
pw=parentwnd->db;
checkBox_Cs->setChecked(parentwnd->config->SearchOptions[0]);
checkBox_regExp->setChecked(parentwnd->config->SearchOptions[1]);
checkBox_Title->setChecked(parentwnd->config->SearchOptions[2]);
checkBox_Username->setChecked(parentwnd->config->SearchOptions[3]);
checkBox_Password->setChecked(parentwnd->config->SearchOptions[4]);
checkBox_Comment->setChecked(parentwnd->config->SearchOptions[5]);
checkBox_URL->setChecked(parentwnd->config->SearchOptions[6]);
checkBox_Attachment->setChecked(parentwnd->config->SearchOptions[7]);
setupUi(this);
createBanner(Banner,Icon_Search32x32,tr("Suchen"));
checkBox_Cs->setChecked(config.SearchOptions[0]);
checkBox_regExp->setChecked(config.SearchOptions[1]);
checkBox_Title->setChecked(config.SearchOptions[2]);
checkBox_Username->setChecked(config.SearchOptions[3]);
checkBox_Password->setChecked(config.SearchOptions[4]);
checkBox_Comment->setChecked(config.SearchOptions[5]);
checkBox_URL->setChecked(config.SearchOptions[6]);
checkBox_Attachment->setChecked(config.SearchOptions[7]);
}
CSearchDlg::~CSearchDlg()
{
parentwnd->config->SearchOptions[0]=checkBox_Cs->isChecked();
parentwnd->config->SearchOptions[1]=checkBox_regExp->isChecked();
parentwnd->config->SearchOptions[2]=checkBox_Title->isChecked();
parentwnd->config->SearchOptions[3]=checkBox_Username->isChecked();
parentwnd->config->SearchOptions[4]=checkBox_Password->isChecked();
parentwnd->config->SearchOptions[5]=checkBox_Comment->isChecked();
parentwnd->config->SearchOptions[6]=checkBox_URL->isChecked();
parentwnd->config->SearchOptions[7]=checkBox_Attachment->isChecked();
config.SearchOptions[0]=checkBox_Cs->isChecked();
config.SearchOptions[1]=checkBox_regExp->isChecked();
config.SearchOptions[2]=checkBox_Title->isChecked();
config.SearchOptions[3]=checkBox_Username->isChecked();
config.SearchOptions[4]=checkBox_Password->isChecked();
config.SearchOptions[5]=checkBox_Comment->isChecked();
config.SearchOptions[6]=checkBox_URL->isChecked();
config.SearchOptions[7]=checkBox_Attachment->isChecked();
}
void CSearchDlg::OnButtonClose()
@@ -60,9 +58,9 @@ void CSearchDlg::OnButtonClose()
done(0);
}
void CSearchDlg::OnButtonSearch()
{
/*
txt=Edit_Search->text();
regexp=checkBox_regExp->isChecked();
if(txt==""){
@@ -81,8 +79,12 @@ for(int i=0;i<pw->Entries.size();i++){
pw->Entries[i].Password.delRef();
if(hit)hits.push_back(&pw->Entries[i]);
}
*/
done(1);
}
/*
bool CSearchDlg::search(QString& str){
if(regexp){
QRegExp exp(txt,checkBox_Cs->isChecked());
@@ -90,7 +92,7 @@ if(regexp){
else{
if(str.contains(txt,checkBox_Cs->isChecked())==0)return false;}
return true;
}
}*/
/*$SPECIALIZATION$*/

View File

@@ -17,17 +17,18 @@
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#include "mainwindow.h"
#ifndef SEARCHDLG_H
#define SEARCHDLG_H
#include "ui_SearchDlg.h"
#include "main.h"
#include "PwManager.h"
class CSearchDlg : public Search_Dlg
class CSearchDlg : public QDialog, public Ui_Search_Dlg
{
Q_OBJECT
public:
CSearchDlg(CGroup* pGroup=NULL,QWidget* parent = 0, const char* name = 0, bool modal = FALSE, Qt::WFlags fl = 0 );
CSearchDlg(CGroup* pGroup=NULL,QWidget* parent = 0, const char* name = 0,
bool modal = FALSE, Qt::WFlags fl = 0 );
~CSearchDlg();
/*$PUBLIC_FUNCTIONS$*/
@@ -45,18 +46,9 @@ public slots:
public slots:
virtual void OnButtonSearch();
private:
CMainWindow* parentwnd;
CGroup* group;
PwDatabase* pw;
QString txt;
bool regexp;
bool search(QString&);
public:
vector<CEntry*> hits;
};
#endif

View File

@@ -17,7 +17,7 @@
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#include "mainwindow.h"
#include "main.h"
#include <qpixmap.h>
#include <qcheckbox.h>
#include <qspinbox.h>
@@ -27,30 +27,28 @@
CSettingsDlg::CSettingsDlg(QWidget* parent, const char* name, bool modal, Qt::WFlags fl)
: SettingsDialog(parent,name, modal,fl)
: QDialog(parent,name, modal,fl)
{
pw=((CMainWindow*)parentWidget())->db;
mainwnd=((CMainWindow*)parentWidget());
mainwnd->CreateBanner(Banner,mainwnd->Icon_Settings32x32,trUtf8("Einstellungen"));
CheckBox_OpenLast->setChecked(mainwnd->config->OpenLast);
SpinBox_ClipboardTime->setValue(mainwnd->config->ClipboardTimeOut);
setupUi(this);
createBanner(Banner,Icon_Settings32x32,trUtf8("Einstellungen"));
CheckBox_OpenLast->setChecked(config.OpenLast);
SpinBox_ClipboardTime->setValue(config.ClipboardTimeOut);
pixmTextColor->setPixmap(*(new QPixmap(pixmTextColor->width(),pixmTextColor->height())));
//pixmTextColor->pixmap()->fill(mainwnd->config->BannerTextColor);
//pixmTextColor->pixmap()->fill(config.BannerTextColor);
pixmColor1->setPixmap(*(new QPixmap(pixmColor1->width(),pixmColor1->height())));
//pixmColor1->pixmap()->fill(mainwnd->config->BannerColor1);
//pixmColor1->pixmap()->fill(config.BannerColor1);
pixmColor2->setPixmap(*(new QPixmap(pixmColor2->width(),pixmColor2->height())));
//pixmColor2->pixmap()->fill(mainwnd->config->BannerColor2);
//pixmColor2->pixmap()->fill(config.BannerColor2);
color1=mainwnd->config->BannerColor1;
color2=mainwnd->config->BannerColor2;
textcolor=mainwnd->config->BannerTextColor;
color1=config.BannerColor1;
color2=config.BannerColor2;
textcolor=config.BannerTextColor;
CheckBox_ShowPasswords->setChecked(mainwnd->config->ShowPasswords);
Edit_BrowserCmd->setText(mainwnd->config->OpenUrlCommand);
CheckBox_ExpandGroupTree->setChecked(mainwnd->config->ExpandGroupTree);
CheckBox_ShowPasswords->setChecked(config.ShowPasswords);
Edit_BrowserCmd->setText(config.OpenUrlCommand);
CheckBox_ExpandGroupTree->setChecked(config.ExpandGroupTree);
}
@@ -60,14 +58,14 @@ CSettingsDlg::~CSettingsDlg()
void CSettingsDlg::OnOK()
{
mainwnd->config->OpenLast=CheckBox_OpenLast->isChecked();
mainwnd->config->ClipboardTimeOut=SpinBox_ClipboardTime->value();
mainwnd->config->BannerColor1=color1;
mainwnd->config->BannerColor2=color2;
mainwnd->config->BannerTextColor=textcolor;
mainwnd->config->ShowPasswords=CheckBox_ShowPasswords->isChecked();
mainwnd->config->OpenUrlCommand=Edit_BrowserCmd->text();
mainwnd->config->ExpandGroupTree=CheckBox_ExpandGroupTree->isChecked();
config.OpenLast=CheckBox_OpenLast->isChecked();
config.ClipboardTimeOut=SpinBox_ClipboardTime->value();
config.BannerColor1=color1;
config.BannerColor2=color2;
config.BannerTextColor=textcolor;
config.ShowPasswords=CheckBox_ShowPasswords->isChecked();
config.OpenUrlCommand=Edit_BrowserCmd->text();
config.ExpandGroupTree=CheckBox_ExpandGroupTree->isChecked();
close();
}
@@ -85,7 +83,7 @@ QPixmap *px=new QPixmap(pixmTextColor->width(),pixmTextColor->height());
px->fill(c);
pixmTextColor->clear();
pixmTextColor->setPixmap(*px);
mainwnd->CreateBanner(Banner,mainwnd->Icon_Settings32x32,trUtf8("Einstellungen"),color1,color2,textcolor);}
createBanner(Banner,Icon_Settings32x32,trUtf8("Einstellungen"),color1,color2,textcolor);}
}
@@ -98,7 +96,7 @@ QPixmap *px=new QPixmap(pixmColor2->width(),pixmColor2->height());
px->fill(c);
pixmColor2->clear();
pixmColor2->setPixmap(*px);
mainwnd->CreateBanner(Banner,mainwnd->Icon_Settings32x32,trUtf8("Einstellungen"),color1,color2,textcolor);}
createBanner(Banner,Icon_Settings32x32,trUtf8("Einstellungen"),color1,color2,textcolor);}
}
@@ -111,7 +109,7 @@ QPixmap *px=new QPixmap(pixmColor1->width(),pixmColor1->height());
px->fill(c);
pixmColor1->clear();
pixmColor1->setPixmap(*px);
mainwnd->CreateBanner(Banner,mainwnd->Icon_Settings32x32,trUtf8("Einstellungen"),color1,color2,textcolor);
createBanner(Banner,Icon_Settings32x32,trUtf8("Einstellungen"),color1,color2,textcolor);
}
}

View File

@@ -17,20 +17,18 @@
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#include "mainwindow.h"
#include "main.h"
#ifndef SETTINGSDLG_H
#define SETTINGSDLG_H
#include "ui_SettingsDlg.h"
#include <qcolor.h>
class CSettingsDlg : public SettingsDialog
class CSettingsDlg : public QDialog, public Ui_SettingsDialog
{
Q_OBJECT
public:
CMainWindow* mainwnd;
PwDatabase* pw;
CSettingsDlg(QWidget* parent = 0, const char* name = 0, bool modal = FALSE, Qt::WFlags fl = 0 );
~CSettingsDlg();
/*$PUBLIC_FUNCTIONS$*/

View File

@@ -24,8 +24,9 @@
#include <qpushbutton.h>
CSimplePasswordDialog::CSimplePasswordDialog(bool HidePw,QWidget* parent, const char* name, bool modal, Qt::WFlags fl)
: SimplePasswordDialog(parent,name, modal,fl)
: QDialog(parent,name, modal,fl)
{
setupUi(this);
if(HidePw)Button_HidePassword->toggle();
}

View File

@@ -23,7 +23,7 @@
#include "ui_SimplePasswordDlg.h"
class CSimplePasswordDialog : public SimplePasswordDialog
class CSimplePasswordDialog : public QDialog, public Ui_SimplePasswordDialog
{
Q_OBJECT