mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-12-26 15:59:50 -05:00
Add advanced tab in group edit.
This commit is contained in:
parent
4ec9df76cd
commit
12a8662ae9
@ -131,6 +131,7 @@ set(keepassx_FORMS
|
||||
gui/entry/EditEntryWidgetHistory.ui
|
||||
gui/entry/EditEntryWidgetMain.ui
|
||||
gui/entry/EditEntryWidgetNotes.ui
|
||||
gui/group/EditGroupWidgetAdvanced.ui
|
||||
gui/group/EditGroupWidgetMain.ui
|
||||
)
|
||||
|
||||
|
@ -16,6 +16,7 @@
|
||||
*/
|
||||
|
||||
#include "EditGroupWidget.h"
|
||||
#include "ui_EditGroupWidgetAdvanced.h"
|
||||
#include "ui_EditGroupWidgetMain.h"
|
||||
#include "ui_EditWidget.h"
|
||||
|
||||
@ -25,14 +26,18 @@
|
||||
EditGroupWidget::EditGroupWidget(QWidget* parent)
|
||||
: EditWidget(parent)
|
||||
, m_mainUi(new Ui::EditGroupWidgetMain())
|
||||
, m_advancedUi(new Ui::EditGroupWidgetAdvanced())
|
||||
, m_editGroupWidgetMain(new QWidget())
|
||||
, m_editGroupWidgetIcons(new EditWidgetIcons())
|
||||
, m_editGroupWidgetAdvanced(new QWidget())
|
||||
, m_group(0)
|
||||
{
|
||||
m_mainUi->setupUi(m_editGroupWidgetMain);
|
||||
m_advancedUi->setupUi(m_editGroupWidgetAdvanced);
|
||||
|
||||
add(tr("Group"), m_editGroupWidgetMain);
|
||||
add(tr("Icon"), m_editGroupWidgetIcons);
|
||||
add(tr("Advanced"), m_editGroupWidgetAdvanced);
|
||||
|
||||
QFont labelHeaderFont = headlineLabel()->font();
|
||||
labelHeaderFont.setBold(true);
|
||||
@ -65,6 +70,14 @@ void EditGroupWidget::loadGroup(Group* group, bool create, Database* database)
|
||||
m_mainUi->editNotes->setPlainText(m_group->notes());
|
||||
m_mainUi->expireCheck->setChecked(group->timeInfo().expires());
|
||||
m_mainUi->expireDatePicker->setDateTime(group->timeInfo().expiryTime().toLocalTime());
|
||||
QString timeFormat("d MMM yyyy HH:mm:ss");
|
||||
m_advancedUi->modifiedEdit->setText(
|
||||
group->timeInfo().lastModificationTime().toLocalTime().toString(timeFormat));
|
||||
m_advancedUi->createdEdit->setText(
|
||||
group->timeInfo().creationTime().toLocalTime().toString(timeFormat));
|
||||
m_advancedUi->accessedEdit->setText(
|
||||
group->timeInfo().lastAccessTime().toLocalTime().toString(timeFormat));
|
||||
m_advancedUi->uuidEdit->setText(group->uuid().toHex());
|
||||
|
||||
IconStruct iconStruct;
|
||||
iconStruct.uuid = group->iconUuid();
|
||||
|
@ -26,6 +26,7 @@
|
||||
class EditWidgetIcons;
|
||||
|
||||
namespace Ui {
|
||||
class EditGroupWidgetAdvanced;
|
||||
class EditGroupWidgetMain;
|
||||
class EditWidget;
|
||||
}
|
||||
@ -49,8 +50,10 @@ private Q_SLOTS:
|
||||
|
||||
private:
|
||||
const QScopedPointer<Ui::EditGroupWidgetMain> m_mainUi;
|
||||
const QScopedPointer<Ui::EditGroupWidgetAdvanced> m_advancedUi;
|
||||
QWidget* const m_editGroupWidgetMain;
|
||||
EditWidgetIcons* const m_editGroupWidgetIcons;
|
||||
QWidget* const m_editGroupWidgetAdvanced;
|
||||
Group* m_group;
|
||||
Database* m_database;
|
||||
|
||||
|
104
src/gui/group/EditGroupWidgetAdvanced.ui
Normal file
104
src/gui/group/EditGroupWidgetAdvanced.ui
Normal file
@ -0,0 +1,104 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>EditGroupWidgetAdvanced</class>
|
||||
<widget class="QWidget" name="EditGroupWidgetAdvanced">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>614</width>
|
||||
<height>328</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<layout class="QFormLayout" name="formLayout">
|
||||
<property name="fieldGrowthPolicy">
|
||||
<enum>QFormLayout::ExpandingFieldsGrow</enum>
|
||||
</property>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLineEdit" name="createdEdit">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="frame">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QLineEdit" name="modifiedEdit">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="frame">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Created:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Modified:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>Accessed:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QLineEdit" name="accessedEdit">
|
||||
<property name="frame">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="text">
|
||||
<string>Uuid:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="QLineEdit" name="uuidEdit">
|
||||
<property name="frame">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
Loading…
Reference in New Issue
Block a user