Drag&Drop for Entries, some other UI work
git-svn-id: https://svn.code.sf.net/p/keepassx/code/trunk@53 b624d157-de02-0410-bad0-e51aec6abb33
This commit is contained in:
@@ -55,7 +55,7 @@ return;
|
||||
}
|
||||
|
||||
if(!gpl.open(QIODevice::ReadOnly)){
|
||||
QMessageBox::critical(this,tr("Fehler"),tr("Could not open file '%1'")
|
||||
QMessageBox::critical(this,tr("Error"),tr("Could not open file '%1'")
|
||||
.arg("'license.txt'")+tr("The following error occured:\n%1").arg(gpl.errorString())
|
||||
,tr("OK"),0,0,2,1);
|
||||
return;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2005 by Tarek Saidi *
|
||||
* tarek@linux *
|
||||
* Copyright (C) 2005-2006 by Tarek Saidi *
|
||||
* tarek.saidi@arcor.de *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
@@ -51,7 +51,7 @@ Q_ASSERT(_entry);
|
||||
entry=_entry;
|
||||
db=_db;
|
||||
setupUi(this);
|
||||
createBanner(Banner,Icon_Key32x32,tr("Eintrag bearbeiten"));
|
||||
createBanner(Banner,Icon_Key32x32,tr("Edit Entry"));
|
||||
ModFlag=false;
|
||||
connect(Edit_Password_w, SIGNAL(editingFinished()), this, SLOT(OnPasswordwLostFocus()));
|
||||
connect(Edit_Password_w, SIGNAL(textChanged(const QString&)), this, SLOT( OnPasswordwTextChanged(const QString&)));
|
||||
@@ -257,7 +257,7 @@ if(filename=="")return;
|
||||
QFile file(filename);
|
||||
if(file.open(QIODevice::ReadOnly)==false){
|
||||
file.close();
|
||||
QMessageBox::warning(NULL,tr("Fehler"),tr("Datei konnte nicht geöffnet werden."),"OK");
|
||||
QMessageBox::warning(NULL,tr("Error"),tr("Could not open file."),tr("OK"));
|
||||
return;
|
||||
}
|
||||
ModFlag=true;
|
||||
|
||||
@@ -33,12 +33,13 @@
|
||||
|
||||
|
||||
|
||||
CPasswordDialog::CPasswordDialog(QWidget* parent, const char* name, bool modal, Qt::WFlags fl)
|
||||
CPasswordDialog::CPasswordDialog(QWidget* parent, const char* name, bool modal, bool ShowExitButton, Qt::WFlags fl)
|
||||
: QDialog(parent,name, modal,fl)
|
||||
{
|
||||
setupUi(this);
|
||||
createBanner(Banner,Icon_Key32x32,tr("Datenbank öffnen"));
|
||||
Label_select=new LinkLabel((QWidget*)groupframe,"Select",tr("Datei manuell wählen..."),410,100);
|
||||
ButtonExit->setVisible(ShowExitButton);
|
||||
createBanner(Banner,Icon_Key32x32,tr("Open Database"));
|
||||
Label_select=new LinkLabel((QWidget*)groupframe,"Select",tr("Select File Manually..."),410,100);
|
||||
connect( Combo_Dirs, SIGNAL( activated(int) ), this, SLOT( OnComboSelectionChanged(int) ) );
|
||||
connect( ButtonBrowse, SIGNAL( clicked() ), this, SLOT( OnButtonBrowse() ) );
|
||||
connect( ButtonOK, SIGNAL( clicked() ), this, SLOT( OnOK() ) );
|
||||
@@ -47,7 +48,7 @@ connect( Edit_Password, SIGNAL( textChanged(const QString&) ), this, SLOT( OnPas
|
||||
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() ) );
|
||||
|
||||
connect( ButtonExit, SIGNAL( clicked()),this,SLOT(OnButtonExit()));
|
||||
|
||||
QDir media("/media");
|
||||
if(media.exists()){
|
||||
@@ -58,7 +59,7 @@ Paths.erase(Paths.begin()); // delete ".."
|
||||
for(int i=0;i<Paths.count();i++){
|
||||
Paths[i]="/media/"+Paths[i];
|
||||
}
|
||||
Paths.prepend(tr("< keiner >"));
|
||||
Paths.prepend(tr("< none >"));
|
||||
}
|
||||
for(int i=0;i<Paths.count();i++){
|
||||
Combo_Dirs->insertItem(0,Paths[i]);
|
||||
@@ -208,11 +209,7 @@ Edit_Password->setEchoMode(QLineEdit::Normal);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*$SPECIALIZATION$*/
|
||||
|
||||
|
||||
//#include "passworddialog.moc"
|
||||
void CPasswordDialog::OnButtonExit(){
|
||||
done(2);
|
||||
}
|
||||
|
||||
|
||||
@@ -44,26 +44,20 @@ QString password;
|
||||
|
||||
|
||||
public:
|
||||
CPasswordDialog(QWidget* parent = 0, const char* name = 0, bool modal = FALSE, Qt::WFlags fl = 0 );
|
||||
CPasswordDialog(QWidget* parent = 0, const char* name = 0, bool modal = false,
|
||||
bool ShowExitButton = false, Qt::WFlags fl = 0 );
|
||||
~CPasswordDialog();
|
||||
/*$PUBLIC_FUNCTIONS$*/
|
||||
|
||||
public slots:
|
||||
/*$PUBLIC_SLOTS$*/
|
||||
virtual void OnOK();
|
||||
virtual void OnCancel();
|
||||
virtual void OnSelectClicked();
|
||||
virtual void OnButtonBrowse();
|
||||
virtual void OnButtonExit();
|
||||
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$*/
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -61,6 +61,7 @@ textcolor=config.BannerTextColor;
|
||||
CheckBox_ShowPasswords->setChecked(config.ShowPasswords);
|
||||
Edit_BrowserCmd->setText(config.OpenUrlCommand);
|
||||
CheckBox_ExpandGroupTree->setChecked(config.ExpandGroupTree);
|
||||
CheckBox_AlternatingRowColors->setChecked(config.AlternatingRowColors);
|
||||
|
||||
}
|
||||
|
||||
@@ -78,6 +79,7 @@ config.BannerTextColor=textcolor;
|
||||
config.ShowPasswords=CheckBox_ShowPasswords->isChecked();
|
||||
config.OpenUrlCommand=Edit_BrowserCmd->text();
|
||||
config.ExpandGroupTree=CheckBox_ExpandGroupTree->isChecked();
|
||||
config.AlternatingRowColors=CheckBox_AlternatingRowColors->isChecked();
|
||||
close();
|
||||
}
|
||||
|
||||
|
||||
@@ -18,16 +18,16 @@
|
||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||
***************************************************************************/
|
||||
|
||||
|
||||
#include "SimplePasswordDlg.h"
|
||||
#include <qlineedit.h>
|
||||
#include <qpushbutton.h>
|
||||
#include "main.h"
|
||||
#include "SimplePasswordDlg.h"
|
||||
|
||||
CSimplePasswordDialog::CSimplePasswordDialog(bool HidePw,QWidget* parent, const char* name, bool modal, Qt::WFlags fl)
|
||||
CSimplePasswordDialog::CSimplePasswordDialog(QWidget* parent, const char* name, bool modal, Qt::WFlags fl)
|
||||
: QDialog(parent,name, modal,fl)
|
||||
{
|
||||
setupUi(this);
|
||||
if(HidePw)Button_HidePassword->toggle();
|
||||
if(!config.ShowPasswords)Button_HidePassword->toggle();
|
||||
}
|
||||
|
||||
CSimplePasswordDialog::~CSimplePasswordDialog()
|
||||
|
||||
@@ -28,7 +28,7 @@ class CSimplePasswordDialog : public QDialog, public Ui_SimplePasswordDialog
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
CSimplePasswordDialog(bool HidePw,QWidget* parent = 0, const char* name = 0, bool modal = FALSE, Qt::WFlags fl = 0 );
|
||||
CSimplePasswordDialog(QWidget* parent = 0, const char* name = 0, bool modal = FALSE, Qt::WFlags fl = 0 );
|
||||
~CSimplePasswordDialog();
|
||||
/*$PUBLIC_FUNCTIONS$*/
|
||||
|
||||
|
||||
Reference in New Issue
Block a user