mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-01-14 16:57:32 -05:00
Add properties tab in EditEntryWidget.
This commit is contained in:
parent
afe2c00841
commit
ff0d53d945
@ -21,6 +21,7 @@
|
|||||||
#include "ui_EditEntryWidgetHistory.h"
|
#include "ui_EditEntryWidgetHistory.h"
|
||||||
#include "ui_EditEntryWidgetMain.h"
|
#include "ui_EditEntryWidgetMain.h"
|
||||||
#include "ui_EditEntryWidgetNotes.h"
|
#include "ui_EditEntryWidgetNotes.h"
|
||||||
|
#include "ui_EditWidgetProperties.h"
|
||||||
#include "ui_EditWidget.h"
|
#include "ui_EditWidget.h"
|
||||||
#include "ui_EditWidgetIcons.h"
|
#include "ui_EditWidgetIcons.h"
|
||||||
|
|
||||||
@ -50,12 +51,14 @@ EditEntryWidget::EditEntryWidget(QWidget* parent)
|
|||||||
, 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_propertiesUi(new Ui::EditWidgetProperties())
|
||||||
, m_mainWidget(new QWidget())
|
, m_mainWidget(new QWidget())
|
||||||
, m_notesWidget(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())
|
||||||
, m_historyWidget(new QWidget())
|
, m_historyWidget(new QWidget())
|
||||||
|
, m_editWidgetProperties(new QWidget())
|
||||||
, m_entryAttachments(new EntryAttachments(this))
|
, m_entryAttachments(new EntryAttachments(this))
|
||||||
, m_attachmentsModel(new EntryAttachmentsModel(m_advancedWidget))
|
, m_attachmentsModel(new EntryAttachmentsModel(m_advancedWidget))
|
||||||
, m_entryAttributes(new EntryAttributes(this))
|
, m_entryAttributes(new EntryAttributes(this))
|
||||||
@ -81,6 +84,9 @@ EditEntryWidget::EditEntryWidget(QWidget* parent)
|
|||||||
m_autoTypeUi->setupUi(m_autoTypeWidget);
|
m_autoTypeUi->setupUi(m_autoTypeWidget);
|
||||||
add(tr("Auto-Type"), m_autoTypeWidget);
|
add(tr("Auto-Type"), m_autoTypeWidget);
|
||||||
|
|
||||||
|
m_propertiesUi->setupUi(m_editWidgetProperties);
|
||||||
|
add(tr("Properties"), m_editWidgetProperties);
|
||||||
|
|
||||||
// when adding a new row, update setRowHidden() call
|
// when adding a new row, update setRowHidden() call
|
||||||
|
|
||||||
m_historyUi->setupUi(m_historyWidget);
|
m_historyUi->setupUi(m_historyWidget);
|
||||||
@ -250,7 +256,7 @@ void EditEntryWidget::loadEntry(Entry* entry, bool create, bool history, const Q
|
|||||||
setForms(entry);
|
setForms(entry);
|
||||||
|
|
||||||
setCurrentRow(0);
|
setCurrentRow(0);
|
||||||
setRowHidden(5, m_history);
|
setRowHidden(6, m_history);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EditEntryWidget::setForms(const Entry* entry, bool restore)
|
void EditEntryWidget::setForms(const Entry* entry, bool restore)
|
||||||
@ -346,6 +352,15 @@ void EditEntryWidget::setForms(const Entry* entry, bool restore)
|
|||||||
|
|
||||||
updateHistoryButtons(m_historyUi->historyView->currentIndex(), QModelIndex());
|
updateHistoryButtons(m_historyUi->historyView->currentIndex(), QModelIndex());
|
||||||
|
|
||||||
|
QString timeFormat("d MMM yyyy HH:mm:ss");
|
||||||
|
m_propertiesUi->modifiedEdit->setText(
|
||||||
|
entry->timeInfo().lastModificationTime().toLocalTime().toString(timeFormat));
|
||||||
|
m_propertiesUi->createdEdit->setText(
|
||||||
|
entry->timeInfo().creationTime().toLocalTime().toString(timeFormat));
|
||||||
|
m_propertiesUi->accessedEdit->setText(
|
||||||
|
entry->timeInfo().lastAccessTime().toLocalTime().toString(timeFormat));
|
||||||
|
m_propertiesUi->uuidEdit->setText(entry->uuid().toHex());
|
||||||
|
|
||||||
m_mainUi->titleEdit->setFocus();
|
m_mainUi->titleEdit->setFocus();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -44,6 +44,7 @@ namespace Ui {
|
|||||||
class EditEntryWidgetMain;
|
class EditEntryWidgetMain;
|
||||||
class EditEntryWidgetHistory;
|
class EditEntryWidgetHistory;
|
||||||
class EditEntryWidgetNotes;
|
class EditEntryWidgetNotes;
|
||||||
|
class EditWidgetProperties;
|
||||||
class EditWidget;
|
class EditWidget;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -109,12 +110,14 @@ private:
|
|||||||
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;
|
||||||
|
const QScopedPointer<Ui::EditWidgetProperties> m_propertiesUi;
|
||||||
QWidget* const m_mainWidget;
|
QWidget* const m_mainWidget;
|
||||||
QWidget* const m_notesWidget;
|
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;
|
||||||
QWidget* const m_historyWidget;
|
QWidget* const m_historyWidget;
|
||||||
|
QWidget* const m_editWidgetProperties;
|
||||||
EntryAttachments* const m_entryAttachments;
|
EntryAttachments* const m_entryAttachments;
|
||||||
EntryAttachmentsModel* const m_attachmentsModel;
|
EntryAttachmentsModel* const m_attachmentsModel;
|
||||||
EntryAttributes* const m_entryAttributes;
|
EntryAttributes* const m_entryAttributes;
|
||||||
|
Loading…
Reference in New Issue
Block a user