removed all old Qt3 depedencies, Qt3Support is not longer needed
git-svn-id: https://svn.code.sf.net/p/keepassx/code/trunk@92 b624d157-de02-0410-bad0-e51aec6abb33
This commit is contained in:
@@ -26,8 +26,8 @@
|
||||
#include "main.h"
|
||||
#include "AboutDlg.h"
|
||||
|
||||
CAboutDialog::CAboutDialog(QWidget* parent, const char* name, bool modal, Qt::WFlags fl)
|
||||
: QDialog(parent,name, modal,fl)
|
||||
CAboutDialog::CAboutDialog(QWidget* parent,bool modal, Qt::WFlags fl)
|
||||
: QDialog(parent,fl)
|
||||
{
|
||||
setupUi(this);
|
||||
createBanner(Banner,Icon_Key32x32,tr("KeePassX %1").arg(KEEPASS_VERSION));
|
||||
@@ -42,7 +42,7 @@ if(TrActive){
|
||||
}
|
||||
AboutTr+="<br>";
|
||||
}
|
||||
Edit_Translation->setText(AboutTr+tr("\
|
||||
Edit_Translation->setHtml(AboutTr+tr("\
|
||||
Information on how to translate KeePassX can be found under:\n\
|
||||
http://keepass.berlios.de/"));
|
||||
QString str;
|
||||
@@ -55,7 +55,7 @@ str+="</div><br><div style='margin-left:0px;'>";
|
||||
str+="<b>"+tr("Thanks To")+"</b>";
|
||||
str+="</div><div style='margin-left:10px;'>";
|
||||
str+="<u>"+tr("Matthias Miller")+"</u><br>"+tr("Patches for better MacOS X support")+"<br>"+tr("www.outofhanwell.com")+"<br></div>";
|
||||
Edit_Thanks->setText(str);
|
||||
Edit_Thanks->setHtml(str);
|
||||
}
|
||||
|
||||
CAboutDialog::~CAboutDialog()
|
||||
@@ -86,9 +86,9 @@ return;
|
||||
}
|
||||
|
||||
char* buffer=new char[gpl.size()];
|
||||
long l=gpl.readBlock(buffer,gpl.size());
|
||||
long l=gpl.read(buffer,gpl.size());
|
||||
gpl.close();
|
||||
Edit_License->setText(QString::fromUtf8(buffer,l));
|
||||
Edit_License->setHtml(QString::fromUtf8(buffer,l));
|
||||
delete buffer;
|
||||
}
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ class CAboutDialog : public QDialog, public Ui_AboutDlg
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
CAboutDialog(QWidget* parent = 0, const char* name = 0, bool modal = FALSE, Qt::WFlags fl = 0 );
|
||||
CAboutDialog(QWidget* parent = 0, bool modal = FALSE, Qt::WFlags fl = 0 );
|
||||
~CAboutDialog();
|
||||
|
||||
public slots:
|
||||
|
||||
@@ -26,8 +26,8 @@
|
||||
#include "DatabaseSettingsDlg.h"
|
||||
|
||||
|
||||
CDbSettingsDlg::CDbSettingsDlg(QWidget* parent,Database* db, const char* name, bool modal, Qt::WFlags fl)
|
||||
: QDialog(parent,name, modal,fl)
|
||||
CDbSettingsDlg::CDbSettingsDlg(QWidget* parent,Database* db, bool modal, Qt::WFlags fl)
|
||||
: QDialog(parent,fl)
|
||||
{
|
||||
setupUi(this);
|
||||
database=db;
|
||||
@@ -42,9 +42,9 @@ CDbSettingsDlg::~CDbSettingsDlg()
|
||||
void CDbSettingsDlg::showEvent(QShowEvent *event){
|
||||
if(event->spontaneous()==false){
|
||||
createBanner(Banner,Icon_Settings32x32,tr("Settings"));
|
||||
ComboAlgo->insertItem(tr("AES(Rijndael): 256 Bit (default)"),0);
|
||||
ComboAlgo->insertItem(tr("Twofish: 256 Bit"),1);
|
||||
ComboAlgo->setCurrentItem(database->CryptoAlgorithmus); //Achtung: AlgoID muss gleich dem ComboBox Index sein!
|
||||
ComboAlgo->insertItem(0,tr("AES(Rijndael): 256 Bit (default)"));
|
||||
ComboAlgo->insertItem(1,tr("Twofish: 256 Bit"));
|
||||
ComboAlgo->setCurrentIndex(database->CryptoAlgorithmus); //Achtung: AlgoID muss gleich dem ComboBox Index sein!
|
||||
EditRounds->setText(QString::number(database->KeyEncRounds));
|
||||
|
||||
}
|
||||
@@ -73,7 +73,7 @@ QMessageBox::warning(NULL,tr("Error"),tr("The number of encryption rounds have t
|
||||
return;
|
||||
}
|
||||
database->KeyEncRounds=rounds;
|
||||
database->CryptoAlgorithmus=ComboAlgo->currentItem();
|
||||
database->CryptoAlgorithmus=ComboAlgo->currentIndex();
|
||||
|
||||
done(1);
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ class CDbSettingsDlg : public QDialog, public Ui_dbsettingdlg_base
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
CDbSettingsDlg(QWidget* parent,Database* db,const char* name = 0, bool modal = FALSE, Qt::WFlags fl = 0 );
|
||||
CDbSettingsDlg(QWidget* parent,Database* db, bool modal = FALSE, Qt::WFlags fl = 0 );
|
||||
~CDbSettingsDlg();
|
||||
virtual void showEvent(QShowEvent *);
|
||||
/*$PUBLIC_FUNCTIONS$*/
|
||||
|
||||
@@ -25,8 +25,8 @@
|
||||
#include <qfont.h>
|
||||
#include <qlineedit.h>
|
||||
#include <qlabel.h>
|
||||
#include <q3progressbar.h>
|
||||
#include <q3textedit.h>
|
||||
#include <QProgressBar>
|
||||
#include <QTextEdit>
|
||||
#include <qpixmap.h>
|
||||
#include <qcolor.h>
|
||||
#include <qcombobox.h>
|
||||
@@ -35,7 +35,6 @@
|
||||
#include <QFileDialog>
|
||||
#include <qmessagebox.h>
|
||||
#include <qtoolbutton.h>
|
||||
//Added by qt3to4:
|
||||
#include <QShowEvent>
|
||||
|
||||
#include "SelectIconDlg.h"
|
||||
@@ -44,8 +43,8 @@
|
||||
|
||||
|
||||
|
||||
CEditEntryDlg::CEditEntryDlg(Database* _db, CEntry* _entry,QWidget* parent, const char* name, bool modal, Qt::WFlags fl)
|
||||
: QDialog(parent,name, modal,fl)
|
||||
CEditEntryDlg::CEditEntryDlg(Database* _db, CEntry* _entry,QWidget* parent, bool modal, Qt::WFlags fl)
|
||||
: QDialog(parent,fl)
|
||||
{
|
||||
Q_ASSERT(_db);
|
||||
Q_ASSERT(_entry);
|
||||
@@ -74,8 +73,8 @@ ButtonSaveAttachment->setIcon(*Icon_FileSave);
|
||||
if(entry->BinaryData.isNull()){
|
||||
ButtonSaveAttachment->setDisabled(true);
|
||||
ButtonDeleteAttachment->setDisabled(true);}
|
||||
setCaption(entry->Title);
|
||||
setIcon(db->icon(entry->ImageID));
|
||||
setWindowTitle(entry->Title);
|
||||
setWindowIcon(db->icon(entry->ImageID));
|
||||
Edit_Title->setText(entry->Title);
|
||||
Edit_UserName->setText(entry->UserName);
|
||||
Edit_URL->setText(entry->URL);
|
||||
@@ -92,7 +91,7 @@ if(bits>128)
|
||||
bits=128;
|
||||
Progress_Quali->setValue(100*bits/128);
|
||||
Edit_Attachment->setText(entry->BinaryDesc);
|
||||
Edit_Comment->setText(entry->Additional);
|
||||
Edit_Comment->setPlainText(entry->Additional);
|
||||
InitGroupComboBox();
|
||||
InitIconComboBox();
|
||||
if(entry->BinaryData.length()==0)
|
||||
@@ -136,9 +135,9 @@ if(event->spontaneous()==false){
|
||||
|
||||
void CEditEntryDlg::InitIconComboBox(){
|
||||
for(int i=0;i<db->numIcons();i++){
|
||||
Combo_IconPicker->insertItem(db->icon(i),"",i);
|
||||
Combo_IconPicker->insertItem(i,db->icon(i),"");
|
||||
}
|
||||
Combo_IconPicker->setCurrentItem(entry->ImageID);
|
||||
Combo_IconPicker->setCurrentIndex(entry->ImageID);
|
||||
}
|
||||
|
||||
|
||||
@@ -148,10 +147,10 @@ int i;
|
||||
for(i=0;i!=db->numGroups();i++){
|
||||
tmp="";
|
||||
for(int j=0;j<db->group(i).Level;j++)tmp+=" ";
|
||||
Combo_Group->insertItem(db->icon(db->group(i).ImageID),
|
||||
tmp+db->group(i).Name,i);
|
||||
Combo_Group->insertItem(i,db->icon(db->group(i).ImageID),
|
||||
tmp+db->group(i).Name);
|
||||
}
|
||||
Combo_Group->setCurrentItem(db->getGroupIndex(entry->GroupID));
|
||||
Combo_Group->setCurrentIndex(db->getGroupIndex(entry->GroupID));
|
||||
}
|
||||
|
||||
void CEditEntryDlg::OnButtonOK()
|
||||
@@ -162,7 +161,7 @@ QMessageBox::warning(NULL,tr("Warning"),tr("Password and password repetition are
|
||||
return;
|
||||
}
|
||||
|
||||
if(CheckBox_ExpiresNever->state()==Qt::Checked){
|
||||
if(CheckBox_ExpiresNever->checkState()==Qt::Checked){
|
||||
DateTime_Expire->setDateTime(Date_Never);}
|
||||
|
||||
if(DateTime_Expire->dateTime()!=entry->Expire)
|
||||
@@ -173,13 +172,13 @@ if(entry->UserName!=Edit_UserName->text())
|
||||
ModFlag=true;
|
||||
if(entry->URL!=Edit_URL->text())
|
||||
ModFlag=true;
|
||||
if(entry->Additional!=Edit_Comment->text())
|
||||
if(entry->Additional!=Edit_Comment->toPlainText())
|
||||
ModFlag=true;
|
||||
entry->Password.unlock();
|
||||
if(entry->Password.string()!=Edit_Password->text())
|
||||
ModFlag=true;
|
||||
entry->Password.lock();
|
||||
if(entry->ImageID!=Combo_IconPicker->currentItem())
|
||||
if(entry->ImageID!=Combo_IconPicker->currentIndex())
|
||||
ModFlag=true;
|
||||
|
||||
entry->Expire=DateTime_Expire->dateTime();
|
||||
@@ -190,14 +189,14 @@ entry->UserName=Edit_UserName->text();
|
||||
entry->URL=Edit_URL->text();
|
||||
QString s=Edit_Password->text();
|
||||
entry->Password.setString(s,true);
|
||||
entry->Additional=Edit_Comment->text();
|
||||
if(Combo_Group->currentItem()!=db->getGroupIndex(entry->GroupID)){
|
||||
db->moveEntry(entry,&db->group(Combo_Group->currentItem()));
|
||||
entry->Additional=Edit_Comment->toPlainText();
|
||||
if(Combo_Group->currentIndex()!=db->getGroupIndex(entry->GroupID)){
|
||||
db->moveEntry(entry,&db->group(Combo_Group->currentIndex()));
|
||||
EntryMoved=true; ModFlag=true;
|
||||
}
|
||||
if(entry->ImageID<BUILTIN_ICONS && Combo_IconPicker->currentItem()>=BUILTIN_ICONS)
|
||||
if(entry->ImageID<BUILTIN_ICONS && Combo_IconPicker->currentIndex()>=BUILTIN_ICONS)
|
||||
entry->OldImgID=entry->ImageID;
|
||||
entry->ImageID=Combo_IconPicker->currentItem();
|
||||
entry->ImageID=Combo_IconPicker->currentIndex();
|
||||
|
||||
if(ModFlag&&EntryMoved)done(2);
|
||||
else if(ModFlag)done(1);
|
||||
@@ -238,10 +237,15 @@ void CEditEntryDlg::OnPasswordwTextChanged(const QString& w)
|
||||
{
|
||||
|
||||
if(QString::compare(Edit_Password_w->text(),Edit_Password->text().mid(0,(Edit_Password_w->text().length())))!=0){
|
||||
Edit_Password_w->setPaletteBackgroundColor(QColor(255,125,125));
|
||||
QPalette palette;
|
||||
palette.setColor(Edit_Password_w->foregroundRole(),QColor(255,125,125));
|
||||
Edit_Password_w->setPalette(palette);
|
||||
}else
|
||||
{
|
||||
Edit_Password_w->setPaletteBackgroundColor(QColor(255,255,255)); ///@FIXME Standard-Hintergrundfarbe nicht weiß
|
||||
///@FIXME should set correct background color... it's not always white!
|
||||
QPalette palette;
|
||||
palette.setColor(Edit_Password_w->foregroundRole(),QColor(255,255,255));
|
||||
Edit_Password_w->setPalette(palette);
|
||||
}
|
||||
|
||||
|
||||
@@ -251,11 +255,16 @@ Edit_Password_w->setPaletteBackgroundColor(QColor(255,255,255)); ///@FIXME Stand
|
||||
void CEditEntryDlg::OnPasswordwLostFocus()
|
||||
{
|
||||
if(QString::compare(Edit_Password_w->text(),Edit_Password->text())!=0){
|
||||
Edit_Password_w->setPaletteBackgroundColor(QColor(255,125,125));
|
||||
QPalette palette;
|
||||
palette.setColor(Edit_Password_w->foregroundRole(),QColor(255,125,125));
|
||||
Edit_Password_w->setPalette(palette);
|
||||
}
|
||||
else
|
||||
{
|
||||
Edit_Password_w->setPaletteBackgroundColor(QColor(255,255,255)); ///@FIXME Standard-Hintergrundfarbe nicht weiß
|
||||
///@FIXME should set correct background color... it's not always white!
|
||||
QPalette palette;
|
||||
palette.setColor(Edit_Password_w->foregroundRole(),QColor(255,255,255));
|
||||
Edit_Password_w->setPalette(palette);
|
||||
}
|
||||
|
||||
|
||||
@@ -263,7 +272,7 @@ Edit_Password_w->setPaletteBackgroundColor(QColor(255,255,255)); ///@FIXME Stand
|
||||
|
||||
void CEditEntryDlg::OnNewAttachment()
|
||||
{
|
||||
QString filename=QFileDialog::getOpenFileName(this,tr("Add Attachment..."),QDir::homeDirPath());
|
||||
QString filename=QFileDialog::getOpenFileName(this,tr("Add Attachment..."),QDir::homePath());
|
||||
if(filename=="")return;
|
||||
QFile file(filename);
|
||||
if(file.open(QIODevice::ReadOnly)==false){
|
||||
@@ -297,7 +306,7 @@ saveAttachment(entry,this);
|
||||
|
||||
void CEditEntryDlg::saveAttachment(CEntry* pEntry, QWidget* ParentWidget)
|
||||
{
|
||||
QFileDialog FileDlg(ParentWidget,tr("Save Attachment..."),QDir::homeDirPath());
|
||||
QFileDialog FileDlg(ParentWidget,tr("Save Attachment..."),QDir::homePath());
|
||||
FileDlg.selectFile(pEntry->BinaryDesc);
|
||||
FileDlg.setAcceptMode(QFileDialog::AcceptSave);
|
||||
if(!FileDlg.exec())return;
|
||||
@@ -347,7 +356,7 @@ ButtonDeleteAttachment->setDisabled(true);
|
||||
|
||||
void CEditEntryDlg::OnButtonGenPw()
|
||||
{
|
||||
CGenPwDialog* pDlg=new CGenPwDialog(this,0,true);
|
||||
CGenPwDialog* pDlg=new CGenPwDialog(this,true);
|
||||
pDlg->show();
|
||||
}
|
||||
|
||||
@@ -363,13 +372,13 @@ else
|
||||
}
|
||||
|
||||
void CEditEntryDlg::OnCustomIcons(){
|
||||
CSelectIconDlg dlg(db,Combo_IconPicker->currentItem(),this);
|
||||
CSelectIconDlg dlg(db,Combo_IconPicker->currentIndex(),this);
|
||||
int r=dlg.exec();
|
||||
if(r!=-1){
|
||||
Combo_IconPicker->clear();
|
||||
for(int i=0;i<db->numIcons();i++)
|
||||
Combo_IconPicker->insertItem(db->icon(i),"",i);
|
||||
Combo_IconPicker->setCurrentItem(r);
|
||||
Combo_IconPicker->insertItem(i,db->icon(i),"");
|
||||
Combo_IconPicker->setCurrentIndex(r);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ class CEditEntryDlg : public QDialog, public Ui_EditEntryDialog
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
CEditEntryDlg(Database* _db, CEntry* _entry,QWidget* parent = 0, const char* name = 0, bool modal = FALSE, Qt::WFlags fl = 0);
|
||||
CEditEntryDlg(Database* _db, CEntry* _entry,QWidget* parent = 0, bool modal = FALSE, Qt::WFlags fl = 0);
|
||||
~CEditEntryDlg();
|
||||
virtual void showEvent(QShowEvent *);
|
||||
/*$PUBLIC_FUNCTIONS$*/
|
||||
|
||||
@@ -27,8 +27,8 @@
|
||||
#include "SelectIconDlg.h"
|
||||
|
||||
|
||||
CEditGroupDialog::CEditGroupDialog(Database* database,QWidget* parent, const char* name, bool modal, Qt::WFlags fl)
|
||||
: QDialog(parent,name, modal,fl)
|
||||
CEditGroupDialog::CEditGroupDialog(Database* database,QWidget* parent, bool modal, Qt::WFlags fl)
|
||||
: QDialog(parent,fl)
|
||||
{
|
||||
setupUi(this);
|
||||
db=database;
|
||||
@@ -47,16 +47,16 @@ void CEditGroupDialog::showEvent(QShowEvent *event){
|
||||
if(event->spontaneous()==false){
|
||||
EditTitle->setText(GroupName);
|
||||
for(int i=0;i<db->numIcons();i++){
|
||||
ComboIconPicker->insertItem(db->icon(i),"",i);
|
||||
ComboIconPicker->insertItem(i,db->icon(i),"");
|
||||
}
|
||||
ComboIconPicker->setCurrentItem(IconID);
|
||||
ComboIconPicker->setCurrentIndex(IconID);
|
||||
}
|
||||
}
|
||||
|
||||
void CEditGroupDialog::OnOK()
|
||||
{
|
||||
GroupName=EditTitle->text();
|
||||
IconID=ComboIconPicker->currentItem();
|
||||
IconID=ComboIconPicker->currentIndex();
|
||||
done(1);
|
||||
}
|
||||
|
||||
@@ -72,8 +72,8 @@ int r=dlg.exec();
|
||||
if(r!=-1){
|
||||
ComboIconPicker->clear();
|
||||
for(int i=0;i<db->numIcons();i++)
|
||||
ComboIconPicker->insertItem(db->icon(i),"",i);
|
||||
ComboIconPicker->insertItem(i,db->icon(i),"");
|
||||
IconID=r;
|
||||
ComboIconPicker->setCurrentItem(IconID);
|
||||
ComboIconPicker->setCurrentIndex(IconID);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ class CEditGroupDialog : public QDialog, public Ui_EditGroupDialog
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
CEditGroupDialog(Database*,QWidget* parent = 0, const char* name = 0, bool modal = FALSE, Qt::WFlags fl = 0 );
|
||||
CEditGroupDialog(Database*,QWidget* parent = 0, bool modal = FALSE, Qt::WFlags fl = 0 );
|
||||
~CEditGroupDialog();
|
||||
bool ModFlag;
|
||||
virtual void showEvent(QShowEvent *event);
|
||||
|
||||
@@ -31,15 +31,15 @@
|
||||
#include <QMessageBox>
|
||||
|
||||
|
||||
CPasswordDialog::CPasswordDialog(QWidget* parent, const char* name, bool modal, bool ShowExitButton,bool ChangeKeyMode, Qt::WFlags fl)
|
||||
: QDialog(parent,name, modal,fl)
|
||||
CPasswordDialog::CPasswordDialog(QWidget* parent, bool modal, bool ShowExitButton,bool ChangeKeyMode, Qt::WFlags fl)
|
||||
: QDialog(parent,fl)
|
||||
{
|
||||
setupUi(this);
|
||||
createBanner(Banner,Icon_Key32x32,tr("Database Key"));
|
||||
QDir media(config.MountDir);
|
||||
if(media.exists()){
|
||||
QStringList Paths;
|
||||
Paths=media.entryList("*",QDir::Dirs);
|
||||
Paths=media.entryList(QStringList()<<"*",QDir::Dirs);
|
||||
Paths.erase(Paths.begin()); // delete "."
|
||||
Paths.erase(Paths.begin()); // delete ".."
|
||||
for(int i=0;i<Paths.count();i++)
|
||||
@@ -124,7 +124,7 @@ KeyType=BOTH;
|
||||
|
||||
void CPasswordDialog::OnButtonBrowse()
|
||||
{
|
||||
QString filename=QFileDialog::getOpenFileName(this,tr("Select a Key File"),QDir::homeDirPath(),tr("*.key"));
|
||||
QString filename=QFileDialog::getOpenFileName(this,tr("Select a Key File"),QDir::homePath(),tr("*.key"));
|
||||
if(filename=="")return;
|
||||
QFile file(filename);
|
||||
if(file.exists()){
|
||||
@@ -136,7 +136,7 @@ QMessageBox::warning(this,tr("Error"),tr("Unexpected Error: File does not exist.
|
||||
|
||||
void CPasswordDialog::OnButtonBrowse_Set()
|
||||
{
|
||||
QString filename=QFileDialog::getSaveFileName(this,tr("Select a Key File"),QDir::homeDirPath(),tr("*.key"));
|
||||
QString filename=QFileDialog::getSaveFileName(this,tr("Select a Key File"),QDir::homePath(),tr("*.key"));
|
||||
if(filename=="")return;
|
||||
Combo_Dirs->setEditText(filename);
|
||||
}
|
||||
@@ -179,7 +179,7 @@ if(KeyType==BOTH || KeyType==KEYFILE){
|
||||
if(!file.exists()){
|
||||
QDir dir(keyfile);
|
||||
QStringList files;
|
||||
files=dir.entryList("*.key",QDir::Files);
|
||||
files=dir.entryList(QStringList()<<"*.key",QDir::Files);
|
||||
if(!files.size()){
|
||||
QMessageBox::warning(this,tr("Error"),tr("The given directory does not contain any key files."),tr("OK"),"","",0,0);
|
||||
return;}
|
||||
|
||||
@@ -38,7 +38,7 @@ QString keyfile;
|
||||
QString password;
|
||||
tKeyType KeyType;
|
||||
|
||||
CPasswordDialog(QWidget* parent = 0, const char* name = 0, bool modal = false,
|
||||
CPasswordDialog(QWidget* parent = 0, bool modal = false,
|
||||
bool ShowExitButton = false, bool KeyMode_Set=false, Qt::WFlags fl = 0 );
|
||||
|
||||
public slots:
|
||||
|
||||
@@ -27,8 +27,8 @@
|
||||
#include <qcheckbox.h>
|
||||
#include <QProgressBar>
|
||||
|
||||
CGenPwDialog::CGenPwDialog(QWidget* parent, const char* name, bool modal, Qt::WFlags fl)
|
||||
: QDialog(parent,name, modal,fl)
|
||||
CGenPwDialog::CGenPwDialog(QWidget* parent, bool modal, Qt::WFlags fl)
|
||||
: QDialog(parent,fl)
|
||||
{
|
||||
setupUi(this);
|
||||
createBanner(Banner,Icon_Key32x32,tr("Password Generator"));
|
||||
@@ -187,8 +187,9 @@ if(checkBox8->isChecked())bits=length*8;
|
||||
else bits=length*7;
|
||||
Label_Bits->setText(tr("%1 Bit").arg(QString::number(bits)));
|
||||
if(bits>128)bits=128;
|
||||
Progress_Quali->setProgress(bits,128);
|
||||
Progress_Quali->setPercentageVisible(false);
|
||||
Progress_Quali->setRange(0,128);
|
||||
Progress_Quali->setValue(bits);
|
||||
Progress_Quali->setTextVisible(false);
|
||||
}
|
||||
|
||||
int CGenPwDialog::AddToAssoctable(char* table,int start,int end,int pos){
|
||||
|
||||
@@ -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, Qt::WFlags fl = 0 );
|
||||
CGenPwDialog(QWidget* parent = 0, bool modal = FALSE, Qt::WFlags fl = 0 );
|
||||
~CGenPwDialog();
|
||||
/*$PUBLIC_FUNCTIONS$*/
|
||||
|
||||
|
||||
@@ -27,8 +27,8 @@
|
||||
#include <qregexp.h>
|
||||
#include <qmessagebox.h>
|
||||
|
||||
CSearchDlg::CSearchDlg(Database* _db,CGroup* pGroup,QWidget* parent, const char* name, bool modal, Qt::WFlags fl)
|
||||
: QDialog(parent,name, modal,fl)
|
||||
CSearchDlg::CSearchDlg(Database* _db,CGroup* pGroup,QWidget* parent, bool modal, Qt::WFlags fl)
|
||||
: QDialog(parent,fl)
|
||||
{
|
||||
setupUi(this);
|
||||
connect( Button_Search, SIGNAL( clicked() ), this, SLOT( OnButtonSearch() ) );
|
||||
@@ -114,10 +114,10 @@ done(1);
|
||||
bool CSearchDlg::search(const QString& str){
|
||||
|
||||
if(regexp){
|
||||
QRegExp exp(txt,checkBox_Cs->isChecked());
|
||||
QRegExp exp(txt,checkBox_Cs->isChecked() ? Qt::CaseSensitive : Qt::CaseInsensitive);
|
||||
if(str.contains(exp)==0)return false;}
|
||||
else{
|
||||
if(str.contains(txt,checkBox_Cs->isChecked())==0)return false;}
|
||||
if(str.contains(txt,checkBox_Cs->isChecked() ? Qt::CaseSensitive : Qt::CaseInsensitive)==0)return false;}
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ class CSearchDlg : public QDialog, public Ui_Search_Dlg
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
CSearchDlg(Database* _db, CGroup* pGroup=NULL,QWidget* parent = 0, const char* name = 0,
|
||||
CSearchDlg(Database* _db, CGroup* pGroup=NULL,QWidget* parent = 0,
|
||||
bool modal = FALSE, Qt::WFlags fl = 0 );
|
||||
~CSearchDlg();
|
||||
QList<quint32> Hits;
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
|
||||
|
||||
CSelectIconDlg::CSelectIconDlg(Database* database,int CurrentID,QWidget* parent,const char* name, bool modal, Qt::WFlags fl):QDialog(parent,name,modal,fl){
|
||||
CSelectIconDlg::CSelectIconDlg(Database* database,int CurrentID,QWidget* parent, bool modal, Qt::WFlags fl):QDialog(parent,fl){
|
||||
setupUi(this);
|
||||
db=database;
|
||||
CtxMenu=new QMenu(this);
|
||||
@@ -122,4 +122,4 @@ done(-1);
|
||||
void CSelectIconDlg::OnSelectionChanged(QListWidgetItem* cur,QListWidgetItem* prev){
|
||||
Button_PickIcon->setEnabled(cur);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
class CSelectIconDlg:public QDialog, public Ui_SelectIconDlg{
|
||||
Q_OBJECT
|
||||
public:
|
||||
CSelectIconDlg(Database* db,int,QWidget* parent = 0, const char* name = 0, bool modal = false, Qt::WFlags fl = 0);
|
||||
CSelectIconDlg(Database* db,int,QWidget* parent = 0, bool modal = false, Qt::WFlags fl = 0);
|
||||
|
||||
public slots:
|
||||
void OnAddIcon();
|
||||
@@ -54,4 +54,4 @@ protected:
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
#include "PwmConfig.h"
|
||||
#include "SimplePasswordDlg.h"
|
||||
|
||||
CSimplePasswordDialog::CSimplePasswordDialog(QWidget* parent, const char* name, bool modal, Qt::WFlags fl)
|
||||
: QDialog(parent,name, modal,fl)
|
||||
CSimplePasswordDialog::CSimplePasswordDialog(QWidget* parent, bool modal, Qt::WFlags fl)
|
||||
: QDialog(parent,fl)
|
||||
{
|
||||
setupUi(this);
|
||||
if(!config.ShowPasswords)Button_HidePassword->toggle();
|
||||
|
||||
@@ -28,7 +28,7 @@ class CSimplePasswordDialog : public QDialog, public Ui_SimplePasswordDialog
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
CSimplePasswordDialog(QWidget* parent = 0, const char* name = 0, bool modal = FALSE, Qt::WFlags fl = 0 );
|
||||
CSimplePasswordDialog(QWidget* parent = 0, bool modal = FALSE, Qt::WFlags fl = 0 );
|
||||
~CSimplePasswordDialog();
|
||||
/*$PUBLIC_FUNCTIONS$*/
|
||||
|
||||
|
||||
Reference in New Issue
Block a user