QT3 -> QT4
git-svn-id: https://svn.code.sf.net/p/keepassx/code/trunk@5 b624d157-de02-0410-bad0-e51aec6abb33
This commit is contained in:
@@ -20,14 +20,14 @@
|
||||
|
||||
#include "mainwindow.h"
|
||||
#include <qmessagebox.h>
|
||||
#include <qscrollview.h>
|
||||
#include <q3scrollview.h>
|
||||
#include <qlabel.h>
|
||||
#include <qdialog.h>
|
||||
#include <qfile.h>
|
||||
|
||||
#include "AboutDlg.h"
|
||||
|
||||
CAboutDialog::CAboutDialog(QWidget* parent, const char* name, bool modal, WFlags fl)
|
||||
CAboutDialog::CAboutDialog(QWidget* parent, const char* name, bool modal, Qt::WFlags fl)
|
||||
: AboutDlg(parent,name, modal,fl)
|
||||
{
|
||||
mainwnd=((CMainWindow*)parentWidget());
|
||||
@@ -57,7 +57,7 @@ close();
|
||||
void CAboutDialog::OnLicenseClicked(){
|
||||
|
||||
QDialog dlg(this,NULL,true);
|
||||
QScrollView scroll(&dlg);
|
||||
Q3ScrollView scroll(&dlg);
|
||||
QLabel label(&scroll,"License-Scroll");
|
||||
scroll.addChild(&label);
|
||||
QFile gpl(((CMainWindow*)parentWidget())->appdir+"/../share/keepass/license.txt");
|
||||
@@ -68,7 +68,7 @@ QMessageBox::critical(this,trUtf8("Fehler"),trUtf8("Die Datei '%1' konnte nicht
|
||||
return;
|
||||
}
|
||||
|
||||
if(!gpl.open(IO_ReadOnly)){
|
||||
if(!gpl.open(QIODevice::ReadOnly)){
|
||||
QMessageBox::critical(this,trUtf8("Fehler"),trUtf8("Die Datei '%1' konnte nicht geöffnet werden.")
|
||||
.arg("'license.txt'")+trUtf8("Es trat folgender Fehler auf:\n%1").arg(gpl.errorString())
|
||||
,trUtf8("OK"),0,0,2,1);
|
||||
|
||||
@@ -31,7 +31,7 @@ class CAboutDialog : public AboutDlg
|
||||
|
||||
LinkLabel *Link_Homepage,*Link_EMail,*Link_License;
|
||||
public:
|
||||
CAboutDialog(QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
|
||||
CAboutDialog(QWidget* parent = 0, const char* name = 0, bool modal = FALSE, Qt::WFlags fl = 0 );
|
||||
~CAboutDialog();
|
||||
|
||||
CMainWindow* mainwnd;
|
||||
|
||||
@@ -27,12 +27,12 @@
|
||||
#include <qpushbutton.h>
|
||||
#include <qcheckbox.h>
|
||||
#include <qdir.h>
|
||||
#include <qfiledialog.h>
|
||||
#include <q3filedialog.h>
|
||||
#include <qmessagebox.h>
|
||||
|
||||
|
||||
|
||||
CChangeKeyDlg::CChangeKeyDlg(QWidget* parent,PwDatabase* _db,const char* name, bool modal, WFlags fl)
|
||||
CChangeKeyDlg::CChangeKeyDlg(QWidget* parent,PwDatabase* _db,const char* name, bool modal, Qt::WFlags fl)
|
||||
: ChangeKeyDialog(parent,name, modal,fl)
|
||||
{
|
||||
db=_db;
|
||||
@@ -78,8 +78,8 @@ else
|
||||
return;}
|
||||
}
|
||||
|
||||
UINT8 file_key[32]={0};
|
||||
UINT8 pw_key[32]={0};
|
||||
Q_UINT8 file_key[32]={0};
|
||||
Q_UINT8 pw_key[32]={0};
|
||||
|
||||
if(keyfile!=""){
|
||||
QFile file(keyfile);
|
||||
@@ -87,7 +87,7 @@ if(file.exists()){
|
||||
int r=QMessageBox::warning(this,trUtf8("Vorhandene Datei überschreiben?"),trUtf8("Unter dem gewählten Dateinamen existiert bereits eine Datei.\nSoll sie überschrieben werden?"),"Ja","Nein",NULL,1,1);
|
||||
if(r==1)return;}
|
||||
getRandomBytes(file_key,1,32,true);
|
||||
if(file.open(IO_WriteOnly | IO_Truncate)==false){
|
||||
if(file.open(QIODevice::WriteOnly | QIODevice::Truncate)==false){
|
||||
QMessageBox::critical(this,trUtf8("Fehler"),trUtf8("Schlüsseldatei konnte nicht geöffnet werden."),"OK",0,0,2,1);
|
||||
return;
|
||||
}
|
||||
@@ -114,7 +114,7 @@ done(1);
|
||||
void CChangeKeyDlg::OnSelect()
|
||||
{
|
||||
if(Button_Browse->isEnabled()){
|
||||
keyfile=QFileDialog::getSaveFileName(QDir::homeDirPath(),"",this,trUtf8("Schlüsseldatei öffnen"));
|
||||
keyfile=Q3FileDialog::getSaveFileName(QDir::homeDirPath(),"",this,trUtf8("Schlüsseldatei öffnen"));
|
||||
if(keyfile=="")return;
|
||||
Combo_Dirs->insertItem(keyfile);
|
||||
Combo_Dirs->setCurrentItem(Combo_Dirs->count()-1);
|
||||
@@ -131,7 +131,7 @@ IsFile.append(true);
|
||||
|
||||
void CChangeKeyDlg::OnBrowse()
|
||||
{
|
||||
QString dir=QFileDialog::getExistingDirectory(QDir::homeDirPath(),NULL,trUtf8("Verzeichnis wählen"));
|
||||
QString dir=Q3FileDialog::getExistingDirectory(QDir::homeDirPath(),NULL,trUtf8("Verzeichnis wählen"));
|
||||
if(dir=="")return;
|
||||
keyfile=dir+"/pwsafe.key";
|
||||
Combo_Dirs->insertItem(dir);
|
||||
@@ -190,8 +190,8 @@ Edit_Password_2->setDisabled(true);}
|
||||
|
||||
void CChangeKeyDlg::OnCheckBoxChanged(int i)
|
||||
{
|
||||
if(i==QButton::NoChange)return;
|
||||
if(i==QButton::On){
|
||||
if(i==QCheckBox::NoChange)return;
|
||||
if(i==QCheckBox::On){
|
||||
Combo_Dirs->setEnabled(true);
|
||||
Button_Browse->setEnabled(true);
|
||||
Edit_Password->setEnabled(true);
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
#define _CHANGEKEYDLG_H_
|
||||
#include "ui_ChangeKeyDlg.h"
|
||||
#include <qstringlist.h>
|
||||
#include <qvaluelist.h>
|
||||
#include <q3valuelist.h>
|
||||
#include <qfile.h>
|
||||
|
||||
class CChangeKeyDlg : public ChangeKeyDialog
|
||||
@@ -30,7 +30,7 @@ class CChangeKeyDlg : public ChangeKeyDialog
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
CChangeKeyDlg(QWidget* parent,PwDatabase* db, const char* name = 0, bool modal = true, WFlags fl = 0 );
|
||||
CChangeKeyDlg(QWidget* parent,PwDatabase* db, const char* name = 0, bool modal = true, Qt::WFlags fl = 0 );
|
||||
~CChangeKeyDlg();
|
||||
/*$PUBLIC_FUNCTIONS$*/
|
||||
|
||||
@@ -59,7 +59,7 @@ private:
|
||||
PwDatabase* db;
|
||||
CMainWindow* parentwnd;
|
||||
QStringList Paths;
|
||||
QValueList<bool> IsFile;
|
||||
Q3ValueList<bool> IsFile;
|
||||
|
||||
public:
|
||||
QString keyfile;
|
||||
|
||||
@@ -20,11 +20,13 @@
|
||||
#include <qcombobox.h>
|
||||
#include <qlineedit.h>
|
||||
#include <qmessagebox.h>
|
||||
//Added by qt3to4:
|
||||
#include <QShowEvent>
|
||||
#include "mainwindow.h"
|
||||
#include "DatabaseSettingsDlg.h"
|
||||
|
||||
|
||||
CDbSettingsDlg::CDbSettingsDlg(CMainWindow* parent,Database* db, const char* name, bool modal, WFlags fl)
|
||||
CDbSettingsDlg::CDbSettingsDlg(CMainWindow* parent,Database* db, const char* name, bool modal, Qt::WFlags fl)
|
||||
: dbsettingdlg_base(parent,name, modal,fl)
|
||||
{
|
||||
database=db;
|
||||
|
||||
@@ -22,13 +22,15 @@
|
||||
#include "ui_DatabaseSettingsDlg.h"
|
||||
#include "mainwindow.h"
|
||||
#include "Database.h"
|
||||
//Added by qt3to4:
|
||||
#include <QShowEvent>
|
||||
|
||||
class CDbSettingsDlg : public dbsettingdlg_base
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
CDbSettingsDlg(CMainWindow* parent,Database* db,const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
|
||||
CDbSettingsDlg(CMainWindow* parent,Database* db,const char* name = 0, bool modal = FALSE, Qt::WFlags fl = 0 );
|
||||
~CDbSettingsDlg();
|
||||
virtual void showEvent(QShowEvent *);
|
||||
/*$PUBLIC_FUNCTIONS$*/
|
||||
|
||||
@@ -24,16 +24,18 @@
|
||||
#include <qfont.h>
|
||||
#include <qlineedit.h>
|
||||
#include <qlabel.h>
|
||||
#include <qprogressbar.h>
|
||||
#include <qtextedit.h>
|
||||
#include <q3progressbar.h>
|
||||
#include <q3textedit.h>
|
||||
#include <qpixmap.h>
|
||||
#include <qcolor.h>
|
||||
#include <qcombobox.h>
|
||||
#include <qpainter.h>
|
||||
#include <qpen.h>
|
||||
#include <qfiledialog.h>
|
||||
#include <q3filedialog.h>
|
||||
#include <qmessagebox.h>
|
||||
#include <qtoolbutton.h>
|
||||
//Added by qt3to4:
|
||||
#include <QShowEvent>
|
||||
|
||||
|
||||
#include "PasswordGenDlg.h"
|
||||
@@ -41,7 +43,7 @@
|
||||
|
||||
|
||||
|
||||
CEditEntryDlg::CEditEntryDlg(QWidget* parent, const char* name, bool modal, WFlags fl)
|
||||
CEditEntryDlg::CEditEntryDlg(QWidget* parent, const char* name, bool modal, Qt::WFlags fl)
|
||||
: EditEntryDialog(parent,name, modal,fl)
|
||||
{
|
||||
|
||||
@@ -261,17 +263,17 @@ Edit_Expire_Time->setPaletteBackgroundColor(QColor(255,255,255));///@FIXME Stand
|
||||
|
||||
void CEditEntryDlg::OnNewAttachment()
|
||||
{
|
||||
QString filename=QFileDialog::getOpenFileName(QDir::homeDirPath(),"",this,QString::fromUtf8("Anhang hinzufügen..."));
|
||||
QString filename=Q3FileDialog::getOpenFileName(QDir::homeDirPath(),"",this,QString::fromUtf8("Anhang hinzufügen..."));
|
||||
if(filename=="")return;
|
||||
QFile file(filename);
|
||||
if(file.open(IO_ReadOnly)==false){
|
||||
if(file.open(QIODevice::ReadOnly)==false){
|
||||
file.close();
|
||||
QMessageBox::warning(NULL,trUtf8("Fehler"),trUtf8("Datei konnte nicht geöffnet werden."),"OK");
|
||||
return;
|
||||
}
|
||||
ModFlag=true;
|
||||
if(entry->pBinaryData)delete [] entry->pBinaryData;
|
||||
entry->pBinaryData = new UINT8 [file.size()];
|
||||
entry->pBinaryData = new Q_UINT8 [file.size()];
|
||||
|
||||
if(entry->pBinaryData==NULL){
|
||||
file.close();
|
||||
@@ -300,7 +302,7 @@ ButtonDeleteAttachment->setEnabled(true);
|
||||
|
||||
void CEditEntryDlg::OnSaveAttachment()
|
||||
{
|
||||
QString filename=QFileDialog::getSaveFileName(QDir::homeDirPath(),"",this,trUtf8("Anhang speichern..."));
|
||||
QString filename=Q3FileDialog::getSaveFileName(QDir::homeDirPath(),"",this,trUtf8("Anhang speichern..."));
|
||||
if(filename=="")return;
|
||||
QFile file(filename);
|
||||
if(file.exists()){
|
||||
@@ -310,7 +312,7 @@ if(file.remove()==false){
|
||||
QMessageBox::critical(NULL,"Fehler",QString::fromUtf8("Datei konnte nicht überschrieben werden."),"OK");
|
||||
return;}
|
||||
}
|
||||
if(file.open(IO_WriteOnly)==false){
|
||||
if(file.open(QIODevice::WriteOnly)==false){
|
||||
QMessageBox::critical(NULL,"Fehler",QString::fromUtf8("Datei konnte nicht erstellt werden."),"OK");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -21,13 +21,16 @@
|
||||
#ifndef EDITENTRYDLG_H
|
||||
#define EDITENTRYDLG_H
|
||||
#include "ui_EditEntryDlg.h"
|
||||
//Added by qt3to4:
|
||||
#include <QPixmap>
|
||||
#include <QShowEvent>
|
||||
|
||||
class CEditEntryDlg : public EditEntryDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
CEditEntryDlg(QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0);
|
||||
CEditEntryDlg(QWidget* parent = 0, const char* name = 0, bool modal = FALSE, Qt::WFlags fl = 0);
|
||||
~CEditEntryDlg();
|
||||
virtual void showEvent(QShowEvent *);
|
||||
/*$PUBLIC_FUNCTIONS$*/
|
||||
|
||||
@@ -22,10 +22,12 @@
|
||||
|
||||
#include <qcombobox.h>
|
||||
#include <qlineedit.h>
|
||||
//Added by qt3to4:
|
||||
#include <QShowEvent>
|
||||
#include "EditGroupDlg.h"
|
||||
|
||||
|
||||
CEditGroupDialog::CEditGroupDialog(QWidget* parent, const char* name, bool modal, WFlags fl)
|
||||
CEditGroupDialog::CEditGroupDialog(QWidget* parent, const char* name, bool modal, Qt::WFlags fl)
|
||||
: EditGroupDialog(parent,name, modal,fl)
|
||||
{
|
||||
IconID=0;
|
||||
|
||||
@@ -23,13 +23,15 @@
|
||||
|
||||
#include "ui_EditGroupDlg.h"
|
||||
#include <qstring.h>
|
||||
//Added by qt3to4:
|
||||
#include <QShowEvent>
|
||||
|
||||
class CEditGroupDialog : public EditGroupDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
CEditGroupDialog(QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
|
||||
CEditGroupDialog(QWidget* parent = 0, const char* name = 0, bool modal = FALSE, Qt::WFlags fl = 0 );
|
||||
~CEditGroupDialog();
|
||||
virtual void showEvent(QShowEvent *event);
|
||||
/*$PUBLIC_FUNCTIONS$*/
|
||||
|
||||
@@ -22,8 +22,10 @@
|
||||
#include <qtranslator.h>
|
||||
#include <qdir.h>
|
||||
#include <qstringlist.h>
|
||||
#include <qlistview.h>
|
||||
#include <q3listview.h>
|
||||
#include <qmessagebox.h>
|
||||
//Added by qt3to4:
|
||||
#include <QShowEvent>
|
||||
#include <iostream.h>
|
||||
|
||||
const char* infostrings[]={
|
||||
@@ -35,13 +37,13 @@ const char* msg[]={QT_TRANSLATE_NOOP("_MSG","Die Änderung der Sprache wird erst
|
||||
QT_TRANSLATE_NOOP("_MSG","OK"),
|
||||
QT_TRANSLATE_NOOP("_MSG","Hinweis")};
|
||||
|
||||
CLanguageDlg::CLanguageDlg(QWidget* parent, const char* name, WFlags fl)
|
||||
CLanguageDlg::CLanguageDlg(QWidget* parent, const char* name, Qt::WFlags fl)
|
||||
: LanguageDlg(parent,name,fl)
|
||||
{
|
||||
parentwnd=((CMainWindow*)parentWidget());
|
||||
parentwnd->CreateBanner(Banner,parentwnd->Icon_I18n32x32,trUtf8("Spracheinstellungen"));
|
||||
|
||||
QListViewItem* item;
|
||||
Q3ListViewItem* item;
|
||||
QString& config_lang=parentwnd->config->Language;
|
||||
QStringList files;
|
||||
|
||||
@@ -51,7 +53,7 @@ if(dir.exists()){
|
||||
files=dir.entryList("*.qm",QDir::Files);
|
||||
}
|
||||
|
||||
List->insertItem(item=new QListViewItem(List,"","Deutsch","-","-"));
|
||||
List->insertItem(item=new Q3ListViewItem(List,"","Deutsch","-","-"));
|
||||
if(config_lang=="_DEUTSCH_")item->setPixmap(0,*parentwnd->Icon_Ok16x16);
|
||||
pItems.push_back(item);
|
||||
filenames.push_back("_DEUTSCH_");
|
||||
@@ -62,9 +64,9 @@ QTranslator translator;
|
||||
if(!translator.load(langdir+files[i])){
|
||||
QMessageBox::warning(this,tr("Warnung"),tr("Die Datei '%1' konnte nicht geladen werden.").arg(files[i]),tr("OK"),0,0,2,1);
|
||||
continue;}
|
||||
List->insertItem(item=new QListViewItem(List,"",translator.findMessage("_INFO","$TRANSL_LANGUAGE").translation()
|
||||
,translator.findMessage("_INFO","$TRANSL_VERSION").translation()
|
||||
,translator.findMessage("_INFO","$TRANSL_AUTHOR").translation()));
|
||||
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);
|
||||
pItems.push_back(item);
|
||||
filenames.push_back(files[i]);
|
||||
@@ -85,13 +87,13 @@ List->setColumnWidth(3,width);
|
||||
}
|
||||
}
|
||||
|
||||
void CLanguageDlg::OnItemRightClick(QListViewItem* item)
|
||||
void CLanguageDlg::OnItemRightClick(Q3ListViewItem* item)
|
||||
{
|
||||
//CTX-MENU
|
||||
|
||||
}
|
||||
|
||||
void CLanguageDlg::OnItemDoubleClicked(QListViewItem* item) // == Slot für Button "wählen"
|
||||
void CLanguageDlg::OnItemDoubleClicked(Q3ListViewItem* item) // == Slot für Button "wählen"
|
||||
{
|
||||
int i;
|
||||
QString langdir=parentwnd->appdir+"/../share/keepass/i18n/";
|
||||
@@ -99,7 +101,7 @@ QString langdir=parentwnd->appdir+"/../share/keepass/i18n/";
|
||||
for(i=0;i<pItems.size();i++){
|
||||
if(item==pItems[i])break;
|
||||
if(i==pItems.size()-1){
|
||||
cout << QString("unexpected error in %1, line %2").arg(__FILE__).arg(__LINE__) << endl;
|
||||
qWarning(QString("unexpected error in %1, line %2").arg(__FILE__).arg(__LINE__)+"\n");
|
||||
exit(-1);}
|
||||
}
|
||||
if(filenames[i]!="_DEUTSCH_"){
|
||||
@@ -108,10 +110,10 @@ if(!translator.load(langdir+filenames[i])){
|
||||
QMessageBox::warning(this,tr("Warnung"),tr("Die Datei '%1' konnte nicht geladen werden.").arg(filenames[i]),tr("OK"),0,0,2,1);
|
||||
return;
|
||||
}
|
||||
QMessageBox::information(this,translator.findMessage("_MSG",msg[2]).translation()
|
||||
,translator.findMessage("_MSG",msg[0]).translation()
|
||||
,translator.findMessage("_MSG",msg[1]).translation()
|
||||
,0,0);
|
||||
QMessageBox::information(this,translator.translate("_MSG",msg[2])
|
||||
,translator.translate("_MSG",msg[0])
|
||||
,translator.translate("_MSG",msg[1])
|
||||
,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];
|
||||
@@ -130,7 +132,7 @@ List->setColumnWidth(3,width);
|
||||
|
||||
void CLanguageDlg::OnApplyButtonClicked()
|
||||
{
|
||||
QListViewItem* item=List->selectedItem();
|
||||
Q3ListViewItem* item=List->selectedItem();
|
||||
if(item)OnItemDoubleClicked(item);
|
||||
else QMessageBox::information(this,tr("Hinweis"),trUtf8("Es ist keine Übersetzung aufsgewählt."),tr("OK"),0,0,2,1);
|
||||
}
|
||||
|
||||
@@ -22,6 +22,8 @@
|
||||
#define _LANGUAGEDLG_H_
|
||||
#include "ui_LanguageDlg.h"
|
||||
#include <qpixmap.h>
|
||||
//Added by qt3to4:
|
||||
#include <QShowEvent>
|
||||
|
||||
|
||||
|
||||
@@ -30,11 +32,11 @@ class CLanguageDlg : public LanguageDlg
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
CLanguageDlg(QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
|
||||
CLanguageDlg(QWidget* parent = 0, const char* name = 0, Qt::WFlags fl = 0 );
|
||||
~CLanguageDlg();
|
||||
CMainWindow* parentwnd;
|
||||
vector<QString> filenames;
|
||||
vector<QListViewItem*> pItems;
|
||||
vector<Q3ListViewItem*> pItems;
|
||||
/*$PUBLIC_FUNCTIONS$*/
|
||||
|
||||
public slots:
|
||||
@@ -48,8 +50,8 @@ protected:
|
||||
protected slots:
|
||||
/*$PROTECTED_SLOTS$*/
|
||||
virtual void showEvent(QShowEvent *e);
|
||||
virtual void OnItemDoubleClicked(QListViewItem* item);
|
||||
virtual void OnItemRightClick(QListViewItem* item);
|
||||
virtual void OnItemDoubleClicked(Q3ListViewItem* item);
|
||||
virtual void OnItemRightClick(Q3ListViewItem* item);
|
||||
virtual void OnButtonCloseClicked();
|
||||
virtual void OnApplyButtonClicked();
|
||||
|
||||
|
||||
@@ -24,16 +24,16 @@
|
||||
#include <qdir.h>
|
||||
#include <qstringlist.h>
|
||||
#include <qcheckbox.h>
|
||||
#include <qvaluelist.h>
|
||||
#include <q3valuelist.h>
|
||||
#include <qlineedit.h>
|
||||
#include <qcombobox.h>
|
||||
#include <qpushbutton.h>
|
||||
#include <qfiledialog.h>
|
||||
#include <q3filedialog.h>
|
||||
#include <qmessagebox.h>
|
||||
|
||||
|
||||
|
||||
CPasswordDialog::CPasswordDialog(QWidget* parent, const char* name, bool modal, WFlags fl)
|
||||
CPasswordDialog::CPasswordDialog(QWidget* parent, const char* name, bool modal, Qt::WFlags fl)
|
||||
: PasswordDlg(parent,name, modal,fl)
|
||||
{
|
||||
parentwnd=((CMainWindow*)parentWidget());
|
||||
@@ -95,7 +95,7 @@ return;
|
||||
void CPasswordDialog::OnButtonBrowse()
|
||||
{
|
||||
///@PlatformSpecific
|
||||
QString dir=QFileDialog::getExistingDirectory(QDir::homeDirPath(),NULL,QString::fromUtf8("Verzeichnis wählen"));
|
||||
QString dir=Q3FileDialog::getExistingDirectory(QDir::homeDirPath(),NULL,QString::fromUtf8("Verzeichnis wählen"));
|
||||
if(dir=="")return;
|
||||
|
||||
QFile file(dir+"/pwsafe.key");
|
||||
@@ -117,7 +117,7 @@ QMessageBox::warning(this,"Datei nicht gefunden",QString::fromUtf8("Im gewählte
|
||||
void CPasswordDialog::OnSelectClicked()
|
||||
{
|
||||
if(Button_Browse->isEnabled()){
|
||||
keyfile=QFileDialog::getOpenFileName(QDir::homeDirPath(),"",this,QString::fromUtf8("Schlüsseldatei öffnen"));
|
||||
keyfile=Q3FileDialog::getOpenFileName(QDir::homeDirPath(),"",this,QString::fromUtf8("Schlüsseldatei öffnen"));
|
||||
if(keyfile=="")return;
|
||||
Combo_Dirs->insertItem(keyfile);
|
||||
Combo_Dirs->setCurrentItem(Combo_Dirs->count()-1);
|
||||
@@ -172,7 +172,7 @@ Button_Browse->setEnabled(true);}
|
||||
|
||||
void CPasswordDialog::OnCheckBox_BothChanged(int state)
|
||||
{
|
||||
if(state==QButton::On){
|
||||
if(state==QCheckBox::On){
|
||||
Combo_Dirs->setEnabled(true);
|
||||
Button_Browse->setEnabled(true);
|
||||
Edit_Password->setEnabled(true);}
|
||||
|
||||
@@ -22,6 +22,8 @@
|
||||
#define PASSWORDDIALOG_H
|
||||
#include "lib/UrlLabel.h"
|
||||
#include "ui_PasswordDlg.h"
|
||||
//Added by qt3to4:
|
||||
#include <Q3ValueList>
|
||||
|
||||
class CPasswordDialog : public PasswordDlg
|
||||
{
|
||||
@@ -31,7 +33,7 @@ private:
|
||||
CMainWindow* parentwnd;
|
||||
int NumComboEntries;
|
||||
QStringList Paths;
|
||||
QValueList<bool> IsFile;
|
||||
Q3ValueList<bool> IsFile;
|
||||
LinkLabel* Label_select;
|
||||
|
||||
|
||||
@@ -43,7 +45,7 @@ bool canceled;
|
||||
|
||||
|
||||
public:
|
||||
CPasswordDialog(QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
|
||||
CPasswordDialog(QWidget* parent = 0, const char* name = 0, bool modal = FALSE, Qt::WFlags fl = 0 );
|
||||
~CPasswordDialog();
|
||||
/*$PUBLIC_FUNCTIONS$*/
|
||||
|
||||
|
||||
@@ -25,9 +25,9 @@
|
||||
#include <qradiobutton.h>
|
||||
#include <qlineedit.h>
|
||||
#include <qcheckbox.h>
|
||||
#include <qprogressbar.h>
|
||||
#include <q3progressbar.h>
|
||||
|
||||
CGenPwDialog::CGenPwDialog(QWidget* parent, const char* name, bool modal, WFlags fl)
|
||||
CGenPwDialog::CGenPwDialog(QWidget* parent, const char* name, bool modal, Qt::WFlags fl)
|
||||
: GenPwDlg(parent,name, modal,fl)
|
||||
{
|
||||
mainwnd=(CMainWindow*)(((CEditEntryDlg*)parentWidget())->parentWidget());
|
||||
@@ -47,7 +47,7 @@ CGenPwDialog::~CGenPwDialog()
|
||||
void CGenPwDialog::OnRadio1StateChanged(int state)
|
||||
{
|
||||
switch (state){
|
||||
case QButton::On:
|
||||
case QCheckBox::On:
|
||||
Radio_2->setChecked(false);
|
||||
checkBox1->setEnabled(true);
|
||||
checkBox2->setEnabled(true);
|
||||
@@ -58,7 +58,7 @@ switch (state){
|
||||
checkBox7->setEnabled(true);
|
||||
checkBox8->setEnabled(true);
|
||||
break;
|
||||
case QButton::Off:
|
||||
case QCheckBox::Off:
|
||||
if(Radio_2->isChecked()==false)Radio_2->setChecked(true);
|
||||
checkBox1->setDisabled(true);
|
||||
checkBox2->setDisabled(true);
|
||||
@@ -70,7 +70,7 @@ switch (state){
|
||||
checkBox8->setDisabled(true);
|
||||
|
||||
break;
|
||||
case QButton::NoChange:
|
||||
case QCheckBox::NoChange:
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -79,15 +79,15 @@ switch (state){
|
||||
void CGenPwDialog::OnRadio2StateChanged(int state)
|
||||
{
|
||||
switch (state){
|
||||
case QButton::On:
|
||||
case QCheckBox::On:
|
||||
Radio_1->setChecked(false);
|
||||
Edit_chars->setEnabled(true);
|
||||
break;
|
||||
case QButton::Off:
|
||||
case QCheckBox::Off:
|
||||
if(Radio_1->isChecked()==false)Radio_1->setChecked(true);
|
||||
Edit_chars->setDisabled(true);
|
||||
break;
|
||||
case QButton::NoChange:
|
||||
case QCheckBox::NoChange:
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -149,7 +149,7 @@ num+=AddToAssoctable(assoctable,128,255,num);
|
||||
QString str=Edit_chars->text();
|
||||
int i=0;
|
||||
while(str.length()>0){
|
||||
assoctable[i]=(char)((QChar)str[0]);
|
||||
assoctable[i]=((QChar)str[0]).toAscii();
|
||||
str.remove(str[0]);
|
||||
i++;
|
||||
num++;
|
||||
|
||||
@@ -32,7 +32,7 @@ private:
|
||||
int AddToAssoctable(char* table,int start,int end,int pos);
|
||||
bool trim(unsigned char &value,int range);
|
||||
public:
|
||||
CGenPwDialog(QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
|
||||
CGenPwDialog(QWidget* parent = 0, const char* name = 0, bool modal = FALSE, Qt::WFlags fl = 0 );
|
||||
~CGenPwDialog();
|
||||
/*$PUBLIC_FUNCTIONS$*/
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
#include <qregexp.h>
|
||||
#include <qmessagebox.h>
|
||||
|
||||
CSearchDlg::CSearchDlg(CGroup* pGroup,QWidget* parent, const char* name, bool modal, WFlags fl)
|
||||
CSearchDlg::CSearchDlg(CGroup* pGroup,QWidget* parent, const char* name, bool modal, Qt::WFlags fl)
|
||||
: Search_Dlg(parent,name, modal,fl)
|
||||
{
|
||||
parentwnd=(CMainWindow*)parent;
|
||||
|
||||
@@ -27,7 +27,7 @@ class CSearchDlg : public Search_Dlg
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
CSearchDlg(CGroup* pGroup=NULL,QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
|
||||
CSearchDlg(CGroup* pGroup=NULL,QWidget* parent = 0, const char* name = 0, bool modal = FALSE, Qt::WFlags fl = 0 );
|
||||
~CSearchDlg();
|
||||
/*$PUBLIC_FUNCTIONS$*/
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
#include "SettingsDlg.h"
|
||||
|
||||
|
||||
CSettingsDlg::CSettingsDlg(QWidget* parent, const char* name, bool modal, WFlags fl)
|
||||
CSettingsDlg::CSettingsDlg(QWidget* parent, const char* name, bool modal, Qt::WFlags fl)
|
||||
: SettingsDialog(parent,name, modal,fl)
|
||||
{
|
||||
pw=((CMainWindow*)parentWidget())->db;
|
||||
@@ -36,13 +36,13 @@ mainwnd->CreateBanner(Banner,mainwnd->Icon_Settings32x32,trUtf8("Einstellungen")
|
||||
CheckBox_OpenLast->setChecked(mainwnd->config->OpenLast);
|
||||
SpinBox_ClipboardTime->setValue(mainwnd->config->ClipboardTimeOut);
|
||||
pixmTextColor->setPixmap(*(new QPixmap(pixmTextColor->width(),pixmTextColor->height())));
|
||||
pixmTextColor->pixmap()->fill(mainwnd->config->BannerTextColor);
|
||||
//pixmTextColor->pixmap()->fill(mainwnd->config->BannerTextColor);
|
||||
|
||||
pixmColor1->setPixmap(*(new QPixmap(pixmColor1->width(),pixmColor1->height())));
|
||||
pixmColor1->pixmap()->fill(mainwnd->config->BannerColor1);
|
||||
//pixmColor1->pixmap()->fill(mainwnd->config->BannerColor1);
|
||||
|
||||
pixmColor2->setPixmap(*(new QPixmap(pixmColor2->width(),pixmColor2->height())));
|
||||
pixmColor2->pixmap()->fill(mainwnd->config->BannerColor2);
|
||||
//pixmColor2->pixmap()->fill(mainwnd->config->BannerColor2);
|
||||
|
||||
color1=mainwnd->config->BannerColor1;
|
||||
color2=mainwnd->config->BannerColor2;
|
||||
|
||||
@@ -31,7 +31,7 @@ class CSettingsDlg : public SettingsDialog
|
||||
public:
|
||||
CMainWindow* mainwnd;
|
||||
PwDatabase* pw;
|
||||
CSettingsDlg(QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
|
||||
CSettingsDlg(QWidget* parent = 0, const char* name = 0, bool modal = FALSE, Qt::WFlags fl = 0 );
|
||||
~CSettingsDlg();
|
||||
/*$PUBLIC_FUNCTIONS$*/
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
#include <qlineedit.h>
|
||||
#include <qpushbutton.h>
|
||||
|
||||
CSimplePasswordDialog::CSimplePasswordDialog(bool HidePw,QWidget* parent, const char* name, bool modal, WFlags fl)
|
||||
CSimplePasswordDialog::CSimplePasswordDialog(bool HidePw,QWidget* parent, const char* name, bool modal, Qt::WFlags fl)
|
||||
: SimplePasswordDialog(parent,name, modal,fl)
|
||||
{
|
||||
if(HidePw)Button_HidePassword->toggle();
|
||||
|
||||
@@ -28,7 +28,7 @@ class CSimplePasswordDialog : public SimplePasswordDialog
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
CSimplePasswordDialog(bool HidePw,QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
|
||||
CSimplePasswordDialog(bool HidePw,QWidget* parent = 0, const char* name = 0, bool modal = FALSE, Qt::WFlags fl = 0 );
|
||||
~CSimplePasswordDialog();
|
||||
/*$PUBLIC_FUNCTIONS$*/
|
||||
|
||||
|
||||
Reference in New Issue
Block a user