some work on the gtk plug-in, added integration tab in the settings dlg
git-svn-id: https://svn.code.sf.net/p/keepassx/code/trunk@112 b624d157-de02-0410-bad0-e51aec6abb33
This commit is contained in:
@@ -27,6 +27,7 @@
|
||||
#include <qlineedit.h>
|
||||
#include <QFileDialog>
|
||||
#include <QDir>
|
||||
#include <QPainter>
|
||||
#include "SettingsDlg.h"
|
||||
|
||||
|
||||
@@ -34,14 +35,14 @@ CSettingsDlg::CSettingsDlg(QWidget* parent)
|
||||
: QDialog(parent,Qt::Dialog)
|
||||
{
|
||||
setupUi(this);
|
||||
connect(ButtonOK, SIGNAL( clicked() ), this, SLOT( OnOK() ) );
|
||||
connect(ButtonCancel, SIGNAL( clicked() ), this, SLOT( OnCancel() ) );
|
||||
connect(DialogButtons, SIGNAL( accepted() ), this, SLOT( OnOK() ) );
|
||||
connect(DialogButtons, SIGNAL( rejected() ), this, SLOT( OnCancel() ) );
|
||||
connect(ButtonColor1, SIGNAL( clicked() ), this, SLOT( OnColor1() ) );
|
||||
connect(ButtonColor2, SIGNAL( clicked() ), this, SLOT( OnColor2() ) );
|
||||
connect(ButtonTextColor, SIGNAL( clicked() ), this, SLOT( OnTextColor() ) );
|
||||
connect(CheckBox_OpenLast,SIGNAL(stateChanged(int)),this,SLOT(OnCeckBoxOpenLastChanged(int)));
|
||||
connect(Button_MountDirBrowse,SIGNAL(clicked()),this,SLOT(OnMountDirBrowse()));
|
||||
createBanner(Banner,Icon_Settings32x32,tr("Settings"));
|
||||
createBanner(&BannerPixmap,Icon_Settings32x32,tr("Settings"),width());
|
||||
CheckBox_OpenLast->setChecked(config.OpenLast);
|
||||
SpinBox_ClipboardTime->setValue(config.ClipboardTimeOut);
|
||||
|
||||
@@ -75,6 +76,13 @@ CSettingsDlg::~CSettingsDlg()
|
||||
{
|
||||
}
|
||||
|
||||
void CSettingsDlg::paintEvent(QPaintEvent *event){
|
||||
QDialog::paintEvent(event);
|
||||
QPainter painter(this);
|
||||
painter.setClipRegion(event->region());
|
||||
painter.drawPixmap(QPoint(0,0),BannerPixmap);
|
||||
}
|
||||
|
||||
void CSettingsDlg::OnOK()
|
||||
{
|
||||
config.OpenLast=CheckBox_OpenLast->isChecked();
|
||||
|
||||
@@ -17,31 +17,37 @@
|
||||
* Free Software Foundation, Inc., *
|
||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||
***************************************************************************/
|
||||
#include "main.h"
|
||||
|
||||
#ifndef SETTINGSDLG_H
|
||||
#define SETTINGSDLG_H
|
||||
|
||||
|
||||
#include <QColor>
|
||||
#include <QPixmap>
|
||||
#include <QPaintEvent>
|
||||
#include "ui_SettingsDlg.h"
|
||||
#include <qcolor.h>
|
||||
#include "main.h"
|
||||
|
||||
class CSettingsDlg : public QDialog, public Ui_SettingsDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_OBJECT
|
||||
public:
|
||||
CSettingsDlg(QWidget* parent);
|
||||
~CSettingsDlg();
|
||||
|
||||
public:
|
||||
CSettingsDlg(QWidget* parent /*, Qt::WFlags fl*/);
|
||||
~CSettingsDlg();
|
||||
public slots:
|
||||
virtual void OnCancel();
|
||||
virtual void OnOK();
|
||||
virtual void OnTextColor();
|
||||
virtual void OnColor2();
|
||||
virtual void OnColor1();
|
||||
void OnCeckBoxOpenLastChanged(int state);
|
||||
void OnMountDirBrowse();
|
||||
|
||||
public slots:
|
||||
virtual void OnCancel();
|
||||
virtual void OnOK();
|
||||
virtual void OnTextColor();
|
||||
virtual void OnColor2();
|
||||
virtual void OnColor1();
|
||||
void OnCeckBoxOpenLastChanged(int state);
|
||||
void OnMountDirBrowse();
|
||||
|
||||
private:
|
||||
QColor color1,color2,textcolor;
|
||||
private:
|
||||
virtual void paintEvent(QPaintEvent*);
|
||||
QColor color1,color2,textcolor;
|
||||
QPixmap BannerPixmap;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user