More fixes for "automatically lock database"
Removed some unneeded includes Improved code formatting git-svn-id: https://svn.code.sf.net/p/keepassx/code/trunk@187 b624d157-de02-0410-bad0-e51aec6abb33
This commit is contained in:
@@ -22,7 +22,7 @@
|
||||
|
||||
#include "ui_AboutDlg.h"
|
||||
|
||||
class AboutDialog : public QDialog, public Ui_AboutDlg
|
||||
class AboutDialog : public QDialog, private Ui_AboutDlg
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
|
||||
@@ -19,7 +19,6 @@
|
||||
***************************************************************************/
|
||||
|
||||
|
||||
#include "crypto/yarrow.h"
|
||||
#include "CollectEntropyDlg.h"
|
||||
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
#include "ui_CollectEntropyDlg.h"
|
||||
|
||||
class CollectEntropyDlg: public QDialog, public Ui_CollectEntropyDlg{
|
||||
class CollectEntropyDlg: public QDialog, private Ui_CollectEntropyDlg{
|
||||
Q_OBJECT
|
||||
public:
|
||||
CollectEntropyDlg(QWidget* parent);
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
#include "ui_CustomizeDetailViewDlg.h"
|
||||
|
||||
class CustomizeDetailViewDialog : public QDialog, public Ui_CustomizeDetailViewDialog{
|
||||
class CustomizeDetailViewDialog : public QDialog, private Ui_CustomizeDetailViewDialog{
|
||||
Q_OBJECT
|
||||
public:
|
||||
CustomizeDetailViewDialog(QWidget* parent);
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
#include "ui_DatabaseSettingsDlg.h"
|
||||
|
||||
class CDbSettingsDlg : public QDialog, public Ui_DatabaseSettingsDlg
|
||||
class CDbSettingsDlg : public QDialog, private Ui_DatabaseSettingsDlg
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
@@ -31,7 +31,7 @@ class CDbSettingsDlg : public QDialog, public Ui_DatabaseSettingsDlg
|
||||
~CDbSettingsDlg();
|
||||
virtual void paintEvent(QPaintEvent *);
|
||||
|
||||
public slots:
|
||||
private slots:
|
||||
virtual void OnCancel();
|
||||
virtual void OnOK();
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
#include "ui_EditEntryDlg.h"
|
||||
#include "Kdb3Database.h"
|
||||
|
||||
class CEditEntryDlg : public QDialog, public Ui_EditEntryDialog
|
||||
class CEditEntryDlg : public QDialog, private Ui_EditEntryDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
|
||||
@@ -23,23 +23,23 @@
|
||||
|
||||
#include "ui_EditGroupDlg.h"
|
||||
|
||||
class CEditGroupDialog : public QDialog, public Ui_EditGroupDialog
|
||||
class CEditGroupDialog : public QDialog, private Ui_EditGroupDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
CEditGroupDialog(IDatabase*,IGroupHandle*,QWidget* parent = 0, bool modal = FALSE, Qt::WFlags fl = 0 );
|
||||
CEditGroupDialog(IDatabase*,CGroup*,QWidget* parent = 0, bool modal = FALSE, Qt::WFlags fl = 0 );
|
||||
~CEditGroupDialog();
|
||||
virtual void showEvent(QShowEvent *event);
|
||||
private:
|
||||
IDatabase* db;
|
||||
IGroupHandle* handle;
|
||||
CGroup* group;
|
||||
Q_OBJECT
|
||||
public:
|
||||
CEditGroupDialog(IDatabase*,IGroupHandle*,QWidget* parent = 0, bool modal = FALSE, Qt::WFlags fl = 0 );
|
||||
CEditGroupDialog(IDatabase*,CGroup*,QWidget* parent = 0, bool modal = FALSE, Qt::WFlags fl = 0 );
|
||||
~CEditGroupDialog();
|
||||
virtual void showEvent(QShowEvent *event);
|
||||
private:
|
||||
IDatabase* db;
|
||||
IGroupHandle* handle;
|
||||
CGroup* group;
|
||||
|
||||
public slots:
|
||||
virtual void OnOK();
|
||||
virtual void OnCancel();
|
||||
virtual void OnIconDlg();
|
||||
private slots:
|
||||
virtual void OnOK();
|
||||
virtual void OnCancel();
|
||||
virtual void OnIconDlg();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
#include "ui_ExpiredEntriesDlg.h"
|
||||
|
||||
|
||||
class ExpiredEntriesDialog:public QDialog, public Ui_ExpiredEntriesDialog{
|
||||
class ExpiredEntriesDialog:public QDialog, private Ui_ExpiredEntriesDialog{
|
||||
Q_OBJECT
|
||||
public:
|
||||
ExpiredEntriesDialog(QWidget* parent,IDatabase* database,const QList<IEntryHandle*>& Entries);
|
||||
|
||||
@@ -22,8 +22,6 @@
|
||||
|
||||
#include "ui_ManageBookmarksDlg.h"
|
||||
|
||||
#include "main.h"
|
||||
|
||||
class ManageBookmarksDlg : public QDialog, private Ui::ManageBookmarksDlg
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
@@ -20,65 +20,61 @@
|
||||
#ifndef PASSWORDDIALOG_H
|
||||
#define PASSWORDDIALOG_H
|
||||
|
||||
#include <QPixmap>
|
||||
#include <QPaintEvent>
|
||||
#include "ui_PasswordDlg.h"
|
||||
#include "main.h"
|
||||
#include "lib/UrlLabel.h"
|
||||
#include "Database.h"
|
||||
|
||||
|
||||
class PasswordDialog : public QDialog, public Ui_PasswordDlg {
|
||||
Q_OBJECT
|
||||
public:
|
||||
enum DlgMode {
|
||||
Mode_Ask, // Normal password entry when opening a database
|
||||
Mode_Set, // Setting password for the first time after creating a new database
|
||||
Mode_Change // Changing the password of a database
|
||||
};
|
||||
|
||||
enum DlgFlags {
|
||||
Flag_None = 0x00,
|
||||
Flag_Auto = 0x01 // Dialog was automatically opened on start-up
|
||||
};
|
||||
|
||||
enum DlgExit {
|
||||
Exit_Ok=QDialog::Accepted,
|
||||
Exit_Cancel=QDialog::Rejected,
|
||||
Exit_Quit=3
|
||||
};
|
||||
|
||||
typedef bool (KeyFileGenProc)(const QString& filename,QString* error);
|
||||
class PasswordDialog : public QDialog, private Ui_PasswordDlg {
|
||||
Q_OBJECT
|
||||
public:
|
||||
enum DlgMode {
|
||||
Mode_Ask, // Normal password entry when opening a database
|
||||
Mode_Set, // Setting password for the first time after creating a new database
|
||||
Mode_Change // Changing the password of a database
|
||||
};
|
||||
|
||||
PasswordDialog(QWidget* parent,DlgMode mode,DlgFlags flags,const QString& filename=QString());
|
||||
enum DlgFlags {
|
||||
Flag_None = 0x00,
|
||||
Flag_Auto = 0x01 // Dialog was automatically opened on start-up
|
||||
};
|
||||
|
||||
enum DlgExit {
|
||||
Exit_Ok=QDialog::Accepted,
|
||||
Exit_Cancel=QDialog::Rejected,
|
||||
Exit_Quit=3
|
||||
};
|
||||
|
||||
typedef bool (KeyFileGenProc)(const QString& filename,QString* error);
|
||||
|
||||
PasswordDialog(QWidget* parent,DlgMode mode,DlgFlags flags,const QString& filename=QString());
|
||||
|
||||
// result functions
|
||||
QString selectedBookmark();
|
||||
QString keyFile();
|
||||
QString password();
|
||||
|
||||
// result functions
|
||||
QString selectedBookmark();
|
||||
QString keyFile();
|
||||
QString password();
|
||||
|
||||
public slots:
|
||||
void OnOK();
|
||||
void OnCancel();
|
||||
void OnButtonBrowse();
|
||||
void OnButtonQuit();
|
||||
void OnGenKeyFile();
|
||||
void OnButtonBack();
|
||||
void ChangeEchoModeDatabaseKey();
|
||||
void OnBookmarkTriggered(QAction* action);
|
||||
void OnCheckBoxesChanged(int state);
|
||||
private slots:
|
||||
void OnOK();
|
||||
void OnCancel();
|
||||
void OnButtonBrowse();
|
||||
void OnButtonQuit();
|
||||
void OnGenKeyFile();
|
||||
void OnButtonBack();
|
||||
void ChangeEchoModeDatabaseKey();
|
||||
void OnBookmarkTriggered(QAction* action);
|
||||
void OnCheckBoxesChanged(int state);
|
||||
|
||||
private:
|
||||
DlgMode Mode;
|
||||
QPixmap BannerPixmap;
|
||||
QString BookmarkFilename;
|
||||
QString Filename;
|
||||
QString Password;
|
||||
QString KeyFile;
|
||||
void setStatePasswordOnly();
|
||||
void setStateKeyFileOnly();
|
||||
void setStateBoth();
|
||||
virtual void paintEvent(QPaintEvent*);
|
||||
private:
|
||||
DlgMode Mode;
|
||||
QPixmap BannerPixmap;
|
||||
QString BookmarkFilename;
|
||||
QString Filename;
|
||||
QString Password;
|
||||
QString KeyFile;
|
||||
void setStatePasswordOnly();
|
||||
void setStateKeyFileOnly();
|
||||
void setStateBoth();
|
||||
virtual void paintEvent(QPaintEvent*);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
|
||||
#include "dialogs/PasswordGenDlg.h"
|
||||
#include "dialogs/CollectEntropyDlg.h"
|
||||
#include "crypto/yarrow.h"
|
||||
|
||||
bool CGenPwDialog::EntropyCollected=false;
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
#include "ui_SearchDlg.h"
|
||||
|
||||
class SearchDialog : public QDialog, public Ui_Search_Dlg
|
||||
class SearchDialog : public QDialog, private Ui_Search_Dlg
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
@@ -30,7 +30,7 @@ class SearchDialog : public QDialog, public Ui_Search_Dlg
|
||||
~SearchDialog();
|
||||
QList<IEntryHandle*> Result;
|
||||
|
||||
public slots:
|
||||
private slots:
|
||||
virtual void OnClose();
|
||||
virtual void OnSearch();
|
||||
|
||||
|
||||
@@ -23,31 +23,32 @@
|
||||
|
||||
#include "ui_SelectIconDlg.h"
|
||||
|
||||
class CSelectIconDlg:public QDialog, public Ui_SelectIconDlg{
|
||||
Q_OBJECT
|
||||
public:
|
||||
CSelectIconDlg(IDatabase* db,int ImageID,QWidget* parent = 0, bool modal = false, Qt::WFlags fl = 0);
|
||||
class CSelectIconDlg:public QDialog, private Ui_SelectIconDlg{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
CSelectIconDlg(IDatabase* db,int ImageID,QWidget* parent = 0, bool modal = false, Qt::WFlags fl = 0);
|
||||
|
||||
public slots:
|
||||
void OnAddIcon();
|
||||
void OnPickIcon();
|
||||
void OnCancel();
|
||||
void OnDelete();
|
||||
void OnReplace();
|
||||
void OnSelectionChanged(QListWidgetItem*);
|
||||
private slots:
|
||||
void OnAddIcon();
|
||||
void OnPickIcon();
|
||||
void OnCancel();
|
||||
void OnDelete();
|
||||
void OnReplace();
|
||||
void OnSelectionChanged(QListWidgetItem*);
|
||||
|
||||
private:
|
||||
int Id;
|
||||
IDatabase* db;
|
||||
void updateView();
|
||||
QMenu* CtxMenu;
|
||||
QAction* DeleteAction;
|
||||
QAction* ReplaceAction;
|
||||
QPushButton* Button_PickIcon;
|
||||
private:
|
||||
int Id;
|
||||
IDatabase* db;
|
||||
void updateView();
|
||||
QMenu* CtxMenu;
|
||||
QAction* DeleteAction;
|
||||
QAction* ReplaceAction;
|
||||
QPushButton* Button_PickIcon;
|
||||
|
||||
protected:
|
||||
virtual void contextMenuEvent(QContextMenuEvent *event);
|
||||
virtual void showEvent(QShowEvent* event);
|
||||
protected:
|
||||
virtual void contextMenuEvent(QContextMenuEvent *event);
|
||||
virtual void showEvent(QShowEvent* event);
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
#include "ui_SettingsDlg.h"
|
||||
#include "lib/AutoType.h"
|
||||
|
||||
class CSettingsDlg : public QDialog, public Ui_SettingsDialog
|
||||
class CSettingsDlg : public QDialog, private Ui_SettingsDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
|
||||
@@ -23,21 +23,20 @@
|
||||
|
||||
#include "ui_SimplePasswordDlg.h"
|
||||
|
||||
class SimplePasswordDialog : public QDialog, public Ui_SimplePasswordDialog
|
||||
class SimplePasswordDialog : public QDialog, private Ui_SimplePasswordDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
SimplePasswordDialog(QWidget* parent = 0, bool modal = FALSE, Qt::WFlags fl = 0 );
|
||||
~SimplePasswordDialog();
|
||||
public:
|
||||
SimplePasswordDialog(QWidget* parent = 0, bool modal = FALSE, Qt::WFlags fl = 0 );
|
||||
~SimplePasswordDialog();
|
||||
QString password;
|
||||
|
||||
public: QString password;
|
||||
|
||||
public slots:
|
||||
virtual void OnCancel();
|
||||
virtual void OnOK();
|
||||
virtual void OnHidePasswordToggled(bool state);
|
||||
virtual void OnTextChanged(const QString&);
|
||||
private slots:
|
||||
virtual void OnCancel();
|
||||
virtual void OnOK();
|
||||
virtual void OnHidePasswordToggled(bool state);
|
||||
virtual void OnTextChanged(const QString&);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user