mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-02-17 13:02:49 -05:00
parent
4daac65cc5
commit
36ad91b447
@ -181,7 +181,6 @@ set(keepassx_FORMS
|
|||||||
gui/entry/EditEntryWidgetAutoType.ui
|
gui/entry/EditEntryWidgetAutoType.ui
|
||||||
gui/entry/EditEntryWidgetHistory.ui
|
gui/entry/EditEntryWidgetHistory.ui
|
||||||
gui/entry/EditEntryWidgetMain.ui
|
gui/entry/EditEntryWidgetMain.ui
|
||||||
gui/entry/EditEntryWidgetNotes.ui
|
|
||||||
gui/group/EditGroupWidgetMain.ui
|
gui/group/EditGroupWidgetMain.ui
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -45,12 +45,10 @@ EditEntryWidget::EditEntryWidget(QWidget* parent)
|
|||||||
: EditWidget(parent)
|
: EditWidget(parent)
|
||||||
, m_entry(Q_NULLPTR)
|
, m_entry(Q_NULLPTR)
|
||||||
, m_mainUi(new Ui::EditEntryWidgetMain())
|
, m_mainUi(new Ui::EditEntryWidgetMain())
|
||||||
, m_notesUi(new Ui::EditEntryWidgetNotes())
|
|
||||||
, m_advancedUi(new Ui::EditEntryWidgetAdvanced())
|
, m_advancedUi(new Ui::EditEntryWidgetAdvanced())
|
||||||
, m_autoTypeUi(new Ui::EditEntryWidgetAutoType())
|
, m_autoTypeUi(new Ui::EditEntryWidgetAutoType())
|
||||||
, m_historyUi(new Ui::EditEntryWidgetHistory())
|
, m_historyUi(new Ui::EditEntryWidgetHistory())
|
||||||
, m_mainWidget(new QWidget())
|
, m_mainWidget(new QWidget())
|
||||||
, m_notesWidget(new QWidget())
|
|
||||||
, m_advancedWidget(new QWidget())
|
, m_advancedWidget(new QWidget())
|
||||||
, m_iconsWidget(new EditWidgetIcons())
|
, m_iconsWidget(new EditWidgetIcons())
|
||||||
, m_autoTypeWidget(new QWidget())
|
, m_autoTypeWidget(new QWidget())
|
||||||
@ -68,7 +66,6 @@ EditEntryWidget::EditEntryWidget(QWidget* parent)
|
|||||||
, m_autoTypeWindowSequenceGroup(new QButtonGroup(this))
|
, m_autoTypeWindowSequenceGroup(new QButtonGroup(this))
|
||||||
{
|
{
|
||||||
setupMain();
|
setupMain();
|
||||||
setupNotes();
|
|
||||||
setupAdvanced();
|
setupAdvanced();
|
||||||
setupIcon();
|
setupIcon();
|
||||||
setupAutoType();
|
setupAutoType();
|
||||||
@ -100,12 +97,6 @@ void EditEntryWidget::setupMain()
|
|||||||
connect(m_mainUi->expirePresets->menu(), SIGNAL(triggered(QAction*)), this, SLOT(useExpiryPreset(QAction*)));
|
connect(m_mainUi->expirePresets->menu(), SIGNAL(triggered(QAction*)), this, SLOT(useExpiryPreset(QAction*)));
|
||||||
}
|
}
|
||||||
|
|
||||||
void EditEntryWidget::setupNotes()
|
|
||||||
{
|
|
||||||
m_notesUi->setupUi(m_notesWidget);
|
|
||||||
add(tr("Description"), m_notesWidget);
|
|
||||||
}
|
|
||||||
|
|
||||||
void EditEntryWidget::setupAdvanced()
|
void EditEntryWidget::setupAdvanced()
|
||||||
{
|
{
|
||||||
m_advancedUi->setupUi(m_advancedWidget);
|
m_advancedUi->setupUi(m_advancedWidget);
|
||||||
@ -284,7 +275,7 @@ void EditEntryWidget::setForms(const Entry* entry, bool restore)
|
|||||||
m_mainUi->passwordRepeatEdit->setReadOnly(m_history);
|
m_mainUi->passwordRepeatEdit->setReadOnly(m_history);
|
||||||
m_mainUi->expireCheck->setEnabled(!m_history);
|
m_mainUi->expireCheck->setEnabled(!m_history);
|
||||||
m_mainUi->expireDatePicker->setReadOnly(m_history);
|
m_mainUi->expireDatePicker->setReadOnly(m_history);
|
||||||
m_notesUi->notesEdit->setReadOnly(m_history);
|
m_mainUi->notesEdit->setReadOnly(m_history);
|
||||||
m_advancedUi->addAttachmentButton->setEnabled(!m_history);
|
m_advancedUi->addAttachmentButton->setEnabled(!m_history);
|
||||||
m_advancedUi->removeAttachmentButton->setEnabled(!m_history);
|
m_advancedUi->removeAttachmentButton->setEnabled(!m_history);
|
||||||
m_advancedUi->addAttributeButton->setEnabled(!m_history);
|
m_advancedUi->addAttributeButton->setEnabled(!m_history);
|
||||||
@ -316,7 +307,7 @@ void EditEntryWidget::setForms(const Entry* entry, bool restore)
|
|||||||
m_mainUi->expirePresets->setEnabled(!m_history);
|
m_mainUi->expirePresets->setEnabled(!m_history);
|
||||||
m_mainUi->togglePasswordButton->setChecked(true);
|
m_mainUi->togglePasswordButton->setChecked(true);
|
||||||
|
|
||||||
m_notesUi->notesEdit->setPlainText(entry->notes());
|
m_mainUi->notesEdit->setPlainText(entry->notes());
|
||||||
|
|
||||||
m_entryAttachments->copyDataFrom(entry->attachments());
|
m_entryAttachments->copyDataFrom(entry->attachments());
|
||||||
m_entryAttributes->copyCustomKeysFrom(entry->attributes());
|
m_entryAttributes->copyCustomKeysFrom(entry->attributes());
|
||||||
@ -412,7 +403,7 @@ void EditEntryWidget::saveEntry()
|
|||||||
m_entry->setExpires(m_mainUi->expireCheck->isChecked());
|
m_entry->setExpires(m_mainUi->expireCheck->isChecked());
|
||||||
m_entry->setExpiryTime(m_mainUi->expireDatePicker->dateTime().toUTC());
|
m_entry->setExpiryTime(m_mainUi->expireDatePicker->dateTime().toUTC());
|
||||||
|
|
||||||
m_entry->setNotes(m_notesUi->notesEdit->toPlainText());
|
m_entry->setNotes(m_mainUi->notesEdit->toPlainText());
|
||||||
|
|
||||||
m_entry->attributes()->copyCustomKeysFrom(m_entryAttributes);
|
m_entry->attributes()->copyCustomKeysFrom(m_entryAttributes);
|
||||||
m_entry->attachments()->copyDataFrom(m_entryAttachments);
|
m_entry->attachments()->copyDataFrom(m_entryAttachments);
|
||||||
|
@ -44,7 +44,6 @@ namespace Ui {
|
|||||||
class EditEntryWidgetAutoType;
|
class EditEntryWidgetAutoType;
|
||||||
class EditEntryWidgetMain;
|
class EditEntryWidgetMain;
|
||||||
class EditEntryWidgetHistory;
|
class EditEntryWidgetHistory;
|
||||||
class EditEntryWidgetNotes;
|
|
||||||
class EditWidget;
|
class EditWidget;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -97,7 +96,6 @@ private Q_SLOTS:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
void setupMain();
|
void setupMain();
|
||||||
void setupNotes();
|
|
||||||
void setupAdvanced();
|
void setupAdvanced();
|
||||||
void setupIcon();
|
void setupIcon();
|
||||||
void setupAutoType();
|
void setupAutoType();
|
||||||
@ -114,12 +112,10 @@ private:
|
|||||||
bool m_create;
|
bool m_create;
|
||||||
bool m_history;
|
bool m_history;
|
||||||
const QScopedPointer<Ui::EditEntryWidgetMain> m_mainUi;
|
const QScopedPointer<Ui::EditEntryWidgetMain> m_mainUi;
|
||||||
const QScopedPointer<Ui::EditEntryWidgetNotes> m_notesUi;
|
|
||||||
const QScopedPointer<Ui::EditEntryWidgetAdvanced> m_advancedUi;
|
const QScopedPointer<Ui::EditEntryWidgetAdvanced> m_advancedUi;
|
||||||
const QScopedPointer<Ui::EditEntryWidgetAutoType> m_autoTypeUi;
|
const QScopedPointer<Ui::EditEntryWidgetAutoType> m_autoTypeUi;
|
||||||
const QScopedPointer<Ui::EditEntryWidgetHistory> m_historyUi;
|
const QScopedPointer<Ui::EditEntryWidgetHistory> m_historyUi;
|
||||||
QWidget* const m_mainWidget;
|
QWidget* const m_mainWidget;
|
||||||
QWidget* const m_notesWidget;
|
|
||||||
QWidget* const m_advancedWidget;
|
QWidget* const m_advancedWidget;
|
||||||
EditWidgetIcons* const m_iconsWidget;
|
EditWidgetIcons* const m_iconsWidget;
|
||||||
QWidget* const m_autoTypeWidget;
|
QWidget* const m_autoTypeWidget;
|
||||||
|
@ -89,6 +89,13 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="5" column="0">
|
||||||
|
<widget class="QCheckBox" name="expireCheck">
|
||||||
|
<property name="text">
|
||||||
|
<string>Expires</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item row="5" column="1">
|
<item row="5" column="1">
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||||
<item>
|
<item>
|
||||||
@ -110,10 +117,20 @@
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item row="5" column="0">
|
<item row="6" column="0">
|
||||||
<widget class="QCheckBox" name="expireCheck">
|
<widget class="QLabel" name="notesLabel">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Expires</string>
|
<string>Notes:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="6" column="1">
|
||||||
|
<widget class="QPlainTextEdit" name="notesEdit">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>1</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
@ -1,28 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<ui version="4.0">
|
|
||||||
<class>EditEntryWidgetNotes</class>
|
|
||||||
<widget class="QWidget" name="EditEntryWidgetNotes">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>0</x>
|
|
||||||
<y>0</y>
|
|
||||||
<width>400</width>
|
|
||||||
<height>300</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="notesLabel">
|
|
||||||
<property name="text">
|
|
||||||
<string>Notes:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QPlainTextEdit" name="notesEdit"/>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
<resources/>
|
|
||||||
<connections/>
|
|
||||||
</ui>
|
|
Loading…
x
Reference in New Issue
Block a user