mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-04-11 02:39:27 -04:00
Add convenience method EditWidget::setHeadline().
This commit is contained in:
parent
21a2e9583b
commit
82d697b657
@ -51,6 +51,11 @@ void EditWidget::setCurrentRow(int index)
|
||||
m_ui->categoryList->setCurrentRow(index);
|
||||
}
|
||||
|
||||
void EditWidget::setHeadline(const QString& text)
|
||||
{
|
||||
m_ui->headerLabel->setText(text);
|
||||
}
|
||||
|
||||
QLabel* EditWidget::headlineLabel()
|
||||
{
|
||||
return m_ui->headerLabel;
|
||||
|
@ -38,6 +38,7 @@ public:
|
||||
|
||||
void add(const QString& labelText, QWidget* widget);
|
||||
void setCurrentRow(int index);
|
||||
void setHeadline(const QString& text);
|
||||
QLabel* headlineLabel();
|
||||
|
||||
Q_SIGNALS:
|
||||
|
@ -18,14 +18,12 @@
|
||||
#include "SettingsWidget.h"
|
||||
#include "ui_SettingsWidgetSecurity.h"
|
||||
|
||||
#include <QtGui/QLabel>
|
||||
|
||||
SettingsWidget::SettingsWidget(QWidget* parent)
|
||||
: EditWidget(parent)
|
||||
, m_secWidget(new QWidget())
|
||||
, m_secUi(new Ui::SettingsWidgetSecurity())
|
||||
{
|
||||
headlineLabel()->setText(tr("Application Settings"));
|
||||
setHeadline(tr("Application Settings"));
|
||||
|
||||
m_secUi->setupUi(m_secWidget);
|
||||
add(tr("Security"), m_secWidget);
|
||||
|
@ -147,14 +147,14 @@ void EditEntryWidget::loadEntry(Entry* entry, bool create, bool history, const Q
|
||||
m_history = history;
|
||||
|
||||
if (history) {
|
||||
headlineLabel()->setText("Entry history");
|
||||
setHeadline("Entry history");
|
||||
}
|
||||
else {
|
||||
if (create) {
|
||||
headlineLabel()->setText(groupName+" > "+tr("Add entry"));
|
||||
setHeadline(groupName+" > "+tr("Add entry"));
|
||||
}
|
||||
else {
|
||||
headlineLabel()->setText(groupName+" > "+tr("Edit entry"));
|
||||
setHeadline(groupName+" > "+tr("Edit entry"));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -59,10 +59,10 @@ void EditGroupWidget::loadGroup(Group* group, bool create, Database* database)
|
||||
m_database = database;
|
||||
|
||||
if (create) {
|
||||
headlineLabel()->setText(tr("Add group"));
|
||||
setHeadline(tr("Add group"));
|
||||
}
|
||||
else {
|
||||
headlineLabel()->setText(tr("Edit group"));
|
||||
setHeadline(tr("Edit group"));
|
||||
}
|
||||
|
||||
m_mainUi->editName->setText(m_group->name());
|
||||
|
Loading…
x
Reference in New Issue
Block a user