Пример #1
0
AboutDialog::AboutDialog(QWidget* parent):QDialog(parent)
{
	setupUi(this);
	createBanner(&BannerPixmap,getPixmap("keepassx"),QString("%1 %2").arg(APP_DISPLAY_NAME, APP_VERSION),width());

    labelAppName->setText(APP_DISPLAY_NAME);
    labelAppFunc->setText(QString(" -  ").append(APP_LONG_FUNC));

	QString AboutTr=QString("<b>%1: %2</b><br><br>").arg(tr("Current Translation")).arg(tr("None","Please replace 'None' with the language of your translation"));
	if(isTranslationActive()){
		AboutTr+=QString("<b>%1:</b> %2<br>").arg(tr("Author")).arg(QApplication::translate("Translation", "$TRANSLATION_AUTHOR"));
		QString mail=QApplication::translate("Translation", "$TRANSLATION_AUTHOR_EMAIL","Here you can enter your email or homepage if you want.");
		if(!mail.isEmpty()){
			AboutTr+=mail+"<br>";
		}
		AboutTr+="<br>";
	}
	Edit_Translation->setHtml(AboutTr+tr("Information on how to translate KeePassX can be found under:")
		+"<br>http://www.keepassx.org/");
	QString str;
	str+="<b>"+tr("Team")+"</b><br>";
	str+="<div style='margin-left:10px;'>";
	str+="<u>Tarek Saidi</u><br>"+tr("Developer, Project Admin")+"<br>[email protected]<br>";
	str+="<br>";
	str+="<u>Felix Geyer</u><br>"+tr("Developer, Project Admin")+"<br>[email protected]<br>";
	str+="<br>";
	str+="<u>Brandon Mayes</u><br>"+tr("Developer")+"<br>[email protected]<br>";
	str+="<br>";
	str+="<u>Eugen Gorschenin</u><br>"+tr("Web Designer")+"<br>[email protected]<br>";
	str+="<br>";
	str+="<u>Juan J Gonz&aacute;lez C&aacute;rdenas [Jota Jota]</u><br>"+tr("Developer")+"<br>[email protected]<br>";
	str+="</div><br><div style='margin-left:0px;'>";
        str+="<b>"+tr("Thanks To")+"</b><br>";
	str+="</div><div style='margin-left:10px;'>";
	str+="<u>Matthias Miller</u><br>"+tr("Patches for better MacOS X support")+"<br>www.outofhanwell.com<br>";
	str+="<br>";
	str+="<u>James Nicholls</u><br>"+tr("Main Application Icon")/*+"<br>"+tr("mailto:???")*/+"<br>";
	str+="<br>";
	str+="<u>Constantin Makshin</u><br>"+tr("Various fixes and improvements")+"<br>[email protected]<br>";
        str+="<br>";
        str+="<u>Lev Shamardin</u><br>"+tr("Lock with dialogs option")+"<br>[email protected]<br>";
        str += "</div>";
	Edit_Thanks->setHtml(str);
	
	QFile gpl(DataDir+"/license.html");
	if (!gpl.open(QIODevice::ReadOnly)){
		QMessageBox::critical(this,tr("Error"),tr("File '%1' could not be found.")
				.arg("'license.html'")+"\n"+tr("Make sure that the program is installed correctly.")
				,tr("OK"),0,0,2,1);
	}
	
	Edit_License->setHtml(QString::fromUtf8(gpl.readAll()));
	
	connect(ButtonBox, SIGNAL(rejected()), SLOT(close()));
}
Пример #2
0
void CSettingsDlg::OnColor1()
{
	QColor c=QColorDialog::getColor(color1,this);
	if(c.isValid()){
		color1=c;
		QPixmap *px=new QPixmap(pixmColor1->width(),pixmColor1->height());
		px->fill(c);
		pixmColor1->clear();
		pixmColor1->setPixmap(*px);
		createBanner(&BannerPixmap,getPixmap("appsettings"),tr("Settings"),width(),color1,color2,textcolor);
	}
}
Пример #3
0
AddBookmarkDlg::AddBookmarkDlg(QWidget* parent, QString DefaultFilename, int _ItemID):QDialog(parent)
{
	setupUi(this);
	ItemID=_ItemID;
	connect(Button_Browse,SIGNAL(clicked()),this,SLOT(OnButtonBrowse()));
	connect(buttonBox->button(QDialogButtonBox::Ok),SIGNAL(clicked()),this,SLOT(OnButtonOk()));
	connect(buttonBox->button(QDialogButtonBox::Cancel),SIGNAL(clicked()),this,SLOT(reject()));
	if(ItemID==-1){
        createBanner(&BannerPixmap,getPixmap("bookmark_add"),tr("Add Bookmark"),width());

		if(DefaultFilename.isEmpty())
			OnButtonBrowse();
		else
			Edit_Filename->setText(DefaultFilename);
	}
	else {
        createBanner(&BannerPixmap,getPixmap("bookmark_edit"),tr("Edit Bookmark"),width());

        Edit_Title->setText(KpxBookmarks::title(ItemID));
		Edit_Filename->setText(KpxBookmarks::path(ItemID));
		setWindowTitle(tr("Edit Bookmark"));
	}
}
Пример #4
0
void MainWidget::initObject()
{
    //主布局;
    m_frmMain = new QFrame(this);
    m_glayoutMain = new QGridLayout(m_frmMain);
    m_glayoutMain->setContentsMargins(1,1,1,1);

    //banner栏;
    createBanner(sWindowTitle,
                 tr("通过邮票,可以对在线的邮政购物,进行快速的邮票抢购!"),
                 ":/res/stamptitle.png");
    m_btnLoadData=new QPushButton(this);
    m_btnLoadData->setText(tr("导入数据"));
    m_btnLogin = new QPushButton(this);
    m_btnLogin->setText("登陆");
    m_btnLoadData->setMaximumWidth(300);
    m_btnGrap = new QPushButton(this);
    m_btnGrap->setText(tr("抢购"));
    m_ldtGrapNum = new QLineEdit(this);
    m_ldtGrapNum->setMaximumWidth(200);
    m_ldtNetAddr=new QLineEdit(this);
    m_cbxNowAddr=new QComboBox(this);
    m_cbxNowAddr->setMaximumWidth(200);
    m_cbxNowAddr->addItem(tr("中国邮政网上营业厅"));
    m_tbWidget=new QTableWidget(this);
    m_tbWidget->setEditTriggers(QAbstractItemView::NoEditTriggers);
    m_tbWidget->setSelectionBehavior(QAbstractItemView::SelectRows);
    m_tbWidget->setContextMenuPolicy(Qt::CustomContextMenu);
    //2. 刷新头
    QStringList slHeaderList;
    slHeaderList.clear();
    slHeaderList<<tr("账号")<<tr("密码")<<tr("接收手机")<<tr("验证码")
               <<tr("登陆状态")<<tr("下单状态");

    //3. 设置列表配置
    m_tbWidget->setColumnCount(6);
    m_tbWidget->setColumnWidth(0,150);
    m_tbWidget->setColumnWidth(1,150);
    m_tbWidget->setColumnWidth(2,120);
    m_tbWidget->setColumnWidth(3,120);
    m_tbWidget->setColumnWidth(4,140);
    m_tbWidget->setColumnWidth(5,90);
    m_tbWidget->setHorizontalHeaderLabels(slHeaderList);
    m_tbWidget->horizontalHeader()->setStretchLastSection(true);  //最后拖拉
    setMainLayout();

    connect(m_btnLoadData,SIGNAL(clicked()),this,SLOT(slotClickLoadData()));
}
Пример #5
0
CDbSettingsDlg::CDbSettingsDlg(QWidget* parent,IDatabase* db,  bool modal, Qt::WFlags fl)
: QDialog(parent,fl)
{
	setupUi(this);
	database=dynamic_cast<IKdbSettings*>(db);
	adjustSize();
	setMaximumSize(size());
	setMinimumSize(size());
	createBanner(&BannerPixmap,getPixmap("appsettings"),tr("Settings"),width());
	ComboAlgo->insertItem(0,tr("AES(Rijndael):  256 Bit   (default)"));
	ComboAlgo->insertItem(1,tr("Twofish:  256 Bit"));
	ComboAlgo->setCurrentIndex(database->cryptAlgorithm()); //Achtung: AlgoID muss gleich dem ComboBox Index sein!
	EditRounds->setText(QString::number(database->keyTransfRounds()));		
	connect( ButtonBox, SIGNAL( accepted() ), this, SLOT( OnOK() ) );
	connect( ButtonBox, SIGNAL( rejected() ), this, SLOT( OnCancel() ) );
}
Пример #6
0
void AutoTypeDlg::resizeEvent(QResizeEvent* event){
	createBanner(&BannerPixmap,getPixmap("keepassx_large"),tr("Auto-Type"),width());
}
Пример #7
0
void createBanner(QPixmap* Pixmap,const QPixmap* IconAlpha,const QString& Text,int Width){
	createBanner(Pixmap,IconAlpha,Text,Width,config->bannerColor1(),config->bannerColor2(),config->bannerTextColor());
}
Пример #8
0
void CSettingsDlg::resizeEvent(QResizeEvent* event){
	createBanner(&BannerPixmap,getPixmap("appsettings"),tr("Settings"),width());
	QDialog::resizeEvent(event);
}
Пример #9
0
void ManageBookmarksDlg::resizeEvent(QResizeEvent* event){
	createBanner(&BannerPixmap,getPixmap("bookmark"),tr("Manage Bookmarks"),width());
	QDialog::resizeEvent(event);
}