- fixes to time tree related dialogs
- more widgets for improved UI
This commit is contained in:
parent
a1bd0c3d37
commit
13e00590b1
@ -75,7 +75,9 @@ SOURCES += main.cpp\
|
|||||||
findsupport.cpp \
|
findsupport.cpp \
|
||||||
stopworkdialog.cpp \
|
stopworkdialog.cpp \
|
||||||
startworkdialog.cpp \
|
startworkdialog.cpp \
|
||||||
twofish.cpp
|
twofish.cpp \
|
||||||
|
openorcreatedb_widget.cpp \
|
||||||
|
connectdb_widget.cpp
|
||||||
|
|
||||||
HEADERS += mainwindow.h \
|
HEADERS += mainwindow.h \
|
||||||
storage.h \
|
storage.h \
|
||||||
@ -116,7 +118,9 @@ HEADERS += mainwindow.h \
|
|||||||
findsupport.h \
|
findsupport.h \
|
||||||
stopworkdialog.h \
|
stopworkdialog.h \
|
||||||
startworkdialog.h \
|
startworkdialog.h \
|
||||||
twofish.h
|
twofish.h \
|
||||||
|
openorcreatedb_widget.h \
|
||||||
|
connectdb_widget.h
|
||||||
|
|
||||||
FORMS += mainwindow.ui \
|
FORMS += mainwindow.ui \
|
||||||
newpassworddlg.ui \
|
newpassworddlg.ui \
|
||||||
@ -129,7 +133,9 @@ FORMS += mainwindow.ui \
|
|||||||
attachmentsdialog.ui \
|
attachmentsdialog.ui \
|
||||||
finddialog.ui \
|
finddialog.ui \
|
||||||
stopworkdialog.ui \
|
stopworkdialog.ui \
|
||||||
startworkdialog.ui
|
startworkdialog.ui \
|
||||||
|
openorcreatedb_widget.ui \
|
||||||
|
connectdb_widget.ui
|
||||||
|
|
||||||
RESOURCES = mainwindow.qrc resources/qdarkstyle/style.qrc
|
RESOURCES = mainwindow.qrc resources/qdarkstyle/style.qrc
|
||||||
|
|
||||||
|
|||||||
14
client/connectdb_widget.cpp
Normal file
14
client/connectdb_widget.cpp
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
#include "connectdb_widget.h"
|
||||||
|
#include "ui_connectdb_widget.h"
|
||||||
|
|
||||||
|
ConnectDbWidget::ConnectDbWidget(QWidget *parent) :
|
||||||
|
QWidget(parent),
|
||||||
|
ui(new Ui::ConnectDbWidget)
|
||||||
|
{
|
||||||
|
ui->setupUi(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
ConnectDbWidget::~ConnectDbWidget()
|
||||||
|
{
|
||||||
|
delete ui;
|
||||||
|
}
|
||||||
22
client/connectdb_widget.h
Normal file
22
client/connectdb_widget.h
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
#ifndef CONNECTDB_WIDGET_H
|
||||||
|
#define CONNECTDB_WIDGET_H
|
||||||
|
|
||||||
|
#include <QWidget>
|
||||||
|
|
||||||
|
namespace Ui {
|
||||||
|
class ConnectDbWidget;
|
||||||
|
}
|
||||||
|
|
||||||
|
class ConnectDbWidget : public QWidget
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
explicit ConnectDbWidget(QWidget *parent = nullptr);
|
||||||
|
~ConnectDbWidget();
|
||||||
|
|
||||||
|
private:
|
||||||
|
Ui::ConnectDbWidget *ui;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // CONNECTDB_WIDGET_H
|
||||||
44
client/connectdb_widget.ui
Normal file
44
client/connectdb_widget.ui
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<ui version="4.0">
|
||||||
|
<class>ConnectDbWidget</class>
|
||||||
|
<widget class="QWidget" name="ConnectDbWidget">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>277</width>
|
||||||
|
<height>114</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="windowTitle">
|
||||||
|
<string>Form</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout">
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="mPasswordLabel">
|
||||||
|
<property name="text">
|
||||||
|
<string>Please type in password here:</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLineEdit" name="mPasswordEdit"/>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QDialogButtonBox" name="mButtonBox">
|
||||||
|
<property name="standardButtons">
|
||||||
|
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
||||||
|
</property>
|
||||||
|
<property name="centerButtons">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<resources/>
|
||||||
|
<connections/>
|
||||||
|
</ui>
|
||||||
14
client/openorcreatedb_widget.cpp
Normal file
14
client/openorcreatedb_widget.cpp
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
#include "openorcreatedb_widget.h"
|
||||||
|
#include "ui_openorcreatedb_widget.h"
|
||||||
|
|
||||||
|
OpenOrCreateDbWidget::OpenOrCreateDbWidget(QWidget *parent) :
|
||||||
|
QWidget(parent),
|
||||||
|
ui(new Ui::OpenOrCreateDbWidget)
|
||||||
|
{
|
||||||
|
ui->setupUi(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
OpenOrCreateDbWidget::~OpenOrCreateDbWidget()
|
||||||
|
{
|
||||||
|
delete ui;
|
||||||
|
}
|
||||||
22
client/openorcreatedb_widget.h
Normal file
22
client/openorcreatedb_widget.h
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
#ifndef OPENORCREATEDB_WIDGET_H
|
||||||
|
#define OPENORCREATEDB_WIDGET_H
|
||||||
|
|
||||||
|
#include <QWidget>
|
||||||
|
|
||||||
|
namespace Ui {
|
||||||
|
class OpenOrCreateDbWidget;
|
||||||
|
}
|
||||||
|
|
||||||
|
class OpenOrCreateDbWidget : public QWidget
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
explicit OpenOrCreateDbWidget(QWidget *parent = nullptr);
|
||||||
|
~OpenOrCreateDbWidget();
|
||||||
|
|
||||||
|
private:
|
||||||
|
Ui::OpenOrCreateDbWidget *ui;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // OPENORCREATEDB_WIDGET_H
|
||||||
120
client/openorcreatedb_widget.ui
Normal file
120
client/openorcreatedb_widget.ui
Normal file
@ -0,0 +1,120 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<ui version="4.0">
|
||||||
|
<class>OpenOrCreateDbWidget</class>
|
||||||
|
<widget class="QWidget" name="OpenOrCreateDbWidget">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>549</width>
|
||||||
|
<height>384</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="windowTitle">
|
||||||
|
<string>Form</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout">
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="mPasswordHintLabel">
|
||||||
|
<property name="text">
|
||||||
|
<string><html><head/><body><p>Please enter new password twice to complete database creation.</p> <p>Please be aware - there is no way to recover lost password.</p></body></html></string>
|
||||||
|
</property>
|
||||||
|
<property name="wordWrap">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QFormLayout" name="formLayout">
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QLabel" name="mNewPasswordLabel1">
|
||||||
|
<property name="text">
|
||||||
|
<string>Password:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="1">
|
||||||
|
<widget class="QLineEdit" name="mNewPasswordEdit1">
|
||||||
|
<property name="inputMethodHints">
|
||||||
|
<set>Qt::ImhHiddenText|Qt::ImhNoAutoUppercase|Qt::ImhNoPredictiveText|Qt::ImhSensitiveData</set>
|
||||||
|
</property>
|
||||||
|
<property name="echoMode">
|
||||||
|
<enum>QLineEdit::Password</enum>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="QLabel" name="mNewPasswordLabel2">
|
||||||
|
<property name="text">
|
||||||
|
<string>Repeat password:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="1">
|
||||||
|
<widget class="QLineEdit" name="mNewPasswordEdit2">
|
||||||
|
<property name="echoMode">
|
||||||
|
<enum>QLineEdit::Password</enum>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label">
|
||||||
|
<property name="text">
|
||||||
|
<string>OR</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="mSelectDatabaseLabel">
|
||||||
|
<property name="text">
|
||||||
|
<string>Select existing database file:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="mSelectDatabaseButton">
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>100</width>
|
||||||
|
<height>16777215</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Open</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="mSelectedDbLabel">
|
||||||
|
<property name="text">
|
||||||
|
<string><Not selected yet></string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QDialogButtonBox" name="mDialogButtonBox">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="standardButtons">
|
||||||
|
<set>QDialogButtonBox::Ok</set>
|
||||||
|
</property>
|
||||||
|
<property name="centerButtons">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<resources/>
|
||||||
|
<connections/>
|
||||||
|
</ui>
|
||||||
@ -9,7 +9,7 @@
|
|||||||
TimeIntervalDlg::TimeIntervalDlg(QWidget *parent, TimeTreeModel* model, PTimeLine timeline, Type type, const TimeRecord& interval) :
|
TimeIntervalDlg::TimeIntervalDlg(QWidget *parent, TimeTreeModel* model, PTimeLine timeline, Type type, const TimeRecord& interval) :
|
||||||
QDialog(parent, Qt::Sheet),
|
QDialog(parent, Qt::Sheet),
|
||||||
ui(new Ui::TimeIntervalDlg),
|
ui(new Ui::TimeIntervalDlg),
|
||||||
mModel(model), mTimeline(timeline), mType(type), mInterval(interval)
|
mTimeline(timeline), mType(type), mInterval(interval), mModel(model)
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
connect(ui->mStartTimeEdit, SIGNAL(dateTimeChanged(QDateTime)), this, SLOT(dataChanged(QDateTime)));
|
connect(ui->mStartTimeEdit, SIGNAL(dateTimeChanged(QDateTime)), this, SLOT(dataChanged(QDateTime)));
|
||||||
|
|||||||
@ -31,7 +31,7 @@ void TimeTreeDlg::addInterval()
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
QDateTime current = QDateTime::currentDateTime();
|
QDateTime current = QDateTime::currentDateTime();
|
||||||
time_t t = current.toTime_t();
|
//time_t t = current.toTime_t();
|
||||||
//helper::time time_of_day = helper::time::fromTimestamp(t, helper::date::To_LocalTime);
|
//helper::time time_of_day = helper::time::fromTimestamp(t, helper::date::To_LocalTime);
|
||||||
|
|
||||||
mTimeIntervalDlg = new TimeIntervalDlg(this, mModel, mTimeline, TimeIntervalDlg::Type::New, TimeRecord());
|
mTimeIntervalDlg = new TimeIntervalDlg(this, mModel, mTimeline, TimeIntervalDlg::Type::New, TimeRecord());
|
||||||
@ -41,6 +41,7 @@ void TimeTreeDlg::addInterval()
|
|||||||
mTimeIntervalDlg->setFinishDate(current);
|
mTimeIntervalDlg->setFinishDate(current);
|
||||||
//mTimeIntervalDlg->setModal(false);
|
//mTimeIntervalDlg->setModal(false);
|
||||||
mTimeIntervalDlg->show();
|
mTimeIntervalDlg->show();
|
||||||
|
mTimeIntervalDlg = nullptr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -314,7 +314,7 @@ QVariant TimeTreeModel::data(const QModelIndex &index, int role) const
|
|||||||
end = helper::time::fromTimestamp(tr.endTime(), helper::date::To_LocalTime);
|
end = helper::time::fromTimestamp(tr.endTime(), helper::date::To_LocalTime);
|
||||||
|
|
||||||
return QString("%1 - %2").arg(QString::fromStdString(start.toString(false)),
|
return QString("%1 - %2").arg(QString::fromStdString(start.toString(false)),
|
||||||
QString::fromStdString(start.toString(false)));
|
QString::fromStdString(end.toString(false)));
|
||||||
}
|
}
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user