added icon selection dialog,

prepared PwDatabase for custom icons

git-svn-id: https://svn.code.sf.net/p/keepassx/code/trunk@65 b624d157-de02-0410-bad0-e51aec6abb33
This commit is contained in:
tariq
2006-03-30 21:11:56 +00:00
parent 3c7d617599
commit 1c513d8f3c
17 changed files with 515 additions and 177 deletions

View File

@@ -49,6 +49,7 @@ http://keepass.berlios.de/translation-howto.html"));
QString ThanksTemplate=QString("<div style='margin-left:0px;'><b>%1</b></div><div style='margin-left:10px;'>%2</div><br><br>");
Edit_Thanks->setText(ThanksTemplate.arg(tr("Matthias Miller")).arg(tr("http://www.outofhanwell.com/<br>Mac OS X Support")));
Edit_Thanks->setText(Edit_Thanks->text()+ThanksTemplate.arg(tr("Eugen Gorschenin")).arg(tr("geugen@users.berlios.de<br>New Website")));
//Edit_Thanks->setText(Edit_Thanks->text()+ThanksTemplate.arg(tr(" ")).arg(tr(" ")));
}

View File

@@ -22,18 +22,20 @@
#include <qcombobox.h>
#include <qlineedit.h>
//Added by qt3to4:
#include <QShowEvent>
#include "EditGroupDlg.h"
#include "SelectIconDlg.h"
CEditGroupDialog::CEditGroupDialog(QWidget* parent, const char* name, bool modal, Qt::WFlags fl)
CEditGroupDialog::CEditGroupDialog(Database* database,QWidget* parent, const char* name, bool modal, Qt::WFlags fl)
: QDialog(parent,name, modal,fl)
{
setupUi(this);
db=database;
IconID=0;
connect( ButtonOK, SIGNAL( clicked() ), this, SLOT( OnOK() ) );
connect( ButtonCancel, SIGNAL( clicked() ), this, SLOT( OnCancel() ) );
connect( Button_Icon, SIGNAL( clicked() ), this, SLOT( OnIconDlg() ));
}
CEditGroupDialog::~CEditGroupDialog()
@@ -62,10 +64,7 @@ done(0);
}
/*$SPECIALIZATION$*/
//#include "editgroupdlg.moc"
void CEditGroupDialog::OnIconDlg(){
CSelectIconDlg dlg(db,this);
dlg.exec();
}

View File

@@ -23,33 +23,28 @@
#include "ui_EditGroupDlg.h"
#include <qstring.h>
//Added by qt3to4:
#include <QShowEvent>
#include "Database.h"
class CEditGroupDialog : public QDialog, public Ui_EditGroupDialog
{
Q_OBJECT
public:
CEditGroupDialog(QWidget* parent = 0, const char* name = 0, bool modal = FALSE, Qt::WFlags fl = 0 );
CEditGroupDialog(Database*,QWidget* parent = 0, const char* name = 0, bool modal = FALSE, Qt::WFlags fl = 0 );
~CEditGroupDialog();
virtual void showEvent(QShowEvent *event);
/*$PUBLIC_FUNCTIONS$*/
protected:
/*$PROTECTED_FUNCTIONS$*/
protected slots:
/*$PROTECTED_SLOTS$*/
public:
int IconID;
QString GroupName;
private:
Database* db;
public slots:
virtual void OnOK();
virtual void OnCancel();
virtual void OnIconDlg();
};
#endif

View File

@@ -31,7 +31,7 @@ CGenPwDialog::CGenPwDialog(QWidget* parent, const char* name, bool modal, Qt::WF
: QDialog(parent,name, modal,fl)
{
setupUi(this);
createBanner(Banner,Icon_Key32x32,QString::fromUtf8("Passwort generieren"));
createBanner(Banner,Icon_Key32x32,QString::fromUtf8("Password Generator"));
Radio_1->setChecked(true);
Edit_chars->setDisabled(true);
connect(ButtonGenerate,SIGNAL(clicked()),this,SLOT(OnGeneratePw()));

View File

@@ -0,0 +1,30 @@
/***************************************************************************
* 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 *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* 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. *
***************************************************************************/
#include "SelectIconDlg.h"
CSelectIconDlg::CSelectIconDlg(Database* database,QWidget* parent,const char* name, bool modal, Qt::WFlags fl):QDialog(parent,name,modal,fl){
setupUi(this);
db=database;
for(int i=0; i<NUM_CLIENT_ICONS; i++){
List->addItem(new QListWidgetItem(QIcon(EntryIcons[i]),QString::number(i)));
}
}

View File

@@ -0,0 +1,40 @@
/***************************************************************************
* 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 *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* 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. *
***************************************************************************/
#ifndef _SELECT_ICON_DLG_
#define _SELECT_ICON_DLG_
#include "main.h"
#include "Database.h"
#include "ui_SelectIconDlg.h"
class CSelectIconDlg:public QDialog, public Ui_SelectIconDlg{
Q_OBJECT
public:
CSelectIconDlg(Database* db,QWidget* parent = 0, const char* name = 0, bool modal = false, Qt::WFlags fl = 0);
private:
Database* db;
};
#endif