- version 0.9.0 - dark mode + fixes

This commit is contained in:
Dmytro Bogovych 2018-10-05 18:20:40 +03:00
parent ac361789ae
commit 305cde325f
112 changed files with 13189 additions and 2249 deletions

View File

@ -1,3 +0,0 @@
1) Save & load columns width in time table
2) Make hierarchical time table
3) Add tray icon

View File

@ -34,3 +34,30 @@ QMAKE_MAC_SDK.macx-clang.macosx10.12.QMAKE_RANLIB = \
QMAKE_MAC_SDK.macx-clang.macosx10.12.QMAKE_LINK = /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++
QMAKE_MAC_SDK.macx-clang.macosx10.12.QMAKE_LINK_SHLIB = /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++
QMAKE_MAC_SDK.macosx10.12.platform_name = macosx
QMAKE_MAC_SDK.macosx.--show-sdk-path = /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk
QMAKE_MAC_SDK.macosx.--show-sdk-platform-path = /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform
QMAKE_MAC_SDK.macosx.--show-sdk-version = 10.13
QMAKE_MAC_SDK.macx-clang.macosx.QMAKE_ACTOOL = /Applications/Xcode.app/Contents/Developer/usr/bin/actool
QMAKE_CXX.INCDIRS = \
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1 \
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/9.1.0/include \
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include \
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include
QMAKE_CXX.LIBDIRS = /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/lib
QMAKE_CXX.QT_COMPILER_STDCXX = 199711L
QMAKE_CXX.QMAKE_APPLE_CC = 6000
QMAKE_CXX.QMAKE_APPLE_CLANG_MAJOR_VERSION = 9
QMAKE_CXX.QMAKE_APPLE_CLANG_MINOR_VERSION = 1
QMAKE_CXX.QMAKE_APPLE_CLANG_PATCH_VERSION = 0
QMAKE_CXX.QMAKE_GCC_MAJOR_VERSION = 4
QMAKE_CXX.QMAKE_GCC_MINOR_VERSION = 2
QMAKE_CXX.QMAKE_GCC_PATCH_VERSION = 1
QMAKE_CXX.COMPILER_MACROS = \
QT_COMPILER_STDCXX \
QMAKE_APPLE_CC \
QMAKE_APPLE_CLANG_MAJOR_VERSION \
QMAKE_APPLE_CLANG_MINOR_VERSION \
QMAKE_APPLE_CLANG_PATCH_VERSION \
QMAKE_GCC_MAJOR_VERSION \
QMAKE_GCC_MINOR_VERSION \
QMAKE_GCC_PATCH_VERSION

View File

@ -11,28 +11,28 @@ greaterThan(QT_MAJOR_VERSION, 4): QT += printsupport
CONFIG += c++11
TARGET = Litt
TEMPLATE = app
VERSION = 0.8.17
VERSION = 0.9.0
VERSTR = '\\"$${VERSION}\\"'
DEFINES += VER=\"$${VERSTR}\"
win32 {
DEFINES += TARGET_WIN
DEFINES += TARGET_WIN
}
macx {
QMAKE_MAC_SDK = macosx10.12
DEFINES += TARGET_OSX
# DEFINES += USE_LOGGER
LIBS += ../lib/osx/libssl.a ../lib/osx/libcrypto.a
LIBS += -framework CoreFoundation
LIBS += -framework Cocoa
QMAKE_CXXFLAGS += -std=c++11
QMAKE_CXXFLAGS += -std=c++0x
QMAKE_LFLAGS += -std=c++11
QMAKE_MAC_SDK = macosx10.12
DEFINES += TARGET_OSX
# DEFINES += USE_LOGGER
LIBS += ../lib/osx/libssl.a ../lib/osx/libcrypto.a
LIBS += -framework CoreFoundation
LIBS += -framework Cocoa
QMAKE_CXXFLAGS += -std=c++11
QMAKE_CXXFLAGS += -std=c++0x
QMAKE_LFLAGS += -std=c++11
License.files = License.rtf
License.path = Contents/Resources
QMAKE_BUNDLE_DATA += License
License.files = License.rtf
License.path = Contents/Resources
QMAKE_BUNDLE_DATA += License
}
ICON = icons/appicon-osx.icns
@ -44,7 +44,7 @@ INCLUDEPATH += ../lib/include
SOURCES += main.cpp\
mainwindow.cpp \
mainwindow.cpp \
storage.cpp \
task.cpp \
tasktreemodel.cpp \
@ -131,7 +131,7 @@ FORMS += mainwindow.ui \
stopworkdialog.ui \
startworkdialog.ui
RESOURCES = mainwindow.qrc
RESOURCES = mainwindow.qrc resources/qdarkstyle/style.qrc
OBJECTIVE_SOURCES += \
platforms/osx/hidtrackerimpl_osx.mm \

View File

@ -6,130 +6,151 @@
#include <QDesktopServices>
#include <QMessageBox>
#include <QKeyEvent>
#include <QTextStream>
#include <QApplication>
#ifdef TARGET_OSX
char* __strlcpy_chk (char* dest, const char* src, int len, int destcapacity)
{
return NULL;
return NULL;
}
char* __strlcat_chk (char* dest, const char* src, int len, int destcapacity)
{
return NULL;
return NULL;
}
#endif
#include "settings.h"
void ThemeHelper::applyCurrentTheme(Settings& settings)
{
// Dark theme
if (settings.data()[KEY_DARK_THEME].toBool())
{
QFile f(":qdarkstyle/style.qss");
if (f.exists())
{
f.open(QFile::ReadOnly | QFile::Text);
QTextStream ts(&f);
qApp->setStyleSheet(ts.readAll());
}
}
else
qApp->setStyleSheet("");
}
QString TimeHelper::secondsToDisplay(int seconds, bool showSeconds)
{
int hours = seconds / 3600;
int minutes = (seconds % 3600) / 60;
int secs = seconds % 60;
if (showSeconds)
return QString("%1:%2:%3").arg(hours, 2, 10, QLatin1Char('0')).arg(minutes, 2, 10, QLatin1Char('0')).arg(secs, 2, 10, QLatin1Char('0'));
else
return QString("%1:%2").arg(hours, 2, 10, QLatin1Char('0')).arg(minutes, 2, 10, QLatin1Char('0'));
int hours = seconds / 3600;
int minutes = (seconds % 3600) / 60;
int secs = seconds % 60;
if (showSeconds)
return QString("%1:%2:%3").arg(hours, 2, 10, QLatin1Char('0')).arg(minutes, 2, 10, QLatin1Char('0')).arg(secs, 2, 10, QLatin1Char('0'));
else
return QString("%1:%2").arg(hours, 2, 10, QLatin1Char('0')).arg(minutes, 2, 10, QLatin1Char('0'));
}
QString PathHelper::pathToSettings()
{
#if QT_VERSION >= 0x050000
QString folder = QStandardPaths::writableLocation(QStandardPaths::DataLocation);
QString folder = QStandardPaths::writableLocation(QStandardPaths::DataLocation);
#else
QString folder = QDesktopServices::storageLocation(QDesktopServices::DataLocation);
QString folder = QDesktopServices::storageLocation(QDesktopServices::DataLocation);
#endif
QString path = folder + "/" + SETTINGS_FILENAME;
return path;
QString path = folder + "/" + SETTINGS_FILENAME;
return path;
}
QString PathHelper::pathToDatabase()
{
#if QT_VERSION >= 0x050000
QString folder = QStandardPaths::writableLocation(QStandardPaths::DataLocation);
QString folder = QStandardPaths::writableLocation(QStandardPaths::DataLocation);
#else
QString folder = QDesktopServices::storageLocation(QDesktopServices::DataLocation);
QString folder = QDesktopServices::storageLocation(QDesktopServices::DataLocation);
#endif
QString path = folder + "/" + DATABASENAME;
return path;
QString path = folder + "/" + DATABASENAME;
return path;
}
QString PathHelper::pathToDesktop()
{
#if QT_VERSION >= 0x050000
QString folder = QStandardPaths::writableLocation(QStandardPaths::DesktopLocation);
QString folder = QStandardPaths::writableLocation(QStandardPaths::DesktopLocation);
#else
QString folder = QDesktopServices::storageLocation(QDesktopServices::DesktopLocation);
QString folder = QDesktopServices::storageLocation(QDesktopServices::DesktopLocation);
#endif
return folder;
return folder;
}
QString PathHelper::pathToDatabaseTemplate()
{
#ifdef TARGET_WIN
return QCoreApplication::applicationDirPath() + "/" + DATABASENAME;
return QCoreApplication::applicationDirPath() + "/" + DATABASENAME;
#endif
#ifdef TARGET_OSX
return QCoreApplication::applicationDirPath() + "/../Resources/" + DATABASENAME;
return QCoreApplication::applicationDirPath() + "/../Resources/" + DATABASENAME;
#endif
}
QString PathHelper::pathToLog()
{
#if QT_VERSION >= 0x050000
QString folder = QStandardPaths::writableLocation(QStandardPaths::DataLocation);
QString folder = QStandardPaths::writableLocation(QStandardPaths::DataLocation);
#else
QString folder = QDesktopServices::storageLocation(QDesktopServices::DataLocation);
QString folder = QDesktopServices::storageLocation(QDesktopServices::DataLocation);
#endif
return folder + "/" + LOGNAME;
return folder + "/" + LOGNAME;
}
bool ActivityTrackerHelper::ensureSmartTrackingIsPossible()
{
bool result = false;
HIDActivityTracker tracker;
bool result = false;
HIDActivityTracker tracker;
result = tracker.isPossible();
result = tracker.isPossible();
#ifdef TARGET_OSX
if (!result && QSysInfo::MacintoshVersion <= QSysInfo::MV_10_8)
{
QMessageBox msgbox(QMessageBox::Question, QT_TR_NOOP("Permission required"),
QT_TR_NOOP("To use smart time tracking Litt needs access to OS X accessibility features.\
Please grant access in Security & Privacy preferences, location in System Preferences."),
QMessageBox::NoButton, nullptr);
msgbox.addButton(QT_TR_NOOP("Open System Preferences"), QMessageBox::AcceptRole);
msgbox.addButton(QT_TR_NOOP("Deny"), QMessageBox::RejectRole);
int execResult = msgbox.exec();
if (execResult == 0)
if (!result && QSysInfo::MacintoshVersion <= QSysInfo::MV_10_8)
{
system("open /System/Library/PreferencePanes/UniversalAccessPref.prefPane");
result = true;
QMessageBox msgbox(QMessageBox::Question, QT_TR_NOOP("Permission required"),
QT_TR_NOOP("To use smart time tracking Litt needs access to OS X accessibility features.\
Please grant access in Security & Privacy preferences, location in System Preferences."),
QMessageBox::NoButton, nullptr);
msgbox.addButton(QT_TR_NOOP("Open System Preferences"), QMessageBox::AcceptRole);
msgbox.addButton(QT_TR_NOOP("Deny"), QMessageBox::RejectRole);
int execResult = msgbox.exec();
if (execResult == 0)
{
system("open /System/Library/PreferencePanes/UniversalAccessPref.prefPane");
result = true;
}
}
}
else
if (QSysInfo::MacintoshVersion > QSysInfo::MV_10_8)
result = true;
else
if (QSysInfo::MacintoshVersion > QSysInfo::MV_10_8)
result = true;
#endif
#ifdef TARGET_WIN
result = false;
result = false;
#endif
return result;
return result;
}
EscapeKeyEventFilter::EscapeKeyEventFilter(QObject *parent)
:QObject(parent)
:QObject(parent)
{}
bool EscapeKeyEventFilter::eventFilter(QObject *obj, QEvent * event)
{
if (event->type() == QEvent::KeyPress && ((QKeyEvent*)event)->key() == Qt::Key_Escape )
{
emit escapePressed(obj);
}
if (event->type() == QEvent::FocusOut)
{
emit escapePressed(obj);
}
return false;
if (event->type() == QEvent::KeyPress && ((QKeyEvent*)event)->key() == Qt::Key_Escape )
{
emit escapePressed(obj);
}
if (event->type() == QEvent::FocusOut)
{
emit escapePressed(obj);
}
return false;
}

View File

@ -4,12 +4,20 @@
#include <QString>
#include <QObject>
class Settings;
class ThemeHelper
{
public:
static void applyCurrentTheme(Settings& settings);
};
class TimeHelper
{
public:
static QString secondsToDisplay(int seconds, bool showSeconds);
};
class PathHelper
{
public:

View File

@ -1,16 +1,20 @@
#include "mainwindow.h"
#include <QApplication>
#include <QLayout>
#include "settings.h"
#include "helper.h"
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
MainWindow w;
w.layout()->invalidate();
QApplication a(argc, argv);
ThemeHelper::applyCurrentTheme(Settings::instance());
w.setAttribute(Qt::WA_WState_ExplicitShowHide, false);
w.setAttribute(Qt::WA_WState_Hidden, true);
w.show();
MainWindow w;
w.layout()->invalidate();
return a.exec();
w.setAttribute(Qt::WA_WState_ExplicitShowHide, false);
w.setAttribute(Qt::WA_WState_Hidden, true);
w.show();
return a.exec();
}

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,7 @@
/****************************************************************************
** Meta object code from reading C++ file 'aboutdlg.h'
**
** Created by: The Qt Meta Object Compiler version 67 (Qt 5.6.2)
** Created by: The Qt Meta Object Compiler version 67 (Qt 5.9.5)
**
** WARNING! All changes made in this file will be lost!
*****************************************************************************/
@ -12,12 +12,14 @@
#if !defined(Q_MOC_OUTPUT_REVISION)
#error "The header file 'aboutdlg.h' doesn't include <QObject>."
#elif Q_MOC_OUTPUT_REVISION != 67
#error "This file was generated using the moc from 5.6.2. It"
#error "This file was generated using the moc from 5.9.5. It"
#error "cannot be used with the include files from this version of Qt."
#error "(The moc has changed too much.)"
#endif
QT_BEGIN_MOC_NAMESPACE
QT_WARNING_PUSH
QT_WARNING_DISABLE_DEPRECATED
struct qt_meta_stringdata_AboutDlg_t {
QByteArrayData data[3];
char stringdata0[22];
@ -75,7 +77,7 @@ void AboutDlg::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, vo
const QMetaObject AboutDlg::staticMetaObject = {
{ &QDialog::staticMetaObject, qt_meta_stringdata_AboutDlg.data,
qt_meta_data_AboutDlg, qt_static_metacall, Q_NULLPTR, Q_NULLPTR}
qt_meta_data_AboutDlg, qt_static_metacall, nullptr, nullptr}
};
@ -86,9 +88,9 @@ const QMetaObject *AboutDlg::metaObject() const
void *AboutDlg::qt_metacast(const char *_clname)
{
if (!_clname) return Q_NULLPTR;
if (!_clname) return nullptr;
if (!strcmp(_clname, qt_meta_stringdata_AboutDlg.stringdata0))
return static_cast<void*>(const_cast< AboutDlg*>(this));
return static_cast<void*>(this);
return QDialog::qt_metacast(_clname);
}
@ -108,4 +110,5 @@ int AboutDlg::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
}
return _id;
}
QT_WARNING_POP
QT_END_MOC_NAMESPACE

View File

@ -1,7 +1,7 @@
/****************************************************************************
** Meta object code from reading C++ file 'attachmentsdialog.h'
**
** Created by: The Qt Meta Object Compiler version 67 (Qt 5.6.2)
** Created by: The Qt Meta Object Compiler version 67 (Qt 5.9.5)
**
** WARNING! All changes made in this file will be lost!
*****************************************************************************/
@ -12,12 +12,14 @@
#if !defined(Q_MOC_OUTPUT_REVISION)
#error "The header file 'attachmentsdialog.h' doesn't include <QObject>."
#elif Q_MOC_OUTPUT_REVISION != 67
#error "This file was generated using the moc from 5.6.2. It"
#error "This file was generated using the moc from 5.9.5. It"
#error "cannot be used with the include files from this version of Qt."
#error "(The moc has changed too much.)"
#endif
QT_BEGIN_MOC_NAMESPACE
QT_WARNING_PUSH
QT_WARNING_DISABLE_DEPRECATED
struct qt_meta_stringdata_AttachmentsDialog_t {
QByteArrayData data[1];
char stringdata0[18];
@ -62,7 +64,7 @@ void AttachmentsDialog::qt_static_metacall(QObject *_o, QMetaObject::Call _c, in
const QMetaObject AttachmentsDialog::staticMetaObject = {
{ &QDialog::staticMetaObject, qt_meta_stringdata_AttachmentsDialog.data,
qt_meta_data_AttachmentsDialog, qt_static_metacall, Q_NULLPTR, Q_NULLPTR}
qt_meta_data_AttachmentsDialog, qt_static_metacall, nullptr, nullptr}
};
@ -73,17 +75,16 @@ const QMetaObject *AttachmentsDialog::metaObject() const
void *AttachmentsDialog::qt_metacast(const char *_clname)
{
if (!_clname) return Q_NULLPTR;
if (!_clname) return nullptr;
if (!strcmp(_clname, qt_meta_stringdata_AttachmentsDialog.stringdata0))
return static_cast<void*>(const_cast< AttachmentsDialog*>(this));
return static_cast<void*>(this);
return QDialog::qt_metacast(_clname);
}
int AttachmentsDialog::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
_id = QDialog::qt_metacall(_c, _id, _a);
if (_id < 0)
return _id;
return _id;
}
QT_WARNING_POP
QT_END_MOC_NAMESPACE

View File

@ -1,7 +1,7 @@
/****************************************************************************
** Meta object code from reading C++ file 'attachmentslist.h'
**
** Created by: The Qt Meta Object Compiler version 67 (Qt 5.6.2)
** Created by: The Qt Meta Object Compiler version 67 (Qt 5.9.5)
**
** WARNING! All changes made in this file will be lost!
*****************************************************************************/
@ -12,12 +12,14 @@
#if !defined(Q_MOC_OUTPUT_REVISION)
#error "The header file 'attachmentslist.h' doesn't include <QObject>."
#elif Q_MOC_OUTPUT_REVISION != 67
#error "This file was generated using the moc from 5.6.2. It"
#error "This file was generated using the moc from 5.9.5. It"
#error "cannot be used with the include files from this version of Qt."
#error "(The moc has changed too much.)"
#endif
QT_BEGIN_MOC_NAMESPACE
QT_WARNING_PUSH
QT_WARNING_DISABLE_DEPRECATED
struct qt_meta_stringdata_AttachmentsListModel_t {
QByteArrayData data[1];
char stringdata0[21];
@ -62,7 +64,7 @@ void AttachmentsListModel::qt_static_metacall(QObject *_o, QMetaObject::Call _c,
const QMetaObject AttachmentsListModel::staticMetaObject = {
{ &QAbstractListModel::staticMetaObject, qt_meta_stringdata_AttachmentsListModel.data,
qt_meta_data_AttachmentsListModel, qt_static_metacall, Q_NULLPTR, Q_NULLPTR}
qt_meta_data_AttachmentsListModel, qt_static_metacall, nullptr, nullptr}
};
@ -73,17 +75,15 @@ const QMetaObject *AttachmentsListModel::metaObject() const
void *AttachmentsListModel::qt_metacast(const char *_clname)
{
if (!_clname) return Q_NULLPTR;
if (!_clname) return nullptr;
if (!strcmp(_clname, qt_meta_stringdata_AttachmentsListModel.stringdata0))
return static_cast<void*>(const_cast< AttachmentsListModel*>(this));
return static_cast<void*>(this);
return QAbstractListModel::qt_metacast(_clname);
}
int AttachmentsListModel::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
_id = QAbstractListModel::qt_metacall(_c, _id, _a);
if (_id < 0)
return _id;
return _id;
}
struct qt_meta_stringdata_AttachmentsList_t {
@ -161,7 +161,7 @@ void AttachmentsList::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int
const QMetaObject AttachmentsList::staticMetaObject = {
{ &QWidget::staticMetaObject, qt_meta_stringdata_AttachmentsList.data,
qt_meta_data_AttachmentsList, qt_static_metacall, Q_NULLPTR, Q_NULLPTR}
qt_meta_data_AttachmentsList, qt_static_metacall, nullptr, nullptr}
};
@ -172,9 +172,9 @@ const QMetaObject *AttachmentsList::metaObject() const
void *AttachmentsList::qt_metacast(const char *_clname)
{
if (!_clname) return Q_NULLPTR;
if (!_clname) return nullptr;
if (!strcmp(_clname, qt_meta_stringdata_AttachmentsList.stringdata0))
return static_cast<void*>(const_cast< AttachmentsList*>(this));
return static_cast<void*>(this);
return QWidget::qt_metacast(_clname);
}
@ -194,4 +194,5 @@ int AttachmentsList::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
}
return _id;
}
QT_WARNING_POP
QT_END_MOC_NAMESPACE

View File

@ -1,7 +1,7 @@
/****************************************************************************
** Meta object code from reading C++ file 'finddialog.h'
**
** Created by: The Qt Meta Object Compiler version 67 (Qt 5.6.2)
** Created by: The Qt Meta Object Compiler version 67 (Qt 5.9.5)
**
** WARNING! All changes made in this file will be lost!
*****************************************************************************/
@ -12,12 +12,14 @@
#if !defined(Q_MOC_OUTPUT_REVISION)
#error "The header file 'finddialog.h' doesn't include <QObject>."
#elif Q_MOC_OUTPUT_REVISION != 67
#error "This file was generated using the moc from 5.6.2. It"
#error "This file was generated using the moc from 5.9.5. It"
#error "cannot be used with the include files from this version of Qt."
#error "(The moc has changed too much.)"
#endif
QT_BEGIN_MOC_NAMESPACE
QT_WARNING_PUSH
QT_WARNING_DISABLE_DEPRECATED
struct qt_meta_stringdata_FindInTasksDialog_t {
QByteArrayData data[9];
char stringdata0[99];
@ -102,7 +104,7 @@ void FindInTasksDialog::qt_static_metacall(QObject *_o, QMetaObject::Call _c, in
const QMetaObject FindInTasksDialog::staticMetaObject = {
{ &QDialog::staticMetaObject, qt_meta_stringdata_FindInTasksDialog.data,
qt_meta_data_FindInTasksDialog, qt_static_metacall, Q_NULLPTR, Q_NULLPTR}
qt_meta_data_FindInTasksDialog, qt_static_metacall, nullptr, nullptr}
};
@ -113,9 +115,9 @@ const QMetaObject *FindInTasksDialog::metaObject() const
void *FindInTasksDialog::qt_metacast(const char *_clname)
{
if (!_clname) return Q_NULLPTR;
if (!_clname) return nullptr;
if (!strcmp(_clname, qt_meta_stringdata_FindInTasksDialog.stringdata0))
return static_cast<void*>(const_cast< FindInTasksDialog*>(this));
return static_cast<void*>(this);
return QDialog::qt_metacast(_clname);
}
@ -135,4 +137,5 @@ int FindInTasksDialog::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
}
return _id;
}
QT_WARNING_POP
QT_END_MOC_NAMESPACE

View File

@ -1,7 +1,7 @@
/****************************************************************************
** Meta object code from reading C++ file 'findsupport.h'
**
** Created by: The Qt Meta Object Compiler version 67 (Qt 5.6.2)
** Created by: The Qt Meta Object Compiler version 67 (Qt 5.9.5)
**
** WARNING! All changes made in this file will be lost!
*****************************************************************************/
@ -12,12 +12,14 @@
#if !defined(Q_MOC_OUTPUT_REVISION)
#error "The header file 'findsupport.h' doesn't include <QObject>."
#elif Q_MOC_OUTPUT_REVISION != 67
#error "This file was generated using the moc from 5.6.2. It"
#error "This file was generated using the moc from 5.9.5. It"
#error "cannot be used with the include files from this version of Qt."
#error "(The moc has changed too much.)"
#endif
QT_BEGIN_MOC_NAMESPACE
QT_WARNING_PUSH
QT_WARNING_DISABLE_DEPRECATED
struct qt_meta_stringdata_FindResultsModel_t {
QByteArrayData data[5];
char stringdata0[46];
@ -88,7 +90,7 @@ void FindResultsModel::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int
const QMetaObject FindResultsModel::staticMetaObject = {
{ &QAbstractTableModel::staticMetaObject, qt_meta_stringdata_FindResultsModel.data,
qt_meta_data_FindResultsModel, qt_static_metacall, Q_NULLPTR, Q_NULLPTR}
qt_meta_data_FindResultsModel, qt_static_metacall, nullptr, nullptr}
};
@ -99,9 +101,9 @@ const QMetaObject *FindResultsModel::metaObject() const
void *FindResultsModel::qt_metacast(const char *_clname)
{
if (!_clname) return Q_NULLPTR;
if (!_clname) return nullptr;
if (!strcmp(_clname, qt_meta_stringdata_FindResultsModel.stringdata0))
return static_cast<void*>(const_cast< FindResultsModel*>(this));
return static_cast<void*>(this);
return QAbstractTableModel::qt_metacast(_clname);
}
@ -192,17 +194,16 @@ void TaskSearch::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id,
}
} else if (_c == QMetaObject::IndexOfMethod) {
int *result = reinterpret_cast<int *>(_a[0]);
void **func = reinterpret_cast<void **>(_a[1]);
{
typedef void (TaskSearch::*_t)(const FindResultItem & );
if (*reinterpret_cast<_t *>(func) == static_cast<_t>(&TaskSearch::newResultAvailable)) {
if (*reinterpret_cast<_t *>(_a[1]) == static_cast<_t>(&TaskSearch::newResultAvailable)) {
*result = 0;
return;
}
}
{
typedef void (TaskSearch::*_t)();
if (*reinterpret_cast<_t *>(func) == static_cast<_t>(&TaskSearch::searchComplete)) {
if (*reinterpret_cast<_t *>(_a[1]) == static_cast<_t>(&TaskSearch::searchComplete)) {
*result = 1;
return;
}
@ -212,7 +213,7 @@ void TaskSearch::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id,
const QMetaObject TaskSearch::staticMetaObject = {
{ &QThread::staticMetaObject, qt_meta_stringdata_TaskSearch.data,
qt_meta_data_TaskSearch, qt_static_metacall, Q_NULLPTR, Q_NULLPTR}
qt_meta_data_TaskSearch, qt_static_metacall, nullptr, nullptr}
};
@ -223,9 +224,9 @@ const QMetaObject *TaskSearch::metaObject() const
void *TaskSearch::qt_metacast(const char *_clname)
{
if (!_clname) return Q_NULLPTR;
if (!_clname) return nullptr;
if (!strcmp(_clname, qt_meta_stringdata_TaskSearch.stringdata0))
return static_cast<void*>(const_cast< TaskSearch*>(this));
return static_cast<void*>(this);
return QThread::qt_metacast(_clname);
}
@ -249,13 +250,14 @@ int TaskSearch::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
// SIGNAL 0
void TaskSearch::newResultAvailable(const FindResultItem & _t1)
{
void *_a[] = { Q_NULLPTR, const_cast<void*>(reinterpret_cast<const void*>(&_t1)) };
void *_a[] = { nullptr, const_cast<void*>(reinterpret_cast<const void*>(&_t1)) };
QMetaObject::activate(this, &staticMetaObject, 0, _a);
}
// SIGNAL 1
void TaskSearch::searchComplete()
{
QMetaObject::activate(this, &staticMetaObject, 1, Q_NULLPTR);
QMetaObject::activate(this, &staticMetaObject, 1, nullptr);
}
QT_WARNING_POP
QT_END_MOC_NAMESPACE

View File

@ -1,7 +1,7 @@
/****************************************************************************
** Meta object code from reading C++ file 'fvavailableupdate.h'
**
** Created by: The Qt Meta Object Compiler version 67 (Qt 5.6.2)
** Created by: The Qt Meta Object Compiler version 67 (Qt 5.9.5)
**
** WARNING! All changes made in this file will be lost!
*****************************************************************************/
@ -12,12 +12,14 @@
#if !defined(Q_MOC_OUTPUT_REVISION)
#error "The header file 'fvavailableupdate.h' doesn't include <QObject>."
#elif Q_MOC_OUTPUT_REVISION != 67
#error "This file was generated using the moc from 5.6.2. It"
#error "This file was generated using the moc from 5.9.5. It"
#error "cannot be used with the include files from this version of Qt."
#error "(The moc has changed too much.)"
#endif
QT_BEGIN_MOC_NAMESPACE
QT_WARNING_PUSH
QT_WARNING_DISABLE_DEPRECATED
struct qt_meta_stringdata_FvAvailableUpdate_t {
QByteArrayData data[1];
char stringdata0[18];
@ -62,7 +64,7 @@ void FvAvailableUpdate::qt_static_metacall(QObject *_o, QMetaObject::Call _c, in
const QMetaObject FvAvailableUpdate::staticMetaObject = {
{ &QObject::staticMetaObject, qt_meta_stringdata_FvAvailableUpdate.data,
qt_meta_data_FvAvailableUpdate, qt_static_metacall, Q_NULLPTR, Q_NULLPTR}
qt_meta_data_FvAvailableUpdate, qt_static_metacall, nullptr, nullptr}
};
@ -73,17 +75,16 @@ const QMetaObject *FvAvailableUpdate::metaObject() const
void *FvAvailableUpdate::qt_metacast(const char *_clname)
{
if (!_clname) return Q_NULLPTR;
if (!_clname) return nullptr;
if (!strcmp(_clname, qt_meta_stringdata_FvAvailableUpdate.stringdata0))
return static_cast<void*>(const_cast< FvAvailableUpdate*>(this));
return static_cast<void*>(this);
return QObject::qt_metacast(_clname);
}
int FvAvailableUpdate::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
_id = QObject::qt_metacall(_c, _id, _a);
if (_id < 0)
return _id;
return _id;
}
QT_WARNING_POP
QT_END_MOC_NAMESPACE

View File

@ -1,7 +1,7 @@
/****************************************************************************
** Meta object code from reading C++ file 'fvignoredversions.h'
**
** Created by: The Qt Meta Object Compiler version 67 (Qt 5.6.2)
** Created by: The Qt Meta Object Compiler version 67 (Qt 5.9.5)
**
** WARNING! All changes made in this file will be lost!
*****************************************************************************/
@ -12,12 +12,14 @@
#if !defined(Q_MOC_OUTPUT_REVISION)
#error "The header file 'fvignoredversions.h' doesn't include <QObject>."
#elif Q_MOC_OUTPUT_REVISION != 67
#error "This file was generated using the moc from 5.6.2. It"
#error "This file was generated using the moc from 5.9.5. It"
#error "cannot be used with the include files from this version of Qt."
#error "(The moc has changed too much.)"
#endif
QT_BEGIN_MOC_NAMESPACE
QT_WARNING_PUSH
QT_WARNING_DISABLE_DEPRECATED
struct qt_meta_stringdata_FVIgnoredVersions_t {
QByteArrayData data[1];
char stringdata0[18];
@ -62,7 +64,7 @@ void FVIgnoredVersions::qt_static_metacall(QObject *_o, QMetaObject::Call _c, in
const QMetaObject FVIgnoredVersions::staticMetaObject = {
{ &QObject::staticMetaObject, qt_meta_stringdata_FVIgnoredVersions.data,
qt_meta_data_FVIgnoredVersions, qt_static_metacall, Q_NULLPTR, Q_NULLPTR}
qt_meta_data_FVIgnoredVersions, qt_static_metacall, nullptr, nullptr}
};
@ -73,17 +75,16 @@ const QMetaObject *FVIgnoredVersions::metaObject() const
void *FVIgnoredVersions::qt_metacast(const char *_clname)
{
if (!_clname) return Q_NULLPTR;
if (!_clname) return nullptr;
if (!strcmp(_clname, qt_meta_stringdata_FVIgnoredVersions.stringdata0))
return static_cast<void*>(const_cast< FVIgnoredVersions*>(this));
return static_cast<void*>(this);
return QObject::qt_metacast(_clname);
}
int FVIgnoredVersions::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
_id = QObject::qt_metacall(_c, _id, _a);
if (_id < 0)
return _id;
return _id;
}
QT_WARNING_POP
QT_END_MOC_NAMESPACE

View File

@ -1,7 +1,7 @@
/****************************************************************************
** Meta object code from reading C++ file 'fvplatform.h'
**
** Created by: The Qt Meta Object Compiler version 67 (Qt 5.6.2)
** Created by: The Qt Meta Object Compiler version 67 (Qt 5.9.5)
**
** WARNING! All changes made in this file will be lost!
*****************************************************************************/
@ -12,12 +12,14 @@
#if !defined(Q_MOC_OUTPUT_REVISION)
#error "The header file 'fvplatform.h' doesn't include <QObject>."
#elif Q_MOC_OUTPUT_REVISION != 67
#error "This file was generated using the moc from 5.6.2. It"
#error "This file was generated using the moc from 5.9.5. It"
#error "cannot be used with the include files from this version of Qt."
#error "(The moc has changed too much.)"
#endif
QT_BEGIN_MOC_NAMESPACE
QT_WARNING_PUSH
QT_WARNING_DISABLE_DEPRECATED
struct qt_meta_stringdata_FvPlatform_t {
QByteArrayData data[1];
char stringdata0[11];
@ -62,7 +64,7 @@ void FvPlatform::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id,
const QMetaObject FvPlatform::staticMetaObject = {
{ &QObject::staticMetaObject, qt_meta_stringdata_FvPlatform.data,
qt_meta_data_FvPlatform, qt_static_metacall, Q_NULLPTR, Q_NULLPTR}
qt_meta_data_FvPlatform, qt_static_metacall, nullptr, nullptr}
};
@ -73,17 +75,16 @@ const QMetaObject *FvPlatform::metaObject() const
void *FvPlatform::qt_metacast(const char *_clname)
{
if (!_clname) return Q_NULLPTR;
if (!_clname) return nullptr;
if (!strcmp(_clname, qt_meta_stringdata_FvPlatform.stringdata0))
return static_cast<void*>(const_cast< FvPlatform*>(this));
return static_cast<void*>(this);
return QObject::qt_metacast(_clname);
}
int FvPlatform::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
_id = QObject::qt_metacall(_c, _id, _a);
if (_id < 0)
return _id;
return _id;
}
QT_WARNING_POP
QT_END_MOC_NAMESPACE

View File

@ -1,7 +1,7 @@
/****************************************************************************
** Meta object code from reading C++ file 'fvupdateconfirmdialog.h'
**
** Created by: The Qt Meta Object Compiler version 67 (Qt 5.6.2)
** Created by: The Qt Meta Object Compiler version 67 (Qt 5.9.5)
**
** WARNING! All changes made in this file will be lost!
*****************************************************************************/
@ -12,12 +12,14 @@
#if !defined(Q_MOC_OUTPUT_REVISION)
#error "The header file 'fvupdateconfirmdialog.h' doesn't include <QObject>."
#elif Q_MOC_OUTPUT_REVISION != 67
#error "This file was generated using the moc from 5.6.2. It"
#error "This file was generated using the moc from 5.9.5. It"
#error "cannot be used with the include files from this version of Qt."
#error "(The moc has changed too much.)"
#endif
QT_BEGIN_MOC_NAMESPACE
QT_WARNING_PUSH
QT_WARNING_DISABLE_DEPRECATED
struct qt_meta_stringdata_FvUpdateConfirmDialog_t {
QByteArrayData data[1];
char stringdata0[22];
@ -62,7 +64,7 @@ void FvUpdateConfirmDialog::qt_static_metacall(QObject *_o, QMetaObject::Call _c
const QMetaObject FvUpdateConfirmDialog::staticMetaObject = {
{ &QDialog::staticMetaObject, qt_meta_stringdata_FvUpdateConfirmDialog.data,
qt_meta_data_FvUpdateConfirmDialog, qt_static_metacall, Q_NULLPTR, Q_NULLPTR}
qt_meta_data_FvUpdateConfirmDialog, qt_static_metacall, nullptr, nullptr}
};
@ -73,17 +75,16 @@ const QMetaObject *FvUpdateConfirmDialog::metaObject() const
void *FvUpdateConfirmDialog::qt_metacast(const char *_clname)
{
if (!_clname) return Q_NULLPTR;
if (!_clname) return nullptr;
if (!strcmp(_clname, qt_meta_stringdata_FvUpdateConfirmDialog.stringdata0))
return static_cast<void*>(const_cast< FvUpdateConfirmDialog*>(this));
return static_cast<void*>(this);
return QDialog::qt_metacast(_clname);
}
int FvUpdateConfirmDialog::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
_id = QDialog::qt_metacall(_c, _id, _a);
if (_id < 0)
return _id;
return _id;
}
QT_WARNING_POP
QT_END_MOC_NAMESPACE

View File

@ -1,7 +1,7 @@
/****************************************************************************
** Meta object code from reading C++ file 'fvupdater.h'
**
** Created by: The Qt Meta Object Compiler version 67 (Qt 5.6.2)
** Created by: The Qt Meta Object Compiler version 67 (Qt 5.9.5)
**
** WARNING! All changes made in this file will be lost!
*****************************************************************************/
@ -12,12 +12,14 @@
#if !defined(Q_MOC_OUTPUT_REVISION)
#error "The header file 'fvupdater.h' doesn't include <QObject>."
#elif Q_MOC_OUTPUT_REVISION != 67
#error "This file was generated using the moc from 5.6.2. It"
#error "This file was generated using the moc from 5.9.5. It"
#error "cannot be used with the include files from this version of Qt."
#error "(The moc has changed too much.)"
#endif
QT_BEGIN_MOC_NAMESPACE
QT_WARNING_PUSH
QT_WARNING_DISABLE_DEPRECATED
struct qt_meta_stringdata_FvUpdater_t {
QByteArrayData data[16];
char stringdata0[292];
@ -109,13 +111,13 @@ void FvUpdater::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, v
Q_UNUSED(_t)
switch (_id) {
case 0: { bool _r = _t->CheckForUpdates((*reinterpret_cast< bool(*)>(_a[1])));
if (_a[0]) *reinterpret_cast< bool*>(_a[0]) = _r; } break;
if (_a[0]) *reinterpret_cast< bool*>(_a[0]) = std::move(_r); } break;
case 1: { bool _r = _t->CheckForUpdates();
if (_a[0]) *reinterpret_cast< bool*>(_a[0]) = _r; } break;
if (_a[0]) *reinterpret_cast< bool*>(_a[0]) = std::move(_r); } break;
case 2: { bool _r = _t->CheckForUpdatesSilent();
if (_a[0]) *reinterpret_cast< bool*>(_a[0]) = _r; } break;
if (_a[0]) *reinterpret_cast< bool*>(_a[0]) = std::move(_r); } break;
case 3: { bool _r = _t->CheckForUpdatesNotSilent();
if (_a[0]) *reinterpret_cast< bool*>(_a[0]) = _r; } break;
if (_a[0]) *reinterpret_cast< bool*>(_a[0]) = std::move(_r); } break;
case 4: _t->InstallUpdate(); break;
case 5: _t->SkipUpdate(); break;
case 6: _t->RemindMeLater(); break;
@ -131,7 +133,7 @@ void FvUpdater::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, v
const QMetaObject FvUpdater::staticMetaObject = {
{ &QObject::staticMetaObject, qt_meta_stringdata_FvUpdater.data,
qt_meta_data_FvUpdater, qt_static_metacall, Q_NULLPTR, Q_NULLPTR}
qt_meta_data_FvUpdater, qt_static_metacall, nullptr, nullptr}
};
@ -142,9 +144,9 @@ const QMetaObject *FvUpdater::metaObject() const
void *FvUpdater::qt_metacast(const char *_clname)
{
if (!_clname) return Q_NULLPTR;
if (!_clname) return nullptr;
if (!strcmp(_clname, qt_meta_stringdata_FvUpdater.stringdata0))
return static_cast<void*>(const_cast< FvUpdater*>(this));
return static_cast<void*>(this);
return QObject::qt_metacast(_clname);
}
@ -164,4 +166,5 @@ int FvUpdater::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
}
return _id;
}
QT_WARNING_POP
QT_END_MOC_NAMESPACE

View File

@ -1,7 +1,7 @@
/****************************************************************************
** Meta object code from reading C++ file 'fvupdatewindow.h'
**
** Created by: The Qt Meta Object Compiler version 67 (Qt 5.6.2)
** Created by: The Qt Meta Object Compiler version 67 (Qt 5.9.5)
**
** WARNING! All changes made in this file will be lost!
*****************************************************************************/
@ -12,12 +12,14 @@
#if !defined(Q_MOC_OUTPUT_REVISION)
#error "The header file 'fvupdatewindow.h' doesn't include <QObject>."
#elif Q_MOC_OUTPUT_REVISION != 67
#error "This file was generated using the moc from 5.6.2. It"
#error "This file was generated using the moc from 5.9.5. It"
#error "cannot be used with the include files from this version of Qt."
#error "(The moc has changed too much.)"
#endif
QT_BEGIN_MOC_NAMESPACE
QT_WARNING_PUSH
QT_WARNING_DISABLE_DEPRECATED
struct qt_meta_stringdata_FvUpdateWindow_t {
QByteArrayData data[5];
char stringdata0[54];
@ -77,7 +79,7 @@ void FvUpdateWindow::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _
const QMetaObject FvUpdateWindow::staticMetaObject = {
{ &QWidget::staticMetaObject, qt_meta_stringdata_FvUpdateWindow.data,
qt_meta_data_FvUpdateWindow, qt_static_metacall, Q_NULLPTR, Q_NULLPTR}
qt_meta_data_FvUpdateWindow, qt_static_metacall, nullptr, nullptr}
};
@ -88,9 +90,9 @@ const QMetaObject *FvUpdateWindow::metaObject() const
void *FvUpdateWindow::qt_metacast(const char *_clname)
{
if (!_clname) return Q_NULLPTR;
if (!_clname) return nullptr;
if (!strcmp(_clname, qt_meta_stringdata_FvUpdateWindow.stringdata0))
return static_cast<void*>(const_cast< FvUpdateWindow*>(this));
return static_cast<void*>(this);
return QWidget::qt_metacast(_clname);
}
@ -110,4 +112,5 @@ int FvUpdateWindow::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
}
return _id;
}
QT_WARNING_POP
QT_END_MOC_NAMESPACE

View File

@ -1,7 +1,7 @@
/****************************************************************************
** Meta object code from reading C++ file 'helper.h'
**
** Created by: The Qt Meta Object Compiler version 67 (Qt 5.6.2)
** Created by: The Qt Meta Object Compiler version 67 (Qt 5.9.5)
**
** WARNING! All changes made in this file will be lost!
*****************************************************************************/
@ -12,12 +12,14 @@
#if !defined(Q_MOC_OUTPUT_REVISION)
#error "The header file 'helper.h' doesn't include <QObject>."
#elif Q_MOC_OUTPUT_REVISION != 67
#error "This file was generated using the moc from 5.6.2. It"
#error "This file was generated using the moc from 5.9.5. It"
#error "cannot be used with the include files from this version of Qt."
#error "(The moc has changed too much.)"
#endif
QT_BEGIN_MOC_NAMESPACE
QT_WARNING_PUSH
QT_WARNING_DISABLE_DEPRECATED
struct qt_meta_stringdata_EscapeKeyEventFilter_t {
QByteArrayData data[4];
char stringdata0[40];
@ -73,10 +75,9 @@ void EscapeKeyEventFilter::qt_static_metacall(QObject *_o, QMetaObject::Call _c,
}
} else if (_c == QMetaObject::IndexOfMethod) {
int *result = reinterpret_cast<int *>(_a[0]);
void **func = reinterpret_cast<void **>(_a[1]);
{
typedef void (EscapeKeyEventFilter::*_t)(QObject * );
if (*reinterpret_cast<_t *>(func) == static_cast<_t>(&EscapeKeyEventFilter::escapePressed)) {
if (*reinterpret_cast<_t *>(_a[1]) == static_cast<_t>(&EscapeKeyEventFilter::escapePressed)) {
*result = 0;
return;
}
@ -86,7 +87,7 @@ void EscapeKeyEventFilter::qt_static_metacall(QObject *_o, QMetaObject::Call _c,
const QMetaObject EscapeKeyEventFilter::staticMetaObject = {
{ &QObject::staticMetaObject, qt_meta_stringdata_EscapeKeyEventFilter.data,
qt_meta_data_EscapeKeyEventFilter, qt_static_metacall, Q_NULLPTR, Q_NULLPTR}
qt_meta_data_EscapeKeyEventFilter, qt_static_metacall, nullptr, nullptr}
};
@ -97,9 +98,9 @@ const QMetaObject *EscapeKeyEventFilter::metaObject() const
void *EscapeKeyEventFilter::qt_metacast(const char *_clname)
{
if (!_clname) return Q_NULLPTR;
if (!_clname) return nullptr;
if (!strcmp(_clname, qt_meta_stringdata_EscapeKeyEventFilter.stringdata0))
return static_cast<void*>(const_cast< EscapeKeyEventFilter*>(this));
return static_cast<void*>(this);
return QObject::qt_metacast(_clname);
}
@ -123,7 +124,8 @@ int EscapeKeyEventFilter::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
// SIGNAL 0
void EscapeKeyEventFilter::escapePressed(QObject * _t1)
{
void *_a[] = { Q_NULLPTR, const_cast<void*>(reinterpret_cast<const void*>(&_t1)) };
void *_a[] = { nullptr, const_cast<void*>(reinterpret_cast<const void*>(&_t1)) };
QMetaObject::activate(this, &staticMetaObject, 0, _a);
}
QT_WARNING_POP
QT_END_MOC_NAMESPACE

View File

@ -1,7 +1,7 @@
/****************************************************************************
** Meta object code from reading C++ file 'hidtracker.h'
**
** Created by: The Qt Meta Object Compiler version 67 (Qt 5.6.2)
** Created by: The Qt Meta Object Compiler version 67 (Qt 5.9.5)
**
** WARNING! All changes made in this file will be lost!
*****************************************************************************/
@ -12,12 +12,14 @@
#if !defined(Q_MOC_OUTPUT_REVISION)
#error "The header file 'hidtracker.h' doesn't include <QObject>."
#elif Q_MOC_OUTPUT_REVISION != 67
#error "This file was generated using the moc from 5.6.2. It"
#error "This file was generated using the moc from 5.9.5. It"
#error "cannot be used with the include files from this version of Qt."
#error "(The moc has changed too much.)"
#endif
QT_BEGIN_MOC_NAMESPACE
QT_WARNING_PUSH
QT_WARNING_DISABLE_DEPRECATED
struct qt_meta_stringdata_HIDActivityTracker_t {
QByteArrayData data[5];
char stringdata0[61];
@ -84,17 +86,16 @@ void HIDActivityTracker::qt_static_metacall(QObject *_o, QMetaObject::Call _c, i
}
} else if (_c == QMetaObject::IndexOfMethod) {
int *result = reinterpret_cast<int *>(_a[0]);
void **func = reinterpret_cast<void **>(_a[1]);
{
typedef void (HIDActivityTracker::*_t)();
if (*reinterpret_cast<_t *>(func) == static_cast<_t>(&HIDActivityTracker::idleDetected)) {
if (*reinterpret_cast<_t *>(_a[1]) == static_cast<_t>(&HIDActivityTracker::idleDetected)) {
*result = 0;
return;
}
}
{
typedef void (HIDActivityTracker::*_t)();
if (*reinterpret_cast<_t *>(func) == static_cast<_t>(&HIDActivityTracker::activityDetected)) {
if (*reinterpret_cast<_t *>(_a[1]) == static_cast<_t>(&HIDActivityTracker::activityDetected)) {
*result = 1;
return;
}
@ -105,7 +106,7 @@ void HIDActivityTracker::qt_static_metacall(QObject *_o, QMetaObject::Call _c, i
const QMetaObject HIDActivityTracker::staticMetaObject = {
{ &QObject::staticMetaObject, qt_meta_stringdata_HIDActivityTracker.data,
qt_meta_data_HIDActivityTracker, qt_static_metacall, Q_NULLPTR, Q_NULLPTR}
qt_meta_data_HIDActivityTracker, qt_static_metacall, nullptr, nullptr}
};
@ -116,9 +117,9 @@ const QMetaObject *HIDActivityTracker::metaObject() const
void *HIDActivityTracker::qt_metacast(const char *_clname)
{
if (!_clname) return Q_NULLPTR;
if (!_clname) return nullptr;
if (!strcmp(_clname, qt_meta_stringdata_HIDActivityTracker.stringdata0))
return static_cast<void*>(const_cast< HIDActivityTracker*>(this));
return static_cast<void*>(this);
return QObject::qt_metacast(_clname);
}
@ -142,12 +143,13 @@ int HIDActivityTracker::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
// SIGNAL 0
void HIDActivityTracker::idleDetected()
{
QMetaObject::activate(this, &staticMetaObject, 0, Q_NULLPTR);
QMetaObject::activate(this, &staticMetaObject, 0, nullptr);
}
// SIGNAL 1
void HIDActivityTracker::activityDetected()
{
QMetaObject::activate(this, &staticMetaObject, 1, Q_NULLPTR);
QMetaObject::activate(this, &staticMetaObject, 1, nullptr);
}
QT_WARNING_POP
QT_END_MOC_NAMESPACE

View File

@ -1,7 +1,7 @@
/****************************************************************************
** Meta object code from reading C++ file 'logger.h'
**
** Created by: The Qt Meta Object Compiler version 67 (Qt 5.6.2)
** Created by: The Qt Meta Object Compiler version 67 (Qt 5.9.5)
**
** WARNING! All changes made in this file will be lost!
*****************************************************************************/
@ -12,12 +12,14 @@
#if !defined(Q_MOC_OUTPUT_REVISION)
#error "The header file 'logger.h' doesn't include <QObject>."
#elif Q_MOC_OUTPUT_REVISION != 67
#error "This file was generated using the moc from 5.6.2. It"
#error "This file was generated using the moc from 5.9.5. It"
#error "cannot be used with the include files from this version of Qt."
#error "(The moc has changed too much.)"
#endif
QT_BEGIN_MOC_NAMESPACE
QT_WARNING_PUSH
QT_WARNING_DISABLE_DEPRECATED
struct qt_meta_stringdata_Logger_t {
QByteArrayData data[1];
char stringdata0[7];
@ -62,7 +64,7 @@ void Logger::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void
const QMetaObject Logger::staticMetaObject = {
{ &QObject::staticMetaObject, qt_meta_stringdata_Logger.data,
qt_meta_data_Logger, qt_static_metacall, Q_NULLPTR, Q_NULLPTR}
qt_meta_data_Logger, qt_static_metacall, nullptr, nullptr}
};
@ -73,17 +75,16 @@ const QMetaObject *Logger::metaObject() const
void *Logger::qt_metacast(const char *_clname)
{
if (!_clname) return Q_NULLPTR;
if (!_clname) return nullptr;
if (!strcmp(_clname, qt_meta_stringdata_Logger.stringdata0))
return static_cast<void*>(const_cast< Logger*>(this));
return static_cast<void*>(this);
return QObject::qt_metacast(_clname);
}
int Logger::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
_id = QObject::qt_metacall(_c, _id, _a);
if (_id < 0)
return _id;
return _id;
}
QT_WARNING_POP
QT_END_MOC_NAMESPACE

View File

@ -1,7 +1,7 @@
/****************************************************************************
** Meta object code from reading C++ file 'mainwindow.h'
**
** Created by: The Qt Meta Object Compiler version 67 (Qt 5.6.2)
** Created by: The Qt Meta Object Compiler version 67 (Qt 5.9.5)
**
** WARNING! All changes made in this file will be lost!
*****************************************************************************/
@ -12,12 +12,14 @@
#if !defined(Q_MOC_OUTPUT_REVISION)
#error "The header file 'mainwindow.h' doesn't include <QObject>."
#elif Q_MOC_OUTPUT_REVISION != 67
#error "This file was generated using the moc from 5.6.2. It"
#error "This file was generated using the moc from 5.9.5. It"
#error "cannot be used with the include files from this version of Qt."
#error "(The moc has changed too much.)"
#endif
QT_BEGIN_MOC_NAMESPACE
QT_WARNING_PUSH
QT_WARNING_DISABLE_DEPRECATED
struct qt_meta_stringdata_MainWindow_t {
QByteArrayData data[82];
char stringdata0[1077];
@ -378,17 +380,16 @@ void MainWindow::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id,
}
} else if (_c == QMetaObject::IndexOfMethod) {
int *result = reinterpret_cast<int *>(_a[0]);
void **func = reinterpret_cast<void **>(_a[1]);
{
typedef void (MainWindow::*_t)();
if (*reinterpret_cast<_t *>(func) == static_cast<_t>(&MainWindow::onTimeFormatChanged)) {
if (*reinterpret_cast<_t *>(_a[1]) == static_cast<_t>(&MainWindow::onTimeFormatChanged)) {
*result = 0;
return;
}
}
{
typedef void (MainWindow::*_t)();
if (*reinterpret_cast<_t *>(func) == static_cast<_t>(&MainWindow::onTimeChanged)) {
if (*reinterpret_cast<_t *>(_a[1]) == static_cast<_t>(&MainWindow::onTimeChanged)) {
*result = 1;
return;
}
@ -398,7 +399,7 @@ void MainWindow::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id,
const QMetaObject MainWindow::staticMetaObject = {
{ &QMainWindow::staticMetaObject, qt_meta_stringdata_MainWindow.data,
qt_meta_data_MainWindow, qt_static_metacall, Q_NULLPTR, Q_NULLPTR}
qt_meta_data_MainWindow, qt_static_metacall, nullptr, nullptr}
};
@ -409,9 +410,9 @@ const QMetaObject *MainWindow::metaObject() const
void *MainWindow::qt_metacast(const char *_clname)
{
if (!_clname) return Q_NULLPTR;
if (!_clname) return nullptr;
if (!strcmp(_clname, qt_meta_stringdata_MainWindow.stringdata0))
return static_cast<void*>(const_cast< MainWindow*>(this));
return static_cast<void*>(this);
return QMainWindow::qt_metacast(_clname);
}
@ -435,12 +436,13 @@ int MainWindow::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
// SIGNAL 0
void MainWindow::onTimeFormatChanged()
{
QMetaObject::activate(this, &staticMetaObject, 0, Q_NULLPTR);
QMetaObject::activate(this, &staticMetaObject, 0, nullptr);
}
// SIGNAL 1
void MainWindow::onTimeChanged()
{
QMetaObject::activate(this, &staticMetaObject, 1, Q_NULLPTR);
QMetaObject::activate(this, &staticMetaObject, 1, nullptr);
}
QT_WARNING_POP
QT_END_MOC_NAMESPACE

View File

@ -1,7 +1,7 @@
/****************************************************************************
** Meta object code from reading C++ file 'newpassworddlg.h'
**
** Created by: The Qt Meta Object Compiler version 67 (Qt 5.6.2)
** Created by: The Qt Meta Object Compiler version 67 (Qt 5.9.5)
**
** WARNING! All changes made in this file will be lost!
*****************************************************************************/
@ -12,12 +12,14 @@
#if !defined(Q_MOC_OUTPUT_REVISION)
#error "The header file 'newpassworddlg.h' doesn't include <QObject>."
#elif Q_MOC_OUTPUT_REVISION != 67
#error "This file was generated using the moc from 5.6.2. It"
#error "This file was generated using the moc from 5.9.5. It"
#error "cannot be used with the include files from this version of Qt."
#error "(The moc has changed too much.)"
#endif
QT_BEGIN_MOC_NAMESPACE
QT_WARNING_PUSH
QT_WARNING_DISABLE_DEPRECATED
struct qt_meta_stringdata_NewPasswordDlg_t {
QByteArrayData data[3];
char stringdata0[26];
@ -75,7 +77,7 @@ void NewPasswordDlg::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _
const QMetaObject NewPasswordDlg::staticMetaObject = {
{ &QDialog::staticMetaObject, qt_meta_stringdata_NewPasswordDlg.data,
qt_meta_data_NewPasswordDlg, qt_static_metacall, Q_NULLPTR, Q_NULLPTR}
qt_meta_data_NewPasswordDlg, qt_static_metacall, nullptr, nullptr}
};
@ -86,9 +88,9 @@ const QMetaObject *NewPasswordDlg::metaObject() const
void *NewPasswordDlg::qt_metacast(const char *_clname)
{
if (!_clname) return Q_NULLPTR;
if (!_clname) return nullptr;
if (!strcmp(_clname, qt_meta_stringdata_NewPasswordDlg.stringdata0))
return static_cast<void*>(const_cast< NewPasswordDlg*>(this));
return static_cast<void*>(this);
return QDialog::qt_metacast(_clname);
}
@ -108,4 +110,5 @@ int NewPasswordDlg::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
}
return _id;
}
QT_WARNING_POP
QT_END_MOC_NAMESPACE

View File

@ -1,7 +1,7 @@
/****************************************************************************
** Meta object code from reading C++ file 'passworddlg.h'
**
** Created by: The Qt Meta Object Compiler version 67 (Qt 5.6.2)
** Created by: The Qt Meta Object Compiler version 67 (Qt 5.9.5)
**
** WARNING! All changes made in this file will be lost!
*****************************************************************************/
@ -12,12 +12,14 @@
#if !defined(Q_MOC_OUTPUT_REVISION)
#error "The header file 'passworddlg.h' doesn't include <QObject>."
#elif Q_MOC_OUTPUT_REVISION != 67
#error "This file was generated using the moc from 5.6.2. It"
#error "This file was generated using the moc from 5.9.5. It"
#error "cannot be used with the include files from this version of Qt."
#error "(The moc has changed too much.)"
#endif
QT_BEGIN_MOC_NAMESPACE
QT_WARNING_PUSH
QT_WARNING_DISABLE_DEPRECATED
struct qt_meta_stringdata_PasswordDlg_t {
QByteArrayData data[1];
char stringdata0[12];
@ -62,7 +64,7 @@ void PasswordDlg::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id,
const QMetaObject PasswordDlg::staticMetaObject = {
{ &QDialog::staticMetaObject, qt_meta_stringdata_PasswordDlg.data,
qt_meta_data_PasswordDlg, qt_static_metacall, Q_NULLPTR, Q_NULLPTR}
qt_meta_data_PasswordDlg, qt_static_metacall, nullptr, nullptr}
};
@ -73,17 +75,16 @@ const QMetaObject *PasswordDlg::metaObject() const
void *PasswordDlg::qt_metacast(const char *_clname)
{
if (!_clname) return Q_NULLPTR;
if (!_clname) return nullptr;
if (!strcmp(_clname, qt_meta_stringdata_PasswordDlg.stringdata0))
return static_cast<void*>(const_cast< PasswordDlg*>(this));
return static_cast<void*>(this);
return QDialog::qt_metacast(_clname);
}
int PasswordDlg::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
_id = QDialog::qt_metacall(_c, _id, _a);
if (_id < 0)
return _id;
return _id;
}
QT_WARNING_POP
QT_END_MOC_NAMESPACE

View File

@ -1,7 +1,7 @@
/****************************************************************************
** Meta object code from reading C++ file 'preferencesdlg.h'
**
** Created by: The Qt Meta Object Compiler version 67 (Qt 5.6.2)
** Created by: The Qt Meta Object Compiler version 67 (Qt 5.9.5)
**
** WARNING! All changes made in this file will be lost!
*****************************************************************************/
@ -12,12 +12,14 @@
#if !defined(Q_MOC_OUTPUT_REVISION)
#error "The header file 'preferencesdlg.h' doesn't include <QObject>."
#elif Q_MOC_OUTPUT_REVISION != 67
#error "This file was generated using the moc from 5.6.2. It"
#error "This file was generated using the moc from 5.9.5. It"
#error "cannot be used with the include files from this version of Qt."
#error "(The moc has changed too much.)"
#endif
QT_BEGIN_MOC_NAMESPACE
QT_WARNING_PUSH
QT_WARNING_DISABLE_DEPRECATED
struct qt_meta_stringdata_PreferencesDlg_t {
QByteArrayData data[9];
char stringdata0[139];
@ -98,7 +100,7 @@ void PreferencesDlg::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _
const QMetaObject PreferencesDlg::staticMetaObject = {
{ &QDialog::staticMetaObject, qt_meta_stringdata_PreferencesDlg.data,
qt_meta_data_PreferencesDlg, qt_static_metacall, Q_NULLPTR, Q_NULLPTR}
qt_meta_data_PreferencesDlg, qt_static_metacall, nullptr, nullptr}
};
@ -109,9 +111,9 @@ const QMetaObject *PreferencesDlg::metaObject() const
void *PreferencesDlg::qt_metacast(const char *_clname)
{
if (!_clname) return Q_NULLPTR;
if (!_clname) return nullptr;
if (!strcmp(_clname, qt_meta_stringdata_PreferencesDlg.stringdata0))
return static_cast<void*>(const_cast< PreferencesDlg*>(this));
return static_cast<void*>(this);
return QDialog::qt_metacast(_clname);
}
@ -131,4 +133,5 @@ int PreferencesDlg::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
}
return _id;
}
QT_WARNING_POP
QT_END_MOC_NAMESPACE

View File

@ -1,7 +1,7 @@
/****************************************************************************
** Meta object code from reading C++ file 'sleeptracker_osx.h'
**
** Created by: The Qt Meta Object Compiler version 67 (Qt 5.6.2)
** Created by: The Qt Meta Object Compiler version 67 (Qt 5.9.5)
**
** WARNING! All changes made in this file will be lost!
*****************************************************************************/
@ -12,12 +12,14 @@
#if !defined(Q_MOC_OUTPUT_REVISION)
#error "The header file 'sleeptracker_osx.h' doesn't include <QObject>."
#elif Q_MOC_OUTPUT_REVISION != 67
#error "This file was generated using the moc from 5.6.2. It"
#error "This file was generated using the moc from 5.9.5. It"
#error "cannot be used with the include files from this version of Qt."
#error "(The moc has changed too much.)"
#endif
QT_BEGIN_MOC_NAMESPACE
QT_WARNING_PUSH
QT_WARNING_DISABLE_DEPRECATED
struct qt_meta_stringdata_SleepTracker_t {
QByteArrayData data[4];
char stringdata0[43];
@ -75,17 +77,16 @@ void SleepTracker::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id
}
} else if (_c == QMetaObject::IndexOfMethod) {
int *result = reinterpret_cast<int *>(_a[0]);
void **func = reinterpret_cast<void **>(_a[1]);
{
typedef void (SleepTracker::*_t)();
if (*reinterpret_cast<_t *>(func) == static_cast<_t>(&SleepTracker::onSystemSleep)) {
if (*reinterpret_cast<_t *>(_a[1]) == static_cast<_t>(&SleepTracker::onSystemSleep)) {
*result = 0;
return;
}
}
{
typedef void (SleepTracker::*_t)();
if (*reinterpret_cast<_t *>(func) == static_cast<_t>(&SleepTracker::onSystemResume)) {
if (*reinterpret_cast<_t *>(_a[1]) == static_cast<_t>(&SleepTracker::onSystemResume)) {
*result = 1;
return;
}
@ -96,7 +97,7 @@ void SleepTracker::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id
const QMetaObject SleepTracker::staticMetaObject = {
{ &QObject::staticMetaObject, qt_meta_stringdata_SleepTracker.data,
qt_meta_data_SleepTracker, qt_static_metacall, Q_NULLPTR, Q_NULLPTR}
qt_meta_data_SleepTracker, qt_static_metacall, nullptr, nullptr}
};
@ -107,9 +108,9 @@ const QMetaObject *SleepTracker::metaObject() const
void *SleepTracker::qt_metacast(const char *_clname)
{
if (!_clname) return Q_NULLPTR;
if (!_clname) return nullptr;
if (!strcmp(_clname, qt_meta_stringdata_SleepTracker.stringdata0))
return static_cast<void*>(const_cast< SleepTracker*>(this));
return static_cast<void*>(this);
return QObject::qt_metacast(_clname);
}
@ -133,12 +134,13 @@ int SleepTracker::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
// SIGNAL 0
void SleepTracker::onSystemSleep()
{
QMetaObject::activate(this, &staticMetaObject, 0, Q_NULLPTR);
QMetaObject::activate(this, &staticMetaObject, 0, nullptr);
}
// SIGNAL 1
void SleepTracker::onSystemResume()
{
QMetaObject::activate(this, &staticMetaObject, 1, Q_NULLPTR);
QMetaObject::activate(this, &staticMetaObject, 1, nullptr);
}
QT_WARNING_POP
QT_END_MOC_NAMESPACE

View File

@ -1,7 +1,7 @@
/****************************************************************************
** Meta object code from reading C++ file 'startworkdialog.h'
**
** Created by: The Qt Meta Object Compiler version 67 (Qt 5.6.2)
** Created by: The Qt Meta Object Compiler version 67 (Qt 5.9.5)
**
** WARNING! All changes made in this file will be lost!
*****************************************************************************/
@ -12,12 +12,14 @@
#if !defined(Q_MOC_OUTPUT_REVISION)
#error "The header file 'startworkdialog.h' doesn't include <QObject>."
#elif Q_MOC_OUTPUT_REVISION != 67
#error "This file was generated using the moc from 5.6.2. It"
#error "This file was generated using the moc from 5.9.5. It"
#error "cannot be used with the include files from this version of Qt."
#error "(The moc has changed too much.)"
#endif
QT_BEGIN_MOC_NAMESPACE
QT_WARNING_PUSH
QT_WARNING_DISABLE_DEPRECATED
struct qt_meta_stringdata_StartWorkDialog_t {
QByteArrayData data[7];
char stringdata0[112];
@ -93,17 +95,16 @@ void StartWorkDialog::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int
}
} else if (_c == QMetaObject::IndexOfMethod) {
int *result = reinterpret_cast<int *>(_a[0]);
void **func = reinterpret_cast<void **>(_a[1]);
{
typedef void (StartWorkDialog::*_t)();
if (*reinterpret_cast<_t *>(func) == static_cast<_t>(&StartWorkDialog::continueTracking)) {
if (*reinterpret_cast<_t *>(_a[1]) == static_cast<_t>(&StartWorkDialog::continueTracking)) {
*result = 0;
return;
}
}
{
typedef void (StartWorkDialog::*_t)();
if (*reinterpret_cast<_t *>(func) == static_cast<_t>(&StartWorkDialog::breakTracking)) {
if (*reinterpret_cast<_t *>(_a[1]) == static_cast<_t>(&StartWorkDialog::breakTracking)) {
*result = 1;
return;
}
@ -114,7 +115,7 @@ void StartWorkDialog::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int
const QMetaObject StartWorkDialog::staticMetaObject = {
{ &QDialog::staticMetaObject, qt_meta_stringdata_StartWorkDialog.data,
qt_meta_data_StartWorkDialog, qt_static_metacall, Q_NULLPTR, Q_NULLPTR}
qt_meta_data_StartWorkDialog, qt_static_metacall, nullptr, nullptr}
};
@ -125,9 +126,9 @@ const QMetaObject *StartWorkDialog::metaObject() const
void *StartWorkDialog::qt_metacast(const char *_clname)
{
if (!_clname) return Q_NULLPTR;
if (!_clname) return nullptr;
if (!strcmp(_clname, qt_meta_stringdata_StartWorkDialog.stringdata0))
return static_cast<void*>(const_cast< StartWorkDialog*>(this));
return static_cast<void*>(this);
return QDialog::qt_metacast(_clname);
}
@ -151,12 +152,13 @@ int StartWorkDialog::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
// SIGNAL 0
void StartWorkDialog::continueTracking()
{
QMetaObject::activate(this, &staticMetaObject, 0, Q_NULLPTR);
QMetaObject::activate(this, &staticMetaObject, 0, nullptr);
}
// SIGNAL 1
void StartWorkDialog::breakTracking()
{
QMetaObject::activate(this, &staticMetaObject, 1, Q_NULLPTR);
QMetaObject::activate(this, &staticMetaObject, 1, nullptr);
}
QT_WARNING_POP
QT_END_MOC_NAMESPACE

View File

@ -1,7 +1,7 @@
/****************************************************************************
** Meta object code from reading C++ file 'stopworkdialog.h'
**
** Created by: The Qt Meta Object Compiler version 67 (Qt 5.6.2)
** Created by: The Qt Meta Object Compiler version 67 (Qt 5.9.5)
**
** WARNING! All changes made in this file will be lost!
*****************************************************************************/
@ -12,12 +12,14 @@
#if !defined(Q_MOC_OUTPUT_REVISION)
#error "The header file 'stopworkdialog.h' doesn't include <QObject>."
#elif Q_MOC_OUTPUT_REVISION != 67
#error "This file was generated using the moc from 5.6.2. It"
#error "This file was generated using the moc from 5.9.5. It"
#error "cannot be used with the include files from this version of Qt."
#error "(The moc has changed too much.)"
#endif
QT_BEGIN_MOC_NAMESPACE
QT_WARNING_PUSH
QT_WARNING_DISABLE_DEPRECATED
struct qt_meta_stringdata_StopWorkDialog_t {
QByteArrayData data[8];
char stringdata0[120];
@ -94,17 +96,16 @@ void StopWorkDialog::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _
}
} else if (_c == QMetaObject::IndexOfMethod) {
int *result = reinterpret_cast<int *>(_a[0]);
void **func = reinterpret_cast<void **>(_a[1]);
{
typedef void (StopWorkDialog::*_t)();
if (*reinterpret_cast<_t *>(func) == static_cast<_t>(&StopWorkDialog::continueTracking)) {
if (*reinterpret_cast<_t *>(_a[1]) == static_cast<_t>(&StopWorkDialog::continueTracking)) {
*result = 0;
return;
}
}
{
typedef void (StopWorkDialog::*_t)(const QDateTime & );
if (*reinterpret_cast<_t *>(func) == static_cast<_t>(&StopWorkDialog::breakTracking)) {
if (*reinterpret_cast<_t *>(_a[1]) == static_cast<_t>(&StopWorkDialog::breakTracking)) {
*result = 1;
return;
}
@ -114,7 +115,7 @@ void StopWorkDialog::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _
const QMetaObject StopWorkDialog::staticMetaObject = {
{ &QDialog::staticMetaObject, qt_meta_stringdata_StopWorkDialog.data,
qt_meta_data_StopWorkDialog, qt_static_metacall, Q_NULLPTR, Q_NULLPTR}
qt_meta_data_StopWorkDialog, qt_static_metacall, nullptr, nullptr}
};
@ -125,9 +126,9 @@ const QMetaObject *StopWorkDialog::metaObject() const
void *StopWorkDialog::qt_metacast(const char *_clname)
{
if (!_clname) return Q_NULLPTR;
if (!_clname) return nullptr;
if (!strcmp(_clname, qt_meta_stringdata_StopWorkDialog.stringdata0))
return static_cast<void*>(const_cast< StopWorkDialog*>(this));
return static_cast<void*>(this);
return QDialog::qt_metacast(_clname);
}
@ -151,13 +152,14 @@ int StopWorkDialog::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
// SIGNAL 0
void StopWorkDialog::continueTracking()
{
QMetaObject::activate(this, &staticMetaObject, 0, Q_NULLPTR);
QMetaObject::activate(this, &staticMetaObject, 0, nullptr);
}
// SIGNAL 1
void StopWorkDialog::breakTracking(const QDateTime & _t1)
{
void *_a[] = { Q_NULLPTR, const_cast<void*>(reinterpret_cast<const void*>(&_t1)) };
void *_a[] = { nullptr, const_cast<void*>(reinterpret_cast<const void*>(&_t1)) };
QMetaObject::activate(this, &staticMetaObject, 1, _a);
}
QT_WARNING_POP
QT_END_MOC_NAMESPACE

View File

@ -1,7 +1,7 @@
/****************************************************************************
** Meta object code from reading C++ file 'task.h'
**
** Created by: The Qt Meta Object Compiler version 67 (Qt 5.6.2)
** Created by: The Qt Meta Object Compiler version 67 (Qt 5.9.5)
**
** WARNING! All changes made in this file will be lost!
*****************************************************************************/
@ -12,12 +12,14 @@
#if !defined(Q_MOC_OUTPUT_REVISION)
#error "The header file 'task.h' doesn't include <QObject>."
#elif Q_MOC_OUTPUT_REVISION != 67
#error "This file was generated using the moc from 5.6.2. It"
#error "This file was generated using the moc from 5.9.5. It"
#error "cannot be used with the include files from this version of Qt."
#error "(The moc has changed too much.)"
#endif
QT_BEGIN_MOC_NAMESPACE
QT_WARNING_PUSH
QT_WARNING_DISABLE_DEPRECATED
struct qt_meta_stringdata_Task_t {
QByteArrayData data[1];
char stringdata0[5];
@ -62,7 +64,7 @@ void Task::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void *
const QMetaObject Task::staticMetaObject = {
{ &QObject::staticMetaObject, qt_meta_stringdata_Task.data,
qt_meta_data_Task, qt_static_metacall, Q_NULLPTR, Q_NULLPTR}
qt_meta_data_Task, qt_static_metacall, nullptr, nullptr}
};
@ -73,17 +75,16 @@ const QMetaObject *Task::metaObject() const
void *Task::qt_metacast(const char *_clname)
{
if (!_clname) return Q_NULLPTR;
if (!_clname) return nullptr;
if (!strcmp(_clname, qt_meta_stringdata_Task.stringdata0))
return static_cast<void*>(const_cast< Task*>(this));
return static_cast<void*>(this);
return QObject::qt_metacast(_clname);
}
int Task::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
_id = QObject::qt_metacall(_c, _id, _a);
if (_id < 0)
return _id;
return _id;
}
QT_WARNING_POP
QT_END_MOC_NAMESPACE

View File

@ -1,7 +1,7 @@
/****************************************************************************
** Meta object code from reading C++ file 'tasktreemodel.h'
**
** Created by: The Qt Meta Object Compiler version 67 (Qt 5.6.2)
** Created by: The Qt Meta Object Compiler version 67 (Qt 5.9.5)
**
** WARNING! All changes made in this file will be lost!
*****************************************************************************/
@ -12,12 +12,14 @@
#if !defined(Q_MOC_OUTPUT_REVISION)
#error "The header file 'tasktreemodel.h' doesn't include <QObject>."
#elif Q_MOC_OUTPUT_REVISION != 67
#error "This file was generated using the moc from 5.6.2. It"
#error "This file was generated using the moc from 5.9.5. It"
#error "cannot be used with the include files from this version of Qt."
#error "(The moc has changed too much.)"
#endif
QT_BEGIN_MOC_NAMESPACE
QT_WARNING_PUSH
QT_WARNING_DISABLE_DEPRECATED
struct qt_meta_stringdata_TaskTreeModel_t {
QByteArrayData data[5];
char stringdata0[35];
@ -73,10 +75,9 @@ void TaskTreeModel::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _i
}
} else if (_c == QMetaObject::IndexOfMethod) {
int *result = reinterpret_cast<int *>(_a[0]);
void **func = reinterpret_cast<void **>(_a[1]);
{
typedef void (TaskTreeModel::*_t)(PTask );
if (*reinterpret_cast<_t *>(func) == static_cast<_t>(&TaskTreeModel::onTaskMoved)) {
if (*reinterpret_cast<_t *>(_a[1]) == static_cast<_t>(&TaskTreeModel::onTaskMoved)) {
*result = 0;
return;
}
@ -86,7 +87,7 @@ void TaskTreeModel::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _i
const QMetaObject TaskTreeModel::staticMetaObject = {
{ &QAbstractItemModel::staticMetaObject, qt_meta_stringdata_TaskTreeModel.data,
qt_meta_data_TaskTreeModel, qt_static_metacall, Q_NULLPTR, Q_NULLPTR}
qt_meta_data_TaskTreeModel, qt_static_metacall, nullptr, nullptr}
};
@ -97,9 +98,9 @@ const QMetaObject *TaskTreeModel::metaObject() const
void *TaskTreeModel::qt_metacast(const char *_clname)
{
if (!_clname) return Q_NULLPTR;
if (!_clname) return nullptr;
if (!strcmp(_clname, qt_meta_stringdata_TaskTreeModel.stringdata0))
return static_cast<void*>(const_cast< TaskTreeModel*>(this));
return static_cast<void*>(this);
return QAbstractItemModel::qt_metacast(_clname);
}
@ -123,7 +124,7 @@ int TaskTreeModel::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
// SIGNAL 0
void TaskTreeModel::onTaskMoved(PTask _t1)
{
void *_a[] = { Q_NULLPTR, const_cast<void*>(reinterpret_cast<const void*>(&_t1)) };
void *_a[] = { nullptr, const_cast<void*>(reinterpret_cast<const void*>(&_t1)) };
QMetaObject::activate(this, &staticMetaObject, 0, _a);
}
struct qt_meta_stringdata_TaskItemDelegate_t {
@ -170,7 +171,7 @@ void TaskItemDelegate::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int
const QMetaObject TaskItemDelegate::staticMetaObject = {
{ &QItemDelegate::staticMetaObject, qt_meta_stringdata_TaskItemDelegate.data,
qt_meta_data_TaskItemDelegate, qt_static_metacall, Q_NULLPTR, Q_NULLPTR}
qt_meta_data_TaskItemDelegate, qt_static_metacall, nullptr, nullptr}
};
@ -181,17 +182,16 @@ const QMetaObject *TaskItemDelegate::metaObject() const
void *TaskItemDelegate::qt_metacast(const char *_clname)
{
if (!_clname) return Q_NULLPTR;
if (!_clname) return nullptr;
if (!strcmp(_clname, qt_meta_stringdata_TaskItemDelegate.stringdata0))
return static_cast<void*>(const_cast< TaskItemDelegate*>(this));
return static_cast<void*>(this);
return QItemDelegate::qt_metacast(_clname);
}
int TaskItemDelegate::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
_id = QItemDelegate::qt_metacall(_c, _id, _a);
if (_id < 0)
return _id;
return _id;
}
QT_WARNING_POP
QT_END_MOC_NAMESPACE

View File

@ -1,7 +1,7 @@
/****************************************************************************
** Meta object code from reading C++ file 'timeintervaldlg.h'
**
** Created by: The Qt Meta Object Compiler version 67 (Qt 5.6.2)
** Created by: The Qt Meta Object Compiler version 67 (Qt 5.9.5)
**
** WARNING! All changes made in this file will be lost!
*****************************************************************************/
@ -12,12 +12,14 @@
#if !defined(Q_MOC_OUTPUT_REVISION)
#error "The header file 'timeintervaldlg.h' doesn't include <QObject>."
#elif Q_MOC_OUTPUT_REVISION != 67
#error "This file was generated using the moc from 5.6.2. It"
#error "This file was generated using the moc from 5.9.5. It"
#error "cannot be used with the include files from this version of Qt."
#error "(The moc has changed too much.)"
#endif
QT_BEGIN_MOC_NAMESPACE
QT_WARNING_PUSH
QT_WARNING_DISABLE_DEPRECATED
struct qt_meta_stringdata_TimeIntervalDlg_t {
QByteArrayData data[4];
char stringdata0[37];
@ -75,7 +77,7 @@ void TimeIntervalDlg::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int
const QMetaObject TimeIntervalDlg::staticMetaObject = {
{ &QDialog::staticMetaObject, qt_meta_stringdata_TimeIntervalDlg.data,
qt_meta_data_TimeIntervalDlg, qt_static_metacall, Q_NULLPTR, Q_NULLPTR}
qt_meta_data_TimeIntervalDlg, qt_static_metacall, nullptr, nullptr}
};
@ -86,9 +88,9 @@ const QMetaObject *TimeIntervalDlg::metaObject() const
void *TimeIntervalDlg::qt_metacast(const char *_clname)
{
if (!_clname) return Q_NULLPTR;
if (!_clname) return nullptr;
if (!strcmp(_clname, qt_meta_stringdata_TimeIntervalDlg.stringdata0))
return static_cast<void*>(const_cast< TimeIntervalDlg*>(this));
return static_cast<void*>(this);
return QDialog::qt_metacast(_clname);
}
@ -108,4 +110,5 @@ int TimeIntervalDlg::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
}
return _id;
}
QT_WARNING_POP
QT_END_MOC_NAMESPACE

View File

@ -1,7 +1,7 @@
/****************************************************************************
** Meta object code from reading C++ file 'timereportwizard.h'
**
** Created by: The Qt Meta Object Compiler version 67 (Qt 5.6.2)
** Created by: The Qt Meta Object Compiler version 67 (Qt 5.9.5)
**
** WARNING! All changes made in this file will be lost!
*****************************************************************************/
@ -12,12 +12,14 @@
#if !defined(Q_MOC_OUTPUT_REVISION)
#error "The header file 'timereportwizard.h' doesn't include <QObject>."
#elif Q_MOC_OUTPUT_REVISION != 67
#error "This file was generated using the moc from 5.6.2. It"
#error "This file was generated using the moc from 5.9.5. It"
#error "cannot be used with the include files from this version of Qt."
#error "(The moc has changed too much.)"
#endif
QT_BEGIN_MOC_NAMESPACE
QT_WARNING_PUSH
QT_WARNING_DISABLE_DEPRECATED
struct qt_meta_stringdata_TaskTreePage_t {
QByteArrayData data[3];
char stringdata0[23];
@ -75,7 +77,7 @@ void TaskTreePage::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id
const QMetaObject TaskTreePage::staticMetaObject = {
{ &QWizardPage::staticMetaObject, qt_meta_stringdata_TaskTreePage.data,
qt_meta_data_TaskTreePage, qt_static_metacall, Q_NULLPTR, Q_NULLPTR}
qt_meta_data_TaskTreePage, qt_static_metacall, nullptr, nullptr}
};
@ -86,9 +88,9 @@ const QMetaObject *TaskTreePage::metaObject() const
void *TaskTreePage::qt_metacast(const char *_clname)
{
if (!_clname) return Q_NULLPTR;
if (!_clname) return nullptr;
if (!strcmp(_clname, qt_meta_stringdata_TaskTreePage.stringdata0))
return static_cast<void*>(const_cast< TaskTreePage*>(this));
return static_cast<void*>(this);
return QWizardPage::qt_metacast(_clname);
}
@ -165,7 +167,7 @@ void CumulativeOptionPage::qt_static_metacall(QObject *_o, QMetaObject::Call _c,
const QMetaObject CumulativeOptionPage::staticMetaObject = {
{ &QWizardPage::staticMetaObject, qt_meta_stringdata_CumulativeOptionPage.data,
qt_meta_data_CumulativeOptionPage, qt_static_metacall, Q_NULLPTR, Q_NULLPTR}
qt_meta_data_CumulativeOptionPage, qt_static_metacall, nullptr, nullptr}
};
@ -176,9 +178,9 @@ const QMetaObject *CumulativeOptionPage::metaObject() const
void *CumulativeOptionPage::qt_metacast(const char *_clname)
{
if (!_clname) return Q_NULLPTR;
if (!_clname) return nullptr;
if (!strcmp(_clname, qt_meta_stringdata_CumulativeOptionPage.stringdata0))
return static_cast<void*>(const_cast< CumulativeOptionPage*>(this));
return static_cast<void*>(this);
return QWizardPage::qt_metacast(_clname);
}
@ -242,7 +244,7 @@ void DateIntervalPage::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int
const QMetaObject DateIntervalPage::staticMetaObject = {
{ &QWizardPage::staticMetaObject, qt_meta_stringdata_DateIntervalPage.data,
qt_meta_data_DateIntervalPage, qt_static_metacall, Q_NULLPTR, Q_NULLPTR}
qt_meta_data_DateIntervalPage, qt_static_metacall, nullptr, nullptr}
};
@ -253,17 +255,15 @@ const QMetaObject *DateIntervalPage::metaObject() const
void *DateIntervalPage::qt_metacast(const char *_clname)
{
if (!_clname) return Q_NULLPTR;
if (!_clname) return nullptr;
if (!strcmp(_clname, qt_meta_stringdata_DateIntervalPage.stringdata0))
return static_cast<void*>(const_cast< DateIntervalPage*>(this));
return static_cast<void*>(this);
return QWizardPage::qt_metacast(_clname);
}
int DateIntervalPage::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
_id = QWizardPage::qt_metacall(_c, _id, _a);
if (_id < 0)
return _id;
return _id;
}
struct qt_meta_stringdata_ReportViewPage_t {
@ -310,7 +310,7 @@ void ReportViewPage::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _
const QMetaObject ReportViewPage::staticMetaObject = {
{ &QWizardPage::staticMetaObject, qt_meta_stringdata_ReportViewPage.data,
qt_meta_data_ReportViewPage, qt_static_metacall, Q_NULLPTR, Q_NULLPTR}
qt_meta_data_ReportViewPage, qt_static_metacall, nullptr, nullptr}
};
@ -321,17 +321,15 @@ const QMetaObject *ReportViewPage::metaObject() const
void *ReportViewPage::qt_metacast(const char *_clname)
{
if (!_clname) return Q_NULLPTR;
if (!_clname) return nullptr;
if (!strcmp(_clname, qt_meta_stringdata_ReportViewPage.stringdata0))
return static_cast<void*>(const_cast< ReportViewPage*>(this));
return static_cast<void*>(this);
return QWizardPage::qt_metacast(_clname);
}
int ReportViewPage::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
_id = QWizardPage::qt_metacall(_c, _id, _a);
if (_id < 0)
return _id;
return _id;
}
struct qt_meta_stringdata_TimeReportWizard_t {
@ -396,7 +394,7 @@ void TimeReportWizard::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int
const QMetaObject TimeReportWizard::staticMetaObject = {
{ &QWizard::staticMetaObject, qt_meta_stringdata_TimeReportWizard.data,
qt_meta_data_TimeReportWizard, qt_static_metacall, Q_NULLPTR, Q_NULLPTR}
qt_meta_data_TimeReportWizard, qt_static_metacall, nullptr, nullptr}
};
@ -407,9 +405,9 @@ const QMetaObject *TimeReportWizard::metaObject() const
void *TimeReportWizard::qt_metacast(const char *_clname)
{
if (!_clname) return Q_NULLPTR;
if (!_clname) return nullptr;
if (!strcmp(_clname, qt_meta_stringdata_TimeReportWizard.stringdata0))
return static_cast<void*>(const_cast< TimeReportWizard*>(this));
return static_cast<void*>(this);
return QWizard::qt_metacast(_clname);
}
@ -429,4 +427,5 @@ int TimeReportWizard::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
}
return _id;
}
QT_WARNING_POP
QT_END_MOC_NAMESPACE

View File

@ -1,7 +1,7 @@
/****************************************************************************
** Meta object code from reading C++ file 'timetreedlg.h'
**
** Created by: The Qt Meta Object Compiler version 67 (Qt 5.6.2)
** Created by: The Qt Meta Object Compiler version 67 (Qt 5.9.5)
**
** WARNING! All changes made in this file will be lost!
*****************************************************************************/
@ -12,12 +12,14 @@
#if !defined(Q_MOC_OUTPUT_REVISION)
#error "The header file 'timetreedlg.h' doesn't include <QObject>."
#elif Q_MOC_OUTPUT_REVISION != 67
#error "This file was generated using the moc from 5.6.2. It"
#error "This file was generated using the moc from 5.9.5. It"
#error "cannot be used with the include files from this version of Qt."
#error "(The moc has changed too much.)"
#endif
QT_BEGIN_MOC_NAMESPACE
QT_WARNING_PUSH
QT_WARNING_DISABLE_DEPRECATED
struct qt_meta_stringdata_TimeTreeDlg_t {
QByteArrayData data[6];
char stringdata0[77];
@ -88,7 +90,7 @@ void TimeTreeDlg::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id,
const QMetaObject TimeTreeDlg::staticMetaObject = {
{ &QDialog::staticMetaObject, qt_meta_stringdata_TimeTreeDlg.data,
qt_meta_data_TimeTreeDlg, qt_static_metacall, Q_NULLPTR, Q_NULLPTR}
qt_meta_data_TimeTreeDlg, qt_static_metacall, nullptr, nullptr}
};
@ -99,9 +101,9 @@ const QMetaObject *TimeTreeDlg::metaObject() const
void *TimeTreeDlg::qt_metacast(const char *_clname)
{
if (!_clname) return Q_NULLPTR;
if (!_clname) return nullptr;
if (!strcmp(_clname, qt_meta_stringdata_TimeTreeDlg.stringdata0))
return static_cast<void*>(const_cast< TimeTreeDlg*>(this));
return static_cast<void*>(this);
return QDialog::qt_metacast(_clname);
}
@ -121,4 +123,5 @@ int TimeTreeDlg::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
}
return _id;
}
QT_WARNING_POP
QT_END_MOC_NAMESPACE

View File

@ -6,111 +6,126 @@
#include <QFileDialog>
#include <QMessageBox>
#include <QSysInfo>
#include <QTextStream>
#define GET_BOOL(KEY) settings.data().value(KEY).toBool()
PreferencesDlg::PreferencesDlg(QWidget *parent, Settings& settings) :
QDialog(parent, Qt::Sheet),
ui(new Ui::PreferencesDlg),
mSettings(settings)
QDialog(parent, Qt::Sheet),
ui(new Ui::PreferencesDlg),
mSettings(settings)
{
ui->setupUi(this);
connect(ui->mSelectDatabaseButton, SIGNAL(clicked()), this, SLOT(selectDatabase()));
connect(ui->buttonBox, SIGNAL(accepted()), this, SLOT(accepted()));
connect(ui->mSmartStopTracking, SIGNAL(toggled(bool)), this, SLOT(smartStopSettingChanged(bool)));
connect(ui->mSmartStartTracking, SIGNAL(toggled(bool)), this, SLOT(smartStartSettingChanged(bool)));
ui->setupUi(this);
connect(ui->mSelectDatabaseButton, SIGNAL(clicked()), this, SLOT(selectDatabase()));
connect(ui->buttonBox, SIGNAL(accepted()), this, SLOT(accepted()));
connect(ui->mSmartStopTracking, SIGNAL(toggled(bool)), this, SLOT(smartStopSettingChanged(bool)));
connect(ui->mSmartStartTracking, SIGNAL(toggled(bool)), this, SLOT(smartStartSettingChanged(bool)));
// Autosave password
ui->mAutosavePasswordCheckbox->setChecked(settings.data().value(KEY_AUTOSAVE_PASSWORD).toBool());
// Autosave password
ui->mAutosavePasswordCheckbox->setChecked(settings.data().value(KEY_AUTOSAVE_PASSWORD).toBool());
// Show seconds or not?
ui->mShowSecondsCheckbox->setChecked(settings.data().value(KEY_SHOW_SECONDS).toBool());
// Show seconds or not?
ui->mShowSecondsCheckbox->setChecked(settings.data().value(KEY_SHOW_SECONDS).toBool());
// Use custom database path ?
ui->mCustomDatabaseFileCheckbox->setChecked(settings.data().value(KEY_DB_FILENAME_SPECIFIED).toBool());
if (settings.data().value(KEY_DB_FILENAME_SPECIFIED).toBool())
ui->mDatabaseLocation->setText(settings.data().value(KEY_DB_FILENAME).toString());
else
ui->mDatabaseLocation->setText(PathHelper::pathToDatabase());
// Dark theme ?
ui->mDarkThemeCheckbox->setChecked(settings.data().value(KEY_DARK_THEME).toBool());
// Use stop on idle ?
ui->mSmartStopTracking->setChecked(GET_BOOL(KEY_SMART_STOP));
ui->mSmartStopIntervalInMinutes->setText(settings.data().value(KEY_SMART_STOP_MINUTES).toString());
ui->mAskQuestionOnStopRadiobutton->setChecked(GET_BOOL(KEY_ASK_STOP));
ui->mAutomaticallyOnStopRadiobutton->setChecked(!GET_BOOL(KEY_ASK_STOP));
// Use custom database path ?
ui->mCustomDatabaseFileCheckbox->setChecked(settings.data().value(KEY_DB_FILENAME_SPECIFIED).toBool());
if (settings.data().value(KEY_DB_FILENAME_SPECIFIED).toBool())
ui->mDatabaseLocation->setText(settings.data().value(KEY_DB_FILENAME).toString());
else
ui->mDatabaseLocation->setText(PathHelper::pathToDatabase());
// Use start after idle ?
ui->mSmartStartTracking->setChecked(GET_BOOL(KEY_SMART_START));
//ui->mAskQuestionOnStartRadiobutton->setChecked(GET_BOOL(KEY_ASK_START));
//ui->mAutomaticallyOnStartRadiobutton->setChecked(!GET_BOOL(KEY_ASK_START));
// Use stop on idle ?
ui->mSmartStopTracking->setChecked(GET_BOOL(KEY_SMART_STOP));
ui->mSmartStopIntervalInMinutes->setText(settings.data().value(KEY_SMART_STOP_MINUTES).toString());
ui->mAskQuestionOnStopRadiobutton->setChecked(GET_BOOL(KEY_ASK_STOP));
ui->mAutomaticallyOnStopRadiobutton->setChecked(!GET_BOOL(KEY_ASK_STOP));
allowStartAfterIdleControls();
// Use start after idle ?
ui->mSmartStartTracking->setChecked(GET_BOOL(KEY_SMART_START));
//ui->mAskQuestionOnStartRadiobutton->setChecked(GET_BOOL(KEY_ASK_START));
//ui->mAutomaticallyOnStartRadiobutton->setChecked(!GET_BOOL(KEY_ASK_START));
ui->mShowTrayIconCheckbox->setChecked(GET_BOOL(KEY_SHOW_TRAY_ICON));
allowStartAfterIdleControls();
ui->mShowTrayIconCheckbox->setChecked(GET_BOOL(KEY_SHOW_TRAY_ICON));
}
PreferencesDlg::~PreferencesDlg()
{
delete ui;
delete ui;
}
void PreferencesDlg::selectDatabase()
{
QFileDialog dlg(this, tr("Select database to use"), PathHelper::pathToDesktop());
dlg.setAcceptMode(QFileDialog::AcceptSave);
dlg.setFileMode(QFileDialog::AnyFile);
if (dlg.exec() == QDialog::Accepted)
{
QString filename = dlg.selectedFiles().front();
ui->mDatabaseLocation->setText(filename);
}
QFileDialog dlg(this, tr("Select database to use"), PathHelper::pathToDesktop());
dlg.setAcceptMode(QFileDialog::AcceptSave);
dlg.setFileMode(QFileDialog::AnyFile);
if (dlg.exec() == QDialog::Accepted)
{
QString filename = dlg.selectedFiles().front();
ui->mDatabaseLocation->setText(filename);
}
}
void PreferencesDlg::accepted()
{
mSettings.data()[KEY_AUTOSAVE_PASSWORD] = ui->mAutosavePasswordCheckbox->isChecked();
mSettings.data()[KEY_SHOW_SECONDS] = ui->mShowSecondsCheckbox->isChecked();
mSettings.data()[KEY_DB_FILENAME_SPECIFIED] = ui->mCustomDatabaseFileCheckbox->isChecked();
mSettings.data()[KEY_DB_FILENAME] = ui->mDatabaseLocation->text();
mSettings.data()[KEY_SMART_STOP] = ui->mSmartStopTracking->isChecked();
mSettings.data()[KEY_SMART_STOP_MINUTES] = ui->mSmartStopIntervalInMinutes->text().toInt();
mSettings.data()[KEY_SMART_START] = ui->mSmartStartTracking->isChecked();
mSettings.data()[KEY_SHOW_TRAY_ICON] = ui->mShowTrayIconCheckbox->isChecked();
//mSettings.data()[KEY_ASK_START] = ui->mAskQuestionOnStartRadiobutton->isChecked();
mSettings.data()[KEY_ASK_STOP] = ui->mAskQuestionOnStopRadiobutton->isChecked();
mSettings.data()[KEY_AUTOSAVE_PASSWORD] = ui->mAutosavePasswordCheckbox->isChecked();
mSettings.data()[KEY_SHOW_SECONDS] = ui->mShowSecondsCheckbox->isChecked();
mSettings.data()[KEY_DB_FILENAME_SPECIFIED] = ui->mCustomDatabaseFileCheckbox->isChecked();
mSettings.data()[KEY_DB_FILENAME] = ui->mDatabaseLocation->text();
mSettings.data()[KEY_SMART_STOP] = ui->mSmartStopTracking->isChecked();
mSettings.data()[KEY_SMART_STOP_MINUTES] = ui->mSmartStopIntervalInMinutes->text().toInt();
mSettings.data()[KEY_SMART_START] = ui->mSmartStartTracking->isChecked();
mSettings.data()[KEY_SHOW_TRAY_ICON] = ui->mShowTrayIconCheckbox->isChecked();
//mSettings.data()[KEY_ASK_START] = ui->mAskQuestionOnStartRadiobutton->isChecked();
mSettings.data()[KEY_ASK_STOP] = ui->mAskQuestionOnStopRadiobutton->isChecked();
if (mSettings.data()[KEY_DARK_THEME].toBool() != ui->mDarkThemeCheckbox->isChecked()) {
mSettings.data()[KEY_DARK_THEME] = ui->mDarkThemeCheckbox->isChecked();
applyTheme();
}
}
void PreferencesDlg::smartStopSettingChanged(bool v)
{
if (v)
{
if (!ActivityTrackerHelper::ensureSmartTrackingIsPossible())
ui->mSmartStopTracking->setChecked(false);
}
allowStartAfterIdleControls();
if (v)
{
if (!ActivityTrackerHelper::ensureSmartTrackingIsPossible())
ui->mSmartStopTracking->setChecked(false);
}
allowStartAfterIdleControls();
}
void PreferencesDlg::smartStartSettingChanged(bool/* v */)
{
allowStartAfterIdleControls();
allowStartAfterIdleControls();
}
void PreferencesDlg::smartStopWayChanged()
{
allowStartAfterIdleControls();
allowStartAfterIdleControls();
}
void PreferencesDlg::allowStartAfterIdleControls()
{
bool stopEnabled = ui->mSmartStopTracking->isChecked() && ui->mSmartStopIntervalInMinutes->text().toInt() > 0;
bool startEnabled = ui->mSmartStartTracking->isChecked();
bool automaticStopEnabled = ui->mAutomaticallyOnStopRadiobutton->isChecked();
//ui->mAskQuestionOnStartRadiobutton->setEnabled(stopEnabled && startEnabled);
//ui->mAutomaticallyOnStartRadiobutton->setEnabled(stopEnabled && startEnabled);
if (!stopEnabled || !automaticStopEnabled)
ui->mSmartStartTracking->setChecked(false);
ui->mSmartStartTracking->setEnabled(stopEnabled && automaticStopEnabled);
ui->mAskQuestionOnStopRadiobutton->setEnabled(stopEnabled);
ui->mAutomaticallyOnStopRadiobutton->setEnabled(stopEnabled);
bool stopEnabled = ui->mSmartStopTracking->isChecked() && ui->mSmartStopIntervalInMinutes->text().toInt() > 0;
bool startEnabled = ui->mSmartStartTracking->isChecked();
bool automaticStopEnabled = ui->mAutomaticallyOnStopRadiobutton->isChecked();
//ui->mAskQuestionOnStartRadiobutton->setEnabled(stopEnabled && startEnabled);
//ui->mAutomaticallyOnStartRadiobutton->setEnabled(stopEnabled && startEnabled);
if (!stopEnabled || !automaticStopEnabled)
ui->mSmartStartTracking->setChecked(false);
ui->mSmartStartTracking->setEnabled(stopEnabled && automaticStopEnabled);
ui->mAskQuestionOnStopRadiobutton->setEnabled(stopEnabled);
ui->mAutomaticallyOnStopRadiobutton->setEnabled(stopEnabled);
}
void PreferencesDlg::applyTheme()
{
ThemeHelper::applyCurrentTheme(mSettings);
}

View File

@ -10,23 +10,25 @@ class PreferencesDlg;
class PreferencesDlg : public QDialog
{
Q_OBJECT
Q_OBJECT
public:
explicit PreferencesDlg(QWidget *parent, Settings& settings);
~PreferencesDlg();
explicit PreferencesDlg(QWidget *parent, Settings& settings);
~PreferencesDlg();
private:
Ui::PreferencesDlg *ui;
Settings& mSettings;
Ui::PreferencesDlg *ui;
Settings& mSettings;
void applyTheme();
private slots:
void selectDatabase();
void accepted();
void smartStopSettingChanged(bool v);
void smartStartSettingChanged(bool);
void smartStopWayChanged();
void allowStartAfterIdleControls();
void selectDatabase();
void accepted();
void smartStopSettingChanged(bool v);
void smartStartSettingChanged(bool);
void smartStopWayChanged();
void allowStartAfterIdleControls();
};

View File

@ -41,6 +41,13 @@
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="mDarkThemeCheckbox">
<property name="text">
<string>Use dark theme</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="mCustomDatabaseFileCheckbox">
<property name="text">
@ -265,6 +272,5 @@ This option requires enabled automatic stop tracking on idle.</string>
</slots>
<buttongroups>
<buttongroup name="buttonGroup"/>
<buttongroup name="buttonGroup_2"/>
</buttongroups>
</ui>

View File

@ -1,7 +1,7 @@
/****************************************************************************
** Resource object code
**
** Created by: The Resource Compiler for Qt version 5.6.2
** Created by: The Resource Compiler for Qt version 5.9.5
**
** WARNING! All changes made in this file will be lost!
*****************************************************************************/
@ -5573,124 +5573,184 @@ static const unsigned char qt_resource_name[] = {
static const unsigned char qt_resource_struct[] = {
// :
0x0,0x0,0x0,0x0,0x0,0x2,0x0,0x0,0x0,0x1,0x0,0x0,0x0,0x1,
0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
// :/icons
0x0,0x0,0x0,0x0,0x0,0x2,0x0,0x0,0x0,0x1,0x0,0x0,0x0,0x2,
0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
// :/icons/icons
0x0,0x0,0x0,0x0,0x0,0x2,0x0,0x0,0x0,0x39,0x0,0x0,0x0,0x3,
0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
// :/icons/icons/format-text-strikethrough.png
0x0,0x0,0x7,0x6e,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0xf9,0xb2,
0x0,0x0,0x1,0x48,0xc1,0x2c,0x35,0x48,
// :/icons/icons/text-x-generic.png
0x0,0x0,0x5,0xea,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0xd5,0xee,
0x0,0x0,0x1,0x48,0xc1,0x2c,0x35,0x48,
// :/icons/icons/tree-add-sibling-small.png
0x0,0x0,0x9,0x94,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x1,0x39,0x74,
0x0,0x0,0x1,0x4d,0xe2,0xea,0xa8,0xb8,
// :/icons/icons/clock-32x32.png
0x0,0x0,0x5,0x76,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0xab,0x40,
0x0,0x0,0x1,0x4c,0x76,0x1d,0x31,0x98,
// :/icons/icons/starttracking-osx.png
0x0,0x0,0x5,0x9a,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0xbf,0x9,
0x0,0x0,0x1,0x4a,0x5e,0xa8,0xa0,0x8,
// :/icons/icons/edit-copy.png
0x0,0x0,0x5,0xca,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0xd3,0x17,
0x0,0x0,0x1,0x48,0xc1,0x2c,0x35,0x48,
// :/icons/icons/format-text-underline.png
0x0,0x0,0x8,0xbe,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x1,0x1a,0x7d,
0x0,0x0,0x1,0x48,0xc1,0x2c,0x35,0x48,
// :/icons/icons/preferences-system.png
0x0,0x0,0x4,0x38,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0x7a,0x2e,
0x0,0x0,0x1,0x4c,0x76,0x14,0x2d,0x0,
// :/icons/icons/tree-add-child.png
0x0,0x0,0x1,0x9e,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0x20,0x21,
0x0,0x0,0x1,0x4c,0x76,0x14,0x2d,0x0,
// :/icons/icons/format-text-italic.png
0x0,0x0,0x7,0xae,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0xff,0x5b,
0x0,0x0,0x1,0x48,0xc1,0x2c,0x35,0x48,
// :/icons/icons/list-remove.png
0x0,0x0,0x1,0x54,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0x17,0x55,
0x0,0x0,0x1,0x48,0xc1,0x2c,0x35,0x48,
// :/icons/icons/mail-attachment.png
0x0,0x0,0x9,0x3c,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x1,0x29,0x3a,
0x0,0x0,0x1,0x4b,0x58,0xcb,0x3b,0x68,
// :/icons/icons/appointment-new.png
0x0,0x0,0x9,0x68,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x1,0x30,0x11,
0x0,0x0,0x1,0x4c,0x37,0x62,0x5,0x28,
// :/icons/icons/edit-undo.png
0x0,0x0,0x4,0x6a,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0x82,0x83,
0x0,0x0,0x1,0x48,0xc1,0x2c,0x35,0x48,
// :/icons/icons/folder-open.png
0x0,0x0,0x8,0xf6,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x1,0x20,0x8f,
0x0,0x0,0x1,0x48,0xc1,0x2c,0x35,0x48,
// :/icons/icons/tray-default.png
0x0,0x0,0x8,0x50,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x1,0xc,0x24,
0x0,0x0,0x1,0x4c,0x73,0x65,0x8f,0x90,
// :/icons/icons/tree-add-root.png
0x0,0x0,0x2,0xc4,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0x35,0xf9,
0x0,0x0,0x1,0x4c,0x76,0x14,0x2d,0x0,
// :/icons/icons/network-error.png
0x0,0x0,0x1,0xc8,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0x25,0x94,
0x0,0x0,0x1,0x48,0xc1,0x2c,0x35,0x48,
// :/icons/icons/format-indent-less.png
0x0,0x0,0x0,0x10,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0x0,0x0,
0x0,0x0,0x1,0x48,0xc1,0x2c,0x35,0x48,
// :/icons/icons/stoptracking-osx.png
0x0,0x0,0x4,0xa,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0x6b,0x12,
0x0,0x0,0x1,0x4a,0x5e,0xad,0x43,0x88,
// :/icons/icons/tree-add-child-small.png
0x0,0x0,0x0,0x76,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0x5,0xc,
0x0,0x0,0x1,0x4c,0x76,0x14,0x2d,0x0,
// :/icons/icons/edit-cut.png
0x0,0x0,0x3,0xbe,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0x5d,0x60,
0x0,0x0,0x1,0x48,0xc1,0x2c,0x35,0x48,
// :/icons/icons/empty.png
0x0,0x0,0x1,0xf0,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0x2c,0xc,
0x0,0x0,0x1,0x49,0xb4,0x73,0xfe,0x48,
// :/icons/icons/folder-new.png
0x0,0x0,0x3,0x2a,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0x45,0x8b,
0x0,0x0,0x1,0x48,0xc1,0x2c,0x35,0x48,
// :/icons/icons/tray-running.png
0x0,0x0,0x2,0x3c,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0x2e,0xa2,
0x0,0x0,0x1,0x4c,0x7a,0xb6,0xd2,0x40,
// :/icons/icons/edit-find-replace.png
0x0,0x0,0x4,0xf2,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0x95,0x43,
0x0,0x0,0x1,0x48,0xc1,0x2c,0x35,0x48,
// :/icons/icons/process-stop.png
0x0,0x0,0x1,0x78,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0x18,0x96,
0x0,0x0,0x1,0x4c,0x76,0x14,0x2d,0x0,
// :/icons/icons/format-justify-right.png
0x0,0x0,0x7,0xe0,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x1,0x4,0x99,
0x0,0x0,0x1,0x48,0xc1,0x2c,0x35,0x48,
// :/icons/icons/media-playback-stop.png
0x0,0x0,0x2,0x8,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0x2c,0x63,
0x0,0x0,0x1,0x48,0xc1,0x2c,0x35,0x48,
// :/icons/icons/list-add.png
0x0,0x0,0x1,0x36,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0x14,0xf8,
0x0,0x0,0x1,0x48,0xc1,0x2c,0x35,0x48,
// :/icons/icons/software-update-available.png
0x0,0x0,0x6,0xc8,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0xee,0x0,
0x0,0x0,0x1,0x48,0xc1,0x2c,0x35,0x48,
// :/icons/icons/format-justify-center.png
0x0,0x0,0x6,0x68,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0xe3,0x2a,
0x0,0x0,0x1,0x48,0xc1,0x2c,0x35,0x48,
// :/icons/icons/office-calendar.png
0x0,0x0,0x5,0x4a,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0xa6,0x2a,
0x0,0x0,0x1,0x4c,0x37,0x62,0x5,0x28,
// :/icons/icons/edit-select-all.png
0x0,0x0,0x2,0x98,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0x33,0x7e,
0x0,0x0,0x1,0x48,0xc1,0x2c,0x35,0x48,
// :/icons/icons/folder.png
0x0,0x0,0x3,0x10,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0x40,0xef,
0x0,0x0,0x1,0x48,0xc1,0x2c,0x35,0x48,
// :/icons/icons/edit-find.png
0x0,0x0,0x3,0x9e,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0x56,0xf8,
0x0,0x0,0x1,0x48,0xc1,0x2c,0x35,0x48,
// :/icons/icons/format-justify-fill.png
0x0,0x0,0x0,0x42,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0x3,0x3,
0x0,0x0,0x1,0x48,0xc1,0x2c,0x35,0x48,
// :/icons/icons/network-transmit.png
0x0,0x0,0x3,0xdc,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0x65,0x8b,
0x0,0x0,0x1,0x48,0xc1,0x2c,0x35,0x48,
// :/icons/icons/emblem-system.png
0x0,0x0,0x6,0xa0,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0xe5,0x3c,
0x0,0x0,0x1,0x4c,0x76,0x14,0x2d,0x0,
// :/icons/icons/accessories-calculator.png
0x0,0x0,0x8,0x16,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x1,0x6,0xba,
0x0,0x0,0x1,0x4c,0x37,0x62,0x5,0x28,
// :/icons/icons/edit-delete.png
0x0,0x0,0x2,0xec,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0x38,0xea,
0x0,0x0,0x1,0x48,0xc1,0x2c,0x35,0x48,
// :/icons/icons/folder-saved-search.png
0x0,0x0,0x0,0xe0,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0x8,0xd5,
0x0,0x0,0x1,0x4c,0x76,0x14,0x2d,0x0,
// :/icons/icons/format-justify-left.png
0x0,0x0,0x0,0xac,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0x6,0xce,
0x0,0x0,0x1,0x48,0xc1,0x2c,0x35,0x48,
// :/icons/icons/edit-paste.png
0x0,0x0,0x9,0x1a,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x1,0x25,0x33,
0x0,0x0,0x1,0x48,0xc1,0x2c,0x35,0x48,
// :/icons/icons/document-new.png
0x0,0x0,0x6,0x42,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0xdf,0x36,
0x0,0x0,0x1,0x48,0xc1,0x2c,0x35,0x48,
// :/icons/icons/edit-redo.png
0x0,0x0,0x8,0x9e,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x1,0x14,0x9b,
0x0,0x0,0x1,0x48,0xc1,0x2c,0x35,0x48,
// :/icons/icons/format-indent-more.png
0x0,0x0,0x7,0x8,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0xf4,0x9a,
0x0,0x0,0x1,0x48,0xc1,0x2c,0x35,0x48,
// :/icons/icons/edit-clear.png
0x0,0x0,0x1,0x14,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0xe,0x62,
0x0,0x0,0x1,0x48,0xc1,0x2c,0x35,0x48,
// :/icons/icons/format-text-bold.png
0x0,0x0,0x6,0x14,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0xd8,0xda,
0x0,0x0,0x1,0x48,0xc1,0x2c,0x35,0x48,
// :/icons/icons/document-print.png
0x0,0x0,0x4,0x8a,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0x88,0xc8,
0x0,0x0,0x1,0x48,0xc1,0x2c,0x35,0x48,
// :/icons/icons/tree-add-root-small.png
0x0,0x0,0x7,0x3a,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0xf7,0x9c,
0x0,0x0,0x1,0x4c,0x76,0x14,0x2d,0x0,
// :/icons/icons/system-search.png
0x0,0x0,0x5,0x22,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0x9d,0x7f,
0x0,0x0,0x1,0x4c,0x76,0x14,0x2d,0x0,
// :/icons/icons/network-receive.png
0x0,0x0,0x3,0x72,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0x51,0x77,
0x0,0x0,0x1,0x48,0xc1,0x2c,0x35,0x48,
// :/icons/icons/media-playback-start.png
0x0,0x0,0x2,0x62,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0x2f,0x76,
0x0,0x0,0x1,0x48,0xc1,0x2c,0x35,0x48,
// :/icons/icons/applications-development.png
0x0,0x0,0x4,0xb4,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0x8c,0xc1,
0x0,0x0,0x1,0x4c,0x76,0x14,0x2d,0x0,
// :/icons/icons/dialog-error.png
0x0,0x0,0x3,0x4c,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0x4b,0x6,
0x0,0x0,0x1,0x4c,0x76,0x14,0x2d,0x0,
// :/icons/icons/document-save.png
0x0,0x0,0x8,0x76,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x1,0xc,0xe4,
0x0,0x0,0x1,0x48,0xc1,0x2c,0x35,0x48,
};
@ -5722,7 +5782,7 @@ int QT_RCC_MANGLE_NAMESPACE(qInitResources_mainwindow)();
int QT_RCC_MANGLE_NAMESPACE(qInitResources_mainwindow)()
{
QT_RCC_PREPEND_NAMESPACE(qRegisterResourceData)
(0x01, qt_resource_struct, qt_resource_name, qt_resource_data);
(0x2, qt_resource_struct, qt_resource_name, qt_resource_data);
return 1;
}
@ -5730,7 +5790,7 @@ int QT_RCC_MANGLE_NAMESPACE(qCleanupResources_mainwindow)();
int QT_RCC_MANGLE_NAMESPACE(qCleanupResources_mainwindow)()
{
QT_RCC_PREPEND_NAMESPACE(qUnregisterResourceData)
(0x01, qt_resource_struct, qt_resource_name, qt_resource_data);
(0x2, qt_resource_struct, qt_resource_name, qt_resource_data);
return 1;
}

View File

@ -0,0 +1 @@
/*.pyc

View File

@ -0,0 +1,322 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""QDarkStyle is a dark stylesheet for Python and Qt applications.
This module provides a function to transparently load the stylesheets
with the correct rc file.
First, start importing our module
.. code-block:: python
import qdarkstyle
Then you can get stylesheet provided by QDarkStyle for various Qt wrappers
as shown bellow
.. code-block:: python
# PySide
dark_stylesheet = qdarkstyle.load_stylesheet_pyside()
# PySide
dark_stylesheet = qdarkstyle.load_stylesheet_pyside2()
# PyQt4
dark_stylesheet = qdarkstyle.load_stylesheet_pyqt()
# PyQt5
dark_stylesheet = qdarkstyle.load_stylesheet_pyqt5()
Or from environment variables provided for QtPy or PyQtGraph, see
.. code-block:: python
# QtPy
dark_stylesheet = qdarkstyle.load_stylesheet_from_environment()
# PyQtGraph
dark_stylesheet = qdarkstyle.load_stylesheet_from_environment(is_pyqtgraph)
Finally, set your QApplication with it
.. code-block:: python
app.setStyleSheet(dark_stylesheet)
Enjoy!
"""
import logging
import platform
import os
import warnings
__version__ = "2.6.0"
PYQTGRAPH_QT_LIB_VALUES = ['PyQt', 'PyQt5', 'PySide', 'PySide2']
QT_API_VALUES = ['pyqt', 'pyqt5', 'pyside', 'pyside2']
def _logger():
return logging.getLogger('qdarkstyle')
def _qt_wrapper_import(qt_api):
"""
Check if Qt API defined can be imported.
:param qt_api: Qt API string to test import
:return load function fot given qt_api, otherwise empty string
"""
qt_wrapper = ''
loader = ""
try:
if qt_api == 'PyQt' or qt_api == 'pyqt':
import PyQt4
qt_wrapper = 'PyQt4'
loader = load_stylesheet_pyqt()
elif qt_api == 'PyQt5' or qt_api == 'pyqt5':
import PyQt5
qt_wrapper = 'PyQt5'
loader = load_stylesheet_pyqt5()
elif qt_api == 'PySide' or qt_api == 'pyside':
import PySide
qt_wrapper = 'PySide'
loader = load_stylesheet_pyside()
elif qt_api == 'PySide2' or qt_api == 'pyside2':
import PySide2
qt_wrapper = 'PySide2'
loader = load_stylesheet_pyside2()
except ImportError as err:
_logger().error("Impossible import Qt wrapper.\n %s", str(err))
else:
_logger().info("Using Qt wrapper = %s ", qt_wrapper)
finally:
return loader
def load_stylesheet_from_environment(is_pyqtgraph=False):
"""
Load the stylesheet from QT_API (or PYQTGRAPH_QT_LIB) environment variable.
:param is_pyqtgraph: True if it is to be set using PYQTGRAPH_QT_LIB
:raise KeyError: if QT_API/PYQTGRAPH_QT_LIB does not exist
:return the stylesheet string
"""
warnings.warn(
"load_stylesheet_from_environment() will be deprecated in version 3,"
"use load_stylesheet()",
PendingDeprecationWarning
)
qt_api = ''
pyqtgraph_qt_lib = ''
loader = ""
# Get values from QT_API
try:
qt_api = os.environ['QT_API']
except KeyError as err:
# Log this error just if using QT_API
if not is_pyqtgraph:
_logger().error("QT_API does not exist, do os.environ['QT_API']= "
"and choose one option from %s", QT_API_VALUES)
else:
if not is_pyqtgraph:
if qt_api in QT_API_VALUES:
_logger().info("Found QT_API='%s'", qt_api)
loader = _qt_wrapper_import(qt_api)
else:
# Raise this error because the function need this key/value
raise KeyError("QT_API=%s is unknown, please use a value "
"from %s",
(qt_api, QT_API_VALUES))
# Get values from PYQTGRAPH_QT_LIB
try:
pyqtgraph_qt_lib = os.environ['PYQTGRAPH_QT_LIB']
except KeyError as err:
# Log this error just if using PYQTGRAPH_QT_LIB
if is_pyqtgraph:
_logger().error("PYQTGRAP_QT_API does not exist, do "
"os.environ['PYQTGRAPH_QT_LIB']= "
"and choose one option from %s",
PYQTGRAPH_QT_LIB_VALUES)
else:
if is_pyqtgraph:
if pyqtgraph_qt_lib in PYQTGRAPH_QT_LIB_VALUES:
_logger().info("Found PYQTGRAPH_QT_LIB='%s'", pyqtgraph_qt_lib)
loader = _qt_wrapper_import(pyqtgraph_qt_lib)
else:
# Raise this error because the function need this key/value
raise KeyError("PYQTGRAPH_QT_LIB=%s is unknown, please use a "
"value from %s", (
pyqtgraph_qt_lib,
PYQTGRAPH_QT_LIB_VALUES))
# Just a warning if both are set but differs each other
if qt_api and pyqtgraph_qt_lib:
if qt_api != pyqtgraph_qt_lib.lower():
_logger().warning("Both QT_API=%s and PYQTGRAPH_QT_LIB=%s are set, "
"but with different values, this could cause "
"some issues if using them in the same project!",
qt_api, pyqtgraph_qt_lib)
return loader
def load_stylesheet(pyside=True):
"""
Load the stylesheet. Takes care of importing the rc module.
:param pyside: True to load the pyside rc file, False to load the PyQt rc file
:return the stylesheet string
"""
warnings.warn(
"load_stylesheet() will not receive pyside parameter in version 3. "
"Set QtPy environment variable to specify the Qt binding insteady.",
FutureWarning
)
# Smart import of the rc file
pyside_ver = None
if pyside:
# Detect the PySide version available
try:
import PySide
except ModuleNotFoundError:
import PySide2
pyside_ver = 2
else:
pyside_ver = 1
if pyside_ver == 1:
import qdarkstyle.pyside_style_rc
else:
import qdarkstyle.pyside2_style_rc
else:
import qdarkstyle.pyqt_style_rc
# Load the stylesheet content from resources
if not pyside:
from PyQt4.QtCore import QFile, QTextStream
else:
if pyside_ver == 1:
from PySide.QtCore import QFile, QTextStream
else:
from PySide2.QtCore import QFile, QTextStream
f = QFile(":qdarkstyle/style.qss")
if not f.exists():
_logger().error("Unable to load stylesheet, file not found in "
"resources")
return ""
else:
f.open(QFile.ReadOnly | QFile.Text)
ts = QTextStream(f)
stylesheet = ts.readAll()
if platform.system().lower() == 'darwin': # see issue #12 on github
mac_fix = '''
QDockWidget::title
{
background-color: #31363b;
text-align: center;
height: 12px;
}
'''
stylesheet += mac_fix
return stylesheet
def load_stylesheet_pyside():
"""
Load the stylesheet for use in a pyside application.
:return the stylesheet string
"""
warnings.warn(
"load_stylesheet_pyside() will be deprecated in version 3,"
"set QtPy environment variable to specify the Qt binding and "
"use load_stylesheet()",
PendingDeprecationWarning
)
return load_stylesheet(pyside=True)
def load_stylesheet_pyside2():
"""
Load the stylesheet for use in a pyside2 application.
:raise NotImplementedError: Because it is not supported yet
"""
warnings.warn(
"load_stylesheet_pyside2() will be deprecated in version 3,"
"set QtPy environment variable to specify the Qt binding and "
"use load_stylesheet()",
PendingDeprecationWarning
)
return load_stylesheet(pyside=True)
def load_stylesheet_pyqt():
"""
Load the stylesheet for use in a pyqt4 application.
:return the stylesheet string
"""
warnings.warn(
"load_stylesheet_pyqt() will be deprecated in version 3,"
"set QtPy environment variable to specify the Qt binding and "
"use load_stylesheet()",
PendingDeprecationWarning
)
return load_stylesheet(pyside=False)
def load_stylesheet_pyqt5():
"""
Load the stylesheet for use in a pyqt5 application.
:param pyside: True to load the pyside rc file, False to load the PyQt rc file
:return the stylesheet string
"""
warnings.warn(
"load_stylesheet_pyqt5() will be deprecated in version 3,"
"set QtPy environment variable to specify the Qt binding and "
"use load_stylesheet()",
PendingDeprecationWarning
)
# Smart import of the rc file
import qdarkstyle.pyqt5_style_rc
# Load the stylesheet content from resources
from PyQt5.QtCore import QFile, QTextStream
f = QFile(":qdarkstyle/style.qss")
if not f.exists():
_logger().error("Unable to load stylesheet, file not found in "
"resources")
return ""
else:
f.open(QFile.ReadOnly | QFile.Text)
ts = QTextStream(f)
stylesheet = ts.readAll()
if platform.system().lower() == 'darwin': # see issue #12 on github
mac_fix = '''
QDockWidget::title
{
background-color: #31363b;
text-align: center;
height: 12px;
}
'''
stylesheet += mac_fix
return stylesheet

View File

@ -0,0 +1,54 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# The MIT License (MIT)
#
# Copyright (c) <2013-2014> <Colin Duquesnoy>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
#
"""
Utility scripts to compile the qrc file. The script will
attempt to compile the qrc file using the following tools:
- rcc
- pyside-rcc
- pyrcc4
Delete the compiled files that you don't want to use
manually after running this script.
"""
import os
def compile_all():
"""
Compile style.qrc using rcc, pyside-rcc and pyrcc4
"""
# print("Compiling for Qt: style.qrc -> style.rcc")
# os.system("rcc style.qrc -o style.rcc")
print("Compiling for PyQt4: style.qrc -> pyqt_style_rc.py")
os.system("pyrcc4 -py3 style.qrc -o pyqt_style_rc.py")
print("Compiling for PyQt5: style.qrc -> pyqt5_style_rc.py")
os.system("pyrcc5 style.qrc -o pyqt5_style_rc.py")
print("Compiling for PySide: style.qrc -> pyside_style_rc.py")
os.system("pyside-rcc -py3 style.qrc -o pyside_style_rc.py")
if __name__ == "__main__":
compile_all()

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 220 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 172 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 228 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 187 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 147 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 160 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 150 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 166 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 492 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 491 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 252 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 493 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 492 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 249 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 464 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 464 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 240 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 598 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 598 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 586 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 165 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 166 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 166 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 166 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 940 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 972 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 846 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 728 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 760 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 646 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 160 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 160 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 129 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 224 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 182 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 239 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 195 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 578 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 158 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 159 B

View File

@ -0,0 +1,46 @@
<RCC>
<qresource prefix="qss_icons">
<file>rc/up_arrow_disabled.png</file>
<file>rc/Hmovetoolbar.png</file>
<file>rc/stylesheet-branch-end.png</file>
<file>rc/branch_closed-on.png</file>
<file>rc/stylesheet-vline.png</file>
<file>rc/branch_closed.png</file>
<file>rc/branch_open-on.png</file>
<file>rc/transparent.png</file>
<file>rc/right_arrow_disabled.png</file>
<file>rc/sizegrip.png</file>
<file>rc/close.png</file>
<file>rc/close-hover.png</file>
<file>rc/close-pressed.png</file>
<file>rc/down_arrow.png</file>
<file>rc/Vmovetoolbar.png</file>
<file>rc/left_arrow.png</file>
<file>rc/stylesheet-branch-more.png</file>
<file>rc/up_arrow.png</file>
<file>rc/right_arrow.png</file>
<file>rc/left_arrow_disabled.png</file>
<file>rc/Hsepartoolbar.png</file>
<file>rc/branch_open.png</file>
<file>rc/Vsepartoolbar.png</file>
<file>rc/down_arrow_disabled.png</file>
<file>rc/undock.png</file>
<file>rc/checkbox_checked_disabled.png</file>
<file>rc/checkbox_checked_focus.png</file>
<file>rc/checkbox_checked.png</file>
<file>rc/checkbox_indeterminate.png</file>
<file>rc/checkbox_indeterminate_focus.png</file>
<file>rc/checkbox_unchecked_disabled.png</file>
<file>rc/checkbox_unchecked_focus.png</file>
<file>rc/checkbox_unchecked.png</file>
<file>rc/radio_checked_disabled.png</file>
<file>rc/radio_checked_focus.png</file>
<file>rc/radio_checked.png</file>
<file>rc/radio_unchecked_disabled.png</file>
<file>rc/radio_unchecked_focus.png</file>
<file>rc/radio_unchecked.png</file>
</qresource>
<qresource prefix="qdarkstyle">
<file>style.qss</file>
</qresource>
</RCC>

File diff suppressed because it is too large Load Diff

View File

@ -5,51 +5,51 @@
Settings::Settings()
{
load();
load();
}
Settings::~Settings()
{
save();
save();
}
QVariantMap& Settings::data()
{
return mData;
return mData;
}
void Settings::save()
{
QSettings settings(PathHelper::pathToSettings(), QSettings::IniFormat);
settings.clear();
for (const QString& e: data().keys())
{
settings.setValue(e, data().value(e));
}
QSettings settings(PathHelper::pathToSettings(), QSettings::IniFormat);
settings.clear();
for (const QString& e: data().keys())
{
settings.setValue(e, data().value(e));
}
}
void Settings::load()
{
QSettings settings(PathHelper::pathToSettings(), QSettings::IniFormat);
mData.clear();
const QStringList keys = settings.allKeys();
for (const QString& k: keys)
{
mData[k] = settings.value(k);
}
QSettings settings(PathHelper::pathToSettings(), QSettings::IniFormat);
mData.clear();
const QStringList keys = settings.allKeys();
for (const QString& k: keys)
{
mData[k] = settings.value(k);
}
// Show seconds is on by default
if (mData.find(KEY_SHOW_SECONDS) == mData.end())
mData[KEY_SHOW_SECONDS] = true;
// Show seconds is on by default
if (mData.find(KEY_SHOW_SECONDS) == mData.end())
mData[KEY_SHOW_SECONDS] = true;
}
static Settings* GInstance = nullptr;
Settings& Settings::instance()
{
if (!GInstance)
{
GInstance = new Settings();
GInstance->load();
}
return *GInstance;
if (!GInstance)
{
GInstance = new Settings();
GInstance->load();
}
return *GInstance;
}

View File

@ -41,6 +41,8 @@
#define KEY_EXPANDED_TASKS "ExpandedTasks"
#define KEY_RECENT_TASKS "RecentTasks"
#define KEY_DARK_THEME "DarkTheme"
class Settings
{
public:

View File

@ -10,42 +10,42 @@
#include <deque>
TaskTreeView::TaskTreeView(QWidget *widget)
:QTreeView(widget)
:QTreeView(widget)
{
}
void TaskTreeView::dragMoveEvent(QDragMoveEvent* event)
{
QTreeView::dragMoveEvent(event);
QTreeView::dragMoveEvent(event);
event->acceptProposedAction();
event->accept();
event->acceptProposedAction();
event->accept();
}
void TaskTreeView::dragEnterEvent(QDragEnterEvent *event)
{
QTreeView::dragEnterEvent(event);
event->acceptProposedAction();
event->accept();
QTreeView::dragEnterEvent(event);
event->acceptProposedAction();
event->accept();
}
void TaskTreeView::dragLeaveEvent(QDragLeaveEvent *event)
{
QTreeView::dragLeaveEvent(event);
event->accept();
QTreeView::dragLeaveEvent(event);
event->accept();
}
void TaskTreeView::dropEvent(QDropEvent *event)
{
QTreeView::dropEvent(event);
event->acceptProposedAction();
event->accept();
//this->setCurrentIndex(this->indexAt(event->pos()));
QTreeView::dropEvent(event);
event->acceptProposedAction();
event->accept();
//this->setCurrentIndex(this->indexAt(event->pos()));
}
TaskTreeModel::TaskTreeModel(bool allowCheckboxes)
:mAllowCheckboxes(allowCheckboxes)
:mAllowCheckboxes(allowCheckboxes)
{
}
@ -54,223 +54,223 @@ TaskTreeModel::~TaskTreeModel()
QModelIndex TaskTreeModel::index(int row, int column, const QModelIndex &parent) const
{
if (!hasIndex(row, column, parent))
return QModelIndex();
if (!hasIndex(row, column, parent))
return QModelIndex();
// Find task from parent index
if (parent.isValid())
{
PTask parentTask = Storage::instance().findTaskByModelId(parent.internalId());
PTask task = parentTask->children()[row];
return createIndex(row, column, task->modelId());
}
else
{
if (row >= 0 && row < Storage::instance().topOfTaskTree().count())
// Find task from parent index
if (parent.isValid())
{
PTask task = Storage::instance().topOfTaskTree()[row];
return createIndex(row, column, task->modelId());
PTask parentTask = Storage::instance().findTaskByModelId(parent.internalId());
PTask task = parentTask->children()[row];
return createIndex(row, column, task->modelId());
}
else
return QModelIndex();
}
{
if (row >= 0 && row < Storage::instance().topOfTaskTree().count())
{
PTask task = Storage::instance().topOfTaskTree()[row];
return createIndex(row, column, task->modelId());
}
else
return QModelIndex();
}
}
QModelIndex TaskTreeModel::parent(const QModelIndex &child) const
{
if (!child.isValid())
return QModelIndex();
if (!child.isValid())
return QModelIndex();
PTask task = Storage::instance().findTaskByModelId(child.internalId());
if (task)
{
PTask parentTask = task->parent();
if (parentTask)
PTask task = Storage::instance().findTaskByModelId(child.internalId());
if (task)
{
if (parentTask->parent())
{
int row = parentTask->parent()->children().indexOf(parentTask);
return createIndex(row, 0, parentTask->modelId());
}
else
{
int row = Storage::instance().topOfTaskTree().indexOf(parentTask);
return createIndex(row, 0, parentTask->modelId());
}
PTask parentTask = task->parent();
if (parentTask)
{
if (parentTask->parent())
{
int row = parentTask->parent()->children().indexOf(parentTask);
return createIndex(row, 0, parentTask->modelId());
}
else
{
int row = Storage::instance().topOfTaskTree().indexOf(parentTask);
return createIndex(row, 0, parentTask->modelId());
}
}
else
return QModelIndex();
}
else
return QModelIndex();
}
return QModelIndex();
return QModelIndex();
}
int TaskTreeModel::rowCount(const QModelIndex &parent) const
{
if (parent.isValid())
{
PTask parentTask = Storage::instance().findTaskByModelId(parent.internalId());
if (parentTask)
return parentTask->children().count();
}
else
return Storage::instance().topOfTaskTree().count();
return 0;
if (parent.isValid())
{
PTask parentTask = Storage::instance().findTaskByModelId(parent.internalId());
if (parentTask)
return parentTask->children().count();
}
else
return Storage::instance().topOfTaskTree().count();
return 0;
}
int TaskTreeModel::columnCount(const QModelIndex& /*parent*/) const
{
return 1;
return 1;
}
QVariant TaskTreeModel::data(const QModelIndex &index, int role) const
{
PTask task = Storage::instance().findTaskByModelId(index.internalId());
if (!task)
return QVariant();
PTask task = Storage::instance().findTaskByModelId(index.internalId());
if (!task)
return QVariant();
switch (role)
{
case Qt::DisplayRole:
case Qt::EditRole:
return task->title();
case Qt::DecorationRole:
return QIcon(":/icons/icons/text-x-generic.png");
case Qt::CheckStateRole:
if (mAllowCheckboxes)
return task->isChecked() ? Qt::Checked : Qt::Unchecked;
break;
}
return QVariant();
}
bool TaskTreeModel::setData(const QModelIndex &index, const QVariant &value, int role /* = Qt::EditRole */)
{
PTask task = getTask(index);
if (task)
{
switch (role)
{
case Qt::DisplayRole:
case Qt::EditRole:
// Save new title
MAKE_ACTION(new RenameTaskAction(task, value.toString()));
return task->title();
break;
case Qt::DecorationRole:
return QIcon(":/icons/icons/text-x-generic.png");
case Qt::CheckStateRole:
QModelIndex br = makeTaskChecked(index, value.toInt() == Qt::Checked);
dataChanged(index, br, QVector<int>(1, Qt::CheckStateRole));
break;
if (mAllowCheckboxes)
return task->isChecked() ? Qt::Checked : Qt::Unchecked;
break;
}
}
return true;
return QVariant();
}
bool TaskTreeModel::setData(const QModelIndex &index, const QVariant &value, int role /* = Qt::EditRole */)
{
PTask task = getTask(index);
if (task)
{
switch (role)
{
case Qt::DisplayRole:
case Qt::EditRole:
// Save new title
MAKE_ACTION(new RenameTaskAction(task, value.toString()));
break;
case Qt::CheckStateRole:
QModelIndex br = makeTaskChecked(index, value.toInt() == Qt::Checked);
dataChanged(index, br, QVector<int>(1, Qt::CheckStateRole));
break;
}
}
return true;
}
QModelIndex TaskTreeModel::makeTaskChecked(QModelIndex index, bool checked)
{
QModelIndex result;
QModelIndex result;
std::deque<PTask> q;
std::deque<PTask> q;
PTask t = getTask(index);
q.push_back(t);
while (!q.empty())
{
PTask current = q.front(); q.pop_front();
if (current)
PTask t = getTask(index);
q.push_back(t);
while (!q.empty())
{
current->setChecked(checked);
for (PTask child: current->children())
q.push_back(child);
PTask current = q.front(); q.pop_front();
if (current)
{
current->setChecked(checked);
for (PTask child: current->children())
q.push_back(child);
result = getIndex(current);
result = getIndex(current);
}
}
}
return result;
return result;
}
PTask TaskTreeModel::addTask(const QModelIndex& parent, int index)
{
// Find parent task
PTask parentTask = getTask(parent);
// Find parent task
PTask parentTask = getTask(parent);
// Run new task action
PTaskAction action(new NewTaskAction(parentTask, index, tr("New task")));
ChangesHistory::instance().add(action);
// Run new task action
PTaskAction action(new NewTaskAction(parentTask, index, tr("New task")));
ChangesHistory::instance().add(action);
// Get result
PTask childTask = action->task();
// Get result
PTask childTask = action->task();
return childTask;
return childTask;
}
QModelIndex TaskTreeModel::getIndex(const PTask& task, bool includeModelId)
{
if (!task)
return QModelIndex();
if (!task)
return QModelIndex();
int row = 0;
if (task->parent())
row = task->parent()->children().indexOf(task);
else
row = Storage::instance().topOfTaskTree().indexOf(task);
int row = 0;
if (task->parent())
row = task->parent()->children().indexOf(task);
else
row = Storage::instance().topOfTaskTree().indexOf(task);
if (includeModelId)
return createIndex(row, 0, task->modelId());
else
return createIndex(row, 0);
if (includeModelId)
return createIndex(row, 0, task->modelId());
else
return createIndex(row, 0);
}
void TaskTreeModel::deleteTask(const QModelIndex& index)
{
// Check if there is task
PTask task = getTask(index);
if (!task)
return;
// Check if there is task
PTask task = getTask(index);
if (!task)
return;
// Run delete task action
MAKE_ACTION(new DeleteTaskAction(task));
// Run delete task action
MAKE_ACTION(new DeleteTaskAction(task));
}
void TaskTreeModel::moveTask(const PTask& task, int offset)
{
if (!task)
return;
MAKE_ACTION(new MoveTaskAction(task, task->parent(), task->index() + offset));
if (!task)
return;
MAKE_ACTION(new MoveTaskAction(task, task->parent(), task->index() + offset));
}
void TaskTreeModel::setTitle(const QModelIndex& index, const QString& title)
{
setData(index, QVariant(title), Qt::DisplayRole);
setData(index, QVariant(title), Qt::DisplayRole);
}
Qt::ItemFlags TaskTreeModel::flags(const QModelIndex &index) const
{
Qt::ItemFlags result = Qt::ItemIsEnabled | Qt::ItemIsSelectable | Qt::ItemIsEditable | Qt::ItemIsDropEnabled;
if (index.isValid())
result |= Qt::ItemIsDragEnabled;
if (mAllowCheckboxes)
result |= Qt::ItemIsUserCheckable;
Qt::ItemFlags result = Qt::ItemIsEnabled | Qt::ItemIsSelectable | Qt::ItemIsEditable | Qt::ItemIsDropEnabled;
if (index.isValid())
result |= Qt::ItemIsDragEnabled;
if (mAllowCheckboxes)
result |= Qt::ItemIsUserCheckable;
return result;
return result;
}
PTask TaskTreeModel::getTask(const QModelIndex& index) const
{
if (!index.isValid())
return PTask();
if (!index.isValid())
return PTask();
return Storage::instance().findTaskByModelId(index.internalId());
return Storage::instance().findTaskByModelId(index.internalId());
}
QVariant TaskTreeModel::headerData(int /*section*/, Qt::Orientation /*orientation*/, int /*role = Qt::DisplayRole */) const
{
return "";
return "";
/*if (orientation != Qt::Horizontal)
/*if (orientation != Qt::Horizontal)
return QVariant();
switch (role)
@ -283,83 +283,83 @@ QVariant TaskTreeModel::headerData(int /*section*/, Qt::Orientation /*orientatio
Qt::DropActions TaskTreeModel::supportedDropActions() const
{
return Qt::MoveAction;
return Qt::MoveAction;
}
Qt::DropActions TaskTreeModel::supportedDragActions() const
{
return Qt::MoveAction;
return Qt::MoveAction;
}
QStringList TaskTreeModel::mimeTypes() const
{
QStringList result;
result << NODE_MIME_TYPE;
return result;
QStringList result;
result << NODE_MIME_TYPE;
return result;
}
QMimeData *TaskTreeModel::mimeData(const QModelIndexList &indexes) const
{
//qDebug() << "Mime data requested for indexes list size " << indexes.size();
//qDebug() << "Mime data requested for indexes list size " << indexes.size();
QMimeData *mimeData = new QMimeData();
QByteArray encodedData;
QMimeData *mimeData = new QMimeData();
QByteArray encodedData;
QDataStream stream(&encodedData, QIODevice::WriteOnly);
QDataStream stream(&encodedData, QIODevice::WriteOnly);
foreach (const QModelIndex &index, indexes)
{
if (index.isValid())
foreach (const QModelIndex &index, indexes)
{
PTask task = getTask(index);
stream << task->modelId();
if (index.isValid())
{
PTask task = getTask(index);
stream << task->modelId();
}
}
}
mimeData->setData(NODE_MIME_TYPE, encodedData);
return mimeData;
mimeData->setData(NODE_MIME_TYPE, encodedData);
return mimeData;
}
bool TaskTreeModel::dropMimeData(const QMimeData *mimeData, Qt::DropAction action, int row, int column, const QModelIndex &parent)
{
qDebug() << "TaskTreeModel::dropMimeData";
qDebug() << "TaskTreeModel::dropMimeData";
if (action == Qt::IgnoreAction)
return true;
if (action == Qt::IgnoreAction)
return true;
if (!mimeData->hasFormat(NODE_MIME_TYPE))
return false;
if (!mimeData->hasFormat(NODE_MIME_TYPE))
return false;
if (column > 0)
return false;
if (column > 0)
return false;
// Find task
QByteArray encodedData = mimeData->data(NODE_MIME_TYPE);
QDataStream stream(&encodedData, QIODevice::ReadOnly);
QStringList newItems;
int rows = 0;
PTask lastMovedTask;
// Find task
QByteArray encodedData = mimeData->data(NODE_MIME_TYPE);
QDataStream stream(&encodedData, QIODevice::ReadOnly);
QStringList newItems;
int rows = 0;
PTask lastMovedTask;
while (!stream.atEnd())
{
Task::ModelId modelId;
stream >> modelId;
++rows;
while (!stream.atEnd())
{
Task::ModelId modelId;
stream >> modelId;
++rows;
// Bring task instance
PTask t = Storage::instance().findTaskByModelId(modelId);
PTask parentTask = getTask(parent);
int currentRow = 0;
if (parentTask)
currentRow = (row == -1) ? parentTask->children().size() : (row + rows - 1);
else
currentRow = Storage::instance().topOfTaskTree().size();
// Bring task instance
PTask t = Storage::instance().findTaskByModelId(modelId);
PTask parentTask = getTask(parent);
int currentRow = 0;
if (parentTask)
currentRow = (row == -1) ? parentTask->children().size() : (row + rows - 1);
else
currentRow = Storage::instance().topOfTaskTree().size();
lastMovedTask = t;
PTaskAction action(new MoveTaskAction(t, parentTask, currentRow));
ChangesHistory::instance().add(action);
lastMovedTask = t;
PTaskAction action(new MoveTaskAction(t, parentTask, currentRow));
ChangesHistory::instance().add(action);
/* // Detach it from old parent (if exists)
/* // Detach it from old parent (if exists)
if (t->parent())
{
int index = t->parent()->children().indexOf(t);
@ -412,117 +412,117 @@ bool TaskTreeModel::dropMimeData(const QMimeData *mimeData, Qt::DropAction actio
endInsertRows();
}*/
}
if (lastMovedTask)
emit onTaskMoved(lastMovedTask);
}
if (lastMovedTask)
emit onTaskMoved(lastMovedTask);
return true;
return true;
}
bool TaskTreeModel::canDropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent) const
{
//qDebug() << "TaskTreeModel::canDropMimeData() called";
return true;
//qDebug() << "TaskTreeModel::canDropMimeData() called";
return true;
}
bool TaskTreeModel::removeRows(int row, int count, const QModelIndex &parent)
{
beginRemoveRows(parent, row, row+count-1);
endRemoveRows();
return true;
beginRemoveRows(parent, row, row+count-1);
endRemoveRows();
return true;
// Called during drag and drop
if (parent.isValid())
{
PTask parentTask = getTask(parent);
for (int i=0; i<count; i++)
// Called during drag and drop
if (parent.isValid())
{
TaskArray& children = parentTask->children();
if (children.size() > row)
{
beginRemoveRows(parent, row, row);
children.erase(children.begin() + row);
endRemoveRows();
}
PTask parentTask = getTask(parent);
for (int i=0; i<count; i++)
{
TaskArray& children = parentTask->children();
if (children.size() > row)
{
beginRemoveRows(parent, row, row);
children.erase(children.begin() + row);
endRemoveRows();
}
}
}
}
else
{
TaskArray& top = Storage::instance().topOfTaskTree();
for (int i=0; i<count; i++)
else
{
if (top.size() > row)
{
beginRemoveRows(parent, row, row);
top.erase(top.begin() + row);
endRemoveRows();
}
TaskArray& top = Storage::instance().topOfTaskTree();
for (int i=0; i<count; i++)
{
if (top.size() > row)
{
beginRemoveRows(parent, row, row);
top.erase(top.begin() + row);
endRemoveRows();
}
}
}
}
return true;
return true;
}
bool TaskTreeModel::insertRows(int /*row*/, int /*count*/, const QModelIndex& /*parent*/)
{
qDebug("insertRows called");
return false;
qDebug("insertRows called");
return false;
}
QString TaskTreeModel::getExpandedState(QTreeView& view) const
{
// Iterate all indexes
QStringList sl;
foreach (QModelIndex index, this->persistentIndexList())
{
if (view.isExpanded(index))
// Iterate all indexes
QStringList sl;
foreach (QModelIndex index, this->persistentIndexList())
{
PTask t = getTask(index);
if (t)
sl << QString::number(t->id());
if (view.isExpanded(index))
{
PTask t = getTask(index);
if (t)
sl << QString::number(t->id());
}
}
}
return sl.join(";");
return sl.join(";");
}
void TaskTreeModel::setExpandedState(const QString& savedState, QTreeView& view)
{
QStringList sl = savedState.split(";");
foreach (QString item, sl)
{
qulonglong id = item.toLongLong();
PTask task = Storage::instance().findTaskById((Task::Id)id);
if (task)
QStringList sl = savedState.split(";");
foreach (QString item, sl)
{
QModelIndex index = this->getIndex(task);
if (index.isValid())
view.setExpanded(index, true);
qulonglong id = item.toLongLong();
PTask task = Storage::instance().findTaskById((Task::Id)id);
if (task)
{
QModelIndex index = this->getIndex(task);
if (index.isValid())
view.setExpanded(index, true);
}
}
}
}
QString TaskTreeModel::getSelected(QTreeView& view) const
{
QModelIndex index = view.currentIndex();
if (index.isValid())
{
PTask t = getTask(index);
if (t)
return QString::number((qulonglong)t->id());
}
return QString();
QModelIndex index = view.currentIndex();
if (index.isValid())
{
PTask t = getTask(index);
if (t)
return QString::number((qulonglong)t->id());
}
return QString();
}
void TaskTreeModel::setSelected(const QString& savedState, QTreeView& view)
{
qulonglong id = savedState.toULongLong();
PTask t = Storage::instance().findTaskById(id);
if (t)
{
QModelIndex index = getIndex(t);
if (index.isValid())
view.setCurrentIndex(index);
}
qulonglong id = savedState.toULongLong();
PTask t = Storage::instance().findTaskById(id);
if (t)
{
QModelIndex index = getIndex(t);
if (index.isValid())
view.setCurrentIndex(index);
}
}
/*
@ -551,31 +551,31 @@ TaskItemDelegate::TaskItemDelegate(QObject *parent)
}
void TaskItemDelegate::paint( QPainter * painter,
const QStyleOptionViewItem & option,
const QModelIndex & index ) const
const QStyleOptionViewItem & option,
const QModelIndex & index ) const
{
TaskTreeModel* model = (TaskTreeModel*)index.model();
PTask task = model->getTask(index);
if (!task)
return;
return;
if (task->getAttachmentCount())
{
QIcon attachmentIcon = QIcon(":/icons/icons/mail-attachment.png");
QPixmap attachmentPixmap = attachmentIcon.pixmap(option.decorationSize);
QRect r = option.rect;
QRect titleRect = r; titleRect.setWidth(r.width() - 24);
QRect iconRect = r; iconRect.setLeft(r.right() - 24 );
drawBackground(painter, option, index);
drawDisplay(painter, option, titleRect, task->title());
drawDecoration(painter, option, iconRect, attachmentPixmap);
drawFocus(painter, option, r);
QIcon attachmentIcon = QIcon(":/icons/icons/mail-attachment.png");
QPixmap attachmentPixmap = attachmentIcon.pixmap(option.decorationSize);
QRect r = option.rect;
QRect titleRect = r; titleRect.setWidth(r.width() - 24);
QRect iconRect = r; iconRect.setLeft(r.right() - 24 );
drawBackground(painter, option, index);
drawDisplay(painter, option, titleRect, task->title());
drawDecoration(painter, option, iconRect, attachmentPixmap);
drawFocus(painter, option, r);
}
else
{
drawBackground(painter, option, index);
drawDisplay(painter, option, option.rect, task->title());
drawFocus(painter, option, option.rect);
drawBackground(painter, option, index);
drawDisplay(painter, option, option.rect, task->title());
drawFocus(painter, option, option.rect);
}
}
@ -586,7 +586,7 @@ void TaskItemDelegate::paint( QPainter * painter,
void TaskItemDelegate::updateEditorGeometry ( QWidget * editor, const QStyleOptionViewItem & option, const QModelIndex& /*index*/ ) const
{
editor->setGeometry(option.rect);
editor->setGeometry(option.rect);
}
QRect TaskItemDelegate::calcDecorationRect(QRect mainRect, int horizontalAlignment, int verticalAlignment) const
@ -602,13 +602,13 @@ QRect TaskItemDelegate::calcDecorationRect(QRect mainRect, int horizontalAlignme
rect.setWidth(mainRect.width()/8);
rect.setHeight((mainRect.height()/3)*2);
}
// else if(verticalAlignment == Qt::AlignBottom)
// {
// rect.setX(mainRect.x()+ 2);
// rect.setY(mainRect.y()+ (mainRect.height()/3)*2 - 2);
// rect.setWidth(mainRect.width()/8);
// rect.setHeight(mainRect.height()/3);
// }
// else if(verticalAlignment == Qt::AlignBottom)
// {
// rect.setX(mainRect.x()+ 2);
// rect.setY(mainRect.y()+ (mainRect.height()/3)*2 - 2);
// rect.setWidth(mainRect.width()/8);
// rect.setHeight(mainRect.height()/3);
// }
}
if(horizontalAlignment == Qt::AlignRight)
{

View File

@ -4,6 +4,7 @@
#include <QAbstractItemModel>
#include <QStyleOptionViewItem>
#include <QItemDelegate>
#include <QStyledItemDelegate>
#include <QTreeView>
#include <QMenu>

View File

@ -3,76 +3,76 @@
#include "timetreemodel.h"
TimeTreeDlg::TimeTreeDlg(QWidget *parent, PTimeLine timeline, Settings& settings) :
QDialog(parent),
ui(new Ui::TimeTreeDlg),
mTimeline(timeline), mSettings(settings),
mTimeIntervalDlg(nullptr)
QDialog(parent),
ui(new Ui::TimeTreeDlg),
mTimeline(timeline), mSettings(settings),
mTimeIntervalDlg(nullptr)
{
ui->setupUi(this);
mModel = new TimeTreeModel(mTimeline, mSettings);
ui->mTimeTree->setModel(mModel);
connect(ui->mAddIntervalButton, SIGNAL(clicked()), this, SLOT(addInterval()));
connect(ui->mRemoveIntervalButton, SIGNAL(clicked()), this, SLOT(removeInterval()));
ui->setupUi(this);
mModel = new TimeTreeModel(mTimeline, mSettings);
ui->mTimeTree->setModel(mModel);
connect(ui->mAddIntervalButton, SIGNAL(clicked()), this, SLOT(addInterval()));
connect(ui->mRemoveIntervalButton, SIGNAL(clicked()), this, SLOT(removeInterval()));
}
TimeTreeDlg::~TimeTreeDlg()
{
delete ui;
delete ui;
}
void TimeTreeDlg::addInterval()
{
//QModelIndex index = ui->mTimeTree->currentIndex();
if (mTimeIntervalDlg)
{
mTimeIntervalDlg->show();
mTimeIntervalDlg->setFocus();
}
else
{
QDateTime current = QDateTime::currentDateTime();
//QModelIndex index = ui->mTimeTree->currentIndex();
if (mTimeIntervalDlg)
{
mTimeIntervalDlg->show();
mTimeIntervalDlg->setFocus();
}
else
{
QDateTime current = QDateTime::currentDateTime();
mTimeIntervalDlg = new TimeIntervalDlg(this, mModel, mTimeline, TimeIntervalDlg::Type::New, TimeRecord());
connect(mTimeIntervalDlg, SIGNAL(accepted()), this, SLOT(onNewIntervalAccepted()));
mTimeIntervalDlg = new TimeIntervalDlg(this, mModel, mTimeline, TimeIntervalDlg::Type::New, TimeRecord());
connect(mTimeIntervalDlg, SIGNAL(accepted()), this, SLOT(onNewIntervalAccepted()));
mTimeIntervalDlg->setStartDate(current.addSecs(-600));
mTimeIntervalDlg->setFinishDate(current);
//mTimeIntervalDlg->setModal(false);
mTimeIntervalDlg->show();
}
mTimeIntervalDlg->setStartDate(current.addSecs(-600));
mTimeIntervalDlg->setFinishDate(current);
//mTimeIntervalDlg->setModal(false);
mTimeIntervalDlg->show();
}
}
void TimeTreeDlg::removeInterval()
{
QModelIndex index = ui->mTimeTree->currentIndex();
if (!index.isValid())
return;
QModelIndex index = ui->mTimeTree->currentIndex();
if (!index.isValid())
return;
mModel->cutInterval(index);
// Find interval in timeline by id
// Compare if return from findInterval() is whole interval or part of existing
// Depending on check result - delete or update existing interval
mModel->cutInterval(index);
// Find interval in timeline by id
// Compare if return from findInterval() is whole interval or part of existing
// Depending on check result - delete or update existing interval
}
void TimeTreeDlg::changeInterval()
{
QModelIndex index = ui->mTimeTree->currentIndex();
if (!index.isValid())
return;
QModelIndex index = ui->mTimeTree->currentIndex();
if (!index.isValid())
return;
QDateTime current = QDateTime::currentDateTime();
QDateTime current = QDateTime::currentDateTime();
mTimeIntervalDlg = new TimeIntervalDlg(this, mModel, mTimeline, TimeIntervalDlg::Type::Change, TimeRecord());
connect(mTimeIntervalDlg, SIGNAL(accepted()), this, SLOT(onNewIntervalAccepted()));
mTimeIntervalDlg = new TimeIntervalDlg(this, mModel, mTimeline, TimeIntervalDlg::Type::Change, TimeRecord());
connect(mTimeIntervalDlg, SIGNAL(accepted()), this, SLOT(onNewIntervalAccepted()));
mTimeIntervalDlg->setStartDate(current.addSecs(-600));
mTimeIntervalDlg->setFinishDate(current);
mTimeIntervalDlg->setModal(false);
mTimeIntervalDlg->show();
mTimeIntervalDlg->setStartDate(current.addSecs(-600));
mTimeIntervalDlg->setFinishDate(current);
mTimeIntervalDlg->setModal(false);
mTimeIntervalDlg->show();
}
void TimeTreeDlg::onNewIntervalAccepted()
{
delete mModel;
ui->mTimeTree->setModel(mModel = new TimeTreeModel(mTimeline, mSettings));
delete mModel;
ui->mTimeTree->setModel(mModel = new TimeTreeModel(mTimeline, mSettings));
}

View File

@ -6,7 +6,7 @@
#ifdef USE_SIMPLE_TIMETREE
TimeTreeModel::TimeTreeModel(PTimeLine timeline)
:mTimeLine(timeline)
:mTimeLine(timeline)
{
}
@ -16,70 +16,70 @@ TimeTreeModel::~TimeTreeModel()
void TimeTreeModel::setTimeLine(PTimeLine timeline)
{
mTimeLine = timeline;
mTimeLine = timeline;
}
QModelIndex TimeTreeModel::index(int row, int column, const QModelIndex &parent) const
{
return createIndex(row, column);
return createIndex(row, column);
}
QModelIndex TimeTreeModel::parent(const QModelIndex &child) const
{
return QModelIndex();
return QModelIndex();
}
int TimeTreeModel::rowCount(const QModelIndex &parent) const
{
if (parent.isValid())
return 0;
return mTimeLine->data().count();
if (parent.isValid())
return 0;
return mTimeLine->data().count();
}
int TimeTreeModel::columnCount(const QModelIndex &parent) const
{
return 1;
return 1;
}
QVariant TimeTreeModel::data(const QModelIndex &index, int role) const
{
TimeRecord& tr = mTimeLine->data()[index.row()];
switch (role)
{
case Qt::DisplayRole:
return QString("%1 - %2").arg(tr.startTime().toLocalTime().toString( Qt::SystemLocaleShortDate), tr.endTime().toLocalTime().toString(Qt::SystemLocaleShortDate));
}
return QVariant();
TimeRecord& tr = mTimeLine->data()[index.row()];
switch (role)
{
case Qt::DisplayRole:
return QString("%1 - %2").arg(tr.startTime().toLocalTime().toString( Qt::SystemLocaleShortDate), tr.endTime().toLocalTime().toString(Qt::SystemLocaleShortDate));
}
return QVariant();
}
bool TimeTreeModel::setData(const QModelIndex &index, const QVariant &value, int role /* = Qt::EditRole */)
{
return false;
return false;
}
Qt::ItemFlags TimeTreeModel::flags(const QModelIndex &index) const
{
return Qt::ItemIsSelectable | Qt::ItemIsEnabled;
return Qt::ItemIsSelectable | Qt::ItemIsEnabled;
}
void TimeTreeModel::beginAddRow()
{
beginInsertRows(QModelIndex(), 0, 0);
beginInsertRows(QModelIndex(), 0, 0);
}
void TimeTreeModel::endAddRow()
{
endInsertRows();
endInsertRows();
}
void TimeTreeModel::timeUpdated()
{
dataChanged(createIndex(0, 0), createIndex(0, 0));
dataChanged(createIndex(0, 0), createIndex(0, 0));
}
QVariant TimeTreeModel::headerData(int section, Qt::Orientation orientation, int role /* = Qt::DisplayRole */) const
{
return "";//QVariant();
return "";//QVariant();
}
#else
@ -101,12 +101,12 @@ static void UnpackDate(int packed, Level& l, int& year, int& month, int& day, qu
TimeTreeModel::TimeTreeModel(PTimeLine timeline, Settings& settings)
:mTimeLine(timeline), mSettings(settings), mItemIdGenerator(0)
:mTimeLine(timeline), mSettings(settings), mItemIdGenerator(0)
{
if (settings.data()[KEY_SHOW_SECONDS].toBool())
mTimeFormat = "hh:mm:ss";
else
mTimeFormat = "hh:mm";
if (settings.data()[KEY_SHOW_SECONDS].toBool())
mTimeFormat = "hh:mm:ss";
else
mTimeFormat = "hh:mm";
}
TimeTreeModel::~TimeTreeModel()
@ -115,276 +115,281 @@ TimeTreeModel::~TimeTreeModel()
void TimeTreeModel::setTimeLine(PTimeLine timeline)
{
mTimeLine = timeline;
mTimeLine = timeline;
}
QModelIndex TimeTreeModel::index(int row, int column, const QModelIndex &parent) const
{
std::set<int> components;
std::set<int>::iterator iter;
Level l;
int id = 0, year = 0, month = 0, day = 0;
quint64 intervalId = 0;
std::vector<TimeRecord> intervals;
if (parent.isValid())
{
// Find parent date
UnpackDate(parent.internalId(), l, year, month, day, intervalId);
l = (Level)((int)l + 1);
}
else
l = Level_Year;
std::set<int> components;
std::set<int>::iterator iter;
Level l;
int id = 0, year = 0, month = 0, day = 0;
quint64 intervalId = 0;
std::vector<TimeRecord> intervals;
if (parent.isValid())
{
// Find parent date
UnpackDate(parent.internalId(), l, year, month, day, intervalId);
l = (Level)((int)l + 1);
}
else
l = Level_Year;
switch (l)
{
case Level_Year:
mTimeLine->getYears(components);
iter = components.begin();
std::advance(iter, row);
id = PackDate(Level_Year, *iter, 1, 1, 0);
break;
switch (l)
{
case Level_Year:
mTimeLine->getYears(components);
iter = components.begin();
std::advance(iter, row);
id = PackDate(Level_Year, *iter, 1, 1, 0);
break;
case Level_Month:
// Find monthes set
mTimeLine->getMonthes(year, components);
iter = components.begin();
std::advance(iter, row);
month = *iter;
case Level_Month:
// Find monthes set
mTimeLine->getMonthes(year, components);
iter = components.begin();
std::advance(iter, row);
month = *iter;
// Save year month to id
id = PackDate(Level_Month, year, month, 1, 0);
break;
// Save year month to id
id = PackDate(Level_Month, year, month, 1, 0);
break;
case Level_Day:
// Get set of available days
mTimeLine->getDays(year, month, components);
case Level_Day:
// Get set of available days
mTimeLine->getDays(year, month, components);
// Find day corresponding by requested row
iter = components.begin();
std::advance(iter, row);
day = *iter;
// Find day corresponding by requested row
iter = components.begin();
std::advance(iter, row);
day = *iter;
// Pack date to internal id
id = PackDate(Level_Day, year, month, day, 0);
break;
// Pack date to internal id
id = PackDate(Level_Day, year, month, day, 0);
break;
case Level_Time:
// Get time intervals related to that day
mTimeLine->getTime(year, month, day, &intervals);
case Level_Time:
// Get time intervals related to that day
mTimeLine->getTime(year, month, day, &intervals);
// internal id will refer corresponding DB record
id = PackDate(Level_Time, year, month, day, intervals[row].id());
break;
}
// internal id will refer corresponding DB record
id = PackDate(Level_Time, year, month, day, intervals[row].id());
break;
}
return createIndex(row, column, id);
return createIndex(row, column, id);
}
QModelIndex TimeTreeModel::parent(const QModelIndex &child) const
{
if (!child.isValid())
return QModelIndex();
if (!child.isValid())
return QModelIndex();
std::set<int> components;
std::set<int>::iterator iter;
int year, month, day, row;
quint64 intervalId;
Level l;
UnpackDate(child.internalId(), l, year, month, day, intervalId);
std::set<int> components;
std::set<int>::iterator iter;
int year, month, day, row;
quint64 intervalId;
Level l;
UnpackDate(child.internalId(), l, year, month, day, intervalId);
switch (l)
{
case Level_Year:
return QModelIndex();
switch (l)
{
case Level_Year:
return QModelIndex();
case Level_Month:
mTimeLine->getYears(components);
iter = components.find(year);
row = std::distance(components.begin(), iter);
return createIndex(row, 0, PackDate(Level_Year, year, 1, 1, 0));
case Level_Month:
mTimeLine->getYears(components);
iter = components.find(year);
row = std::distance(components.begin(), iter);
return createIndex(row, 0, PackDate(Level_Year, year, 1, 1, 0));
case Level_Day:
mTimeLine->getMonthes(year, components);
iter = components.find(month);
row = std::distance(components.begin(), iter);
return createIndex(row, 0, PackDate(Level_Month, year, month, 1, 0));
case Level_Day:
mTimeLine->getMonthes(year, components);
iter = components.find(month);
row = std::distance(components.begin(), iter);
return createIndex(row, 0, PackDate(Level_Month, year, month, 1, 0));
case Level_Time:
mTimeLine->getDays(year, month, components);
iter = components.find(day);
row = std::distance(components.begin(), iter);
return createIndex(row, 0, PackDate(Level_Day, year, month, day, 0));
}
assert(0);
case Level_Time:
mTimeLine->getDays(year, month, components);
iter = components.find(day);
row = std::distance(components.begin(), iter);
return createIndex(row, 0, PackDate(Level_Day, year, month, day, 0));
}
assert(0);
}
int TimeTreeModel::rowCount(const QModelIndex &parent) const
{
int result = 0, year = 0, month = 0, day = 0;
quint64 intervalId;
int result = 0, year = 0, month = 0, day = 0;
quint64 intervalId;
Level l;
if (!parent.isValid())
l = Level_Year;
else
{
UnpackDate(parent.internalId(), l, year, month, day, intervalId);
l = Level((int)l + 1);
}
Level l;
if (!parent.isValid())
l = Level_Year;
else
{
UnpackDate(parent.internalId(), l, year, month, day, intervalId);
l = Level((int)l + 1);
}
std::set<int> rows;
switch (l)
{
case Level_Month:
// Find how much monthes are in that year related records
mTimeLine->getMonthes(year, rows);
result = rows.size();
break;
std::set<int> rows;
switch (l)
{
case Level_Month:
// Find how much monthes are in that year related records
mTimeLine->getMonthes(year, rows);
result = rows.size();
break;
case Level_Day:
// Find how much days are in that year&month related records
mTimeLine->getDays(year, month, rows);
result = rows.size();
break;
case Level_Day:
// Find how much days are in that year&month related records
mTimeLine->getDays(year, month, rows);
result = rows.size();
break;
case Level_Time:
// Find how much time intervals are in that year&month&day related records
result = mTimeLine->getTime(year, month, day, nullptr);
break;
case Level_Time:
// Find how much time intervals are in that year&month&day related records
result = mTimeLine->getTime(year, month, day, nullptr);
break;
case Level_Year:
mTimeLine->getYears(rows);
result = rows.size();
break;
case Level_Year:
mTimeLine->getYears(rows);
result = rows.size();
break;
default:
return 0;
}
default:
return 0;
}
return result;
return result;
}
int TimeTreeModel::columnCount(const QModelIndex &parent) const
{
return 1;
return 1;
}
static QString monthToString(int month)
{
return QDate::longMonthName(month);
}
QVariant TimeTreeModel::data(const QModelIndex &index, int role) const
{
if (!index.isValid())
return QVariant();
if (role != Qt::DisplayRole)
return QVariant();
if (!index.isValid())
return QVariant();
if (role != Qt::DisplayRole)
return QVariant();
int year, month, day;
quint64 intervalId;
std::vector<TimeRecord> intervals;
TimeRecord tr;
Level l;
UnpackDate(index.internalId(), l, year, month, day, intervalId);
int year, month, day;
quint64 intervalId;
std::vector<TimeRecord> intervals;
TimeRecord tr;
Level l;
UnpackDate(index.internalId(), l, year, month, day, intervalId);
switch(l)
{
case Level_Year:
return QString::number(year);
switch(l)
{
case Level_Year:
return QString::number(year);
case Level_Month:
return QString::number(month);
case Level_Month:
return monthToString(month);
case Level_Day:
return QString::number(day);
case Level_Day:
return QString::number(day);
case Level_Time:
mTimeLine->getTime(year, month, day, &intervals);
tr = intervals[index.row()];
case Level_Time:
mTimeLine->getTime(year, month, day, &intervals);
tr = intervals[index.row()];
// Intervals are in local time already
return QString("%1 - %2").arg(tr.startTime().time().toString(mTimeFormat), tr.endTime().time().toString(mTimeFormat));
// Intervals are in local time already
return QString("%1 - %2").arg(tr.startTime().time().toString(mTimeFormat), tr.endTime().time().toString(mTimeFormat));
default:
return QVariant();
}
default:
return QVariant();
}
}
bool TimeTreeModel::setData(const QModelIndex &index, const QVariant &value, int role /* = Qt::EditRole */)
{
return QAbstractItemModel::setData(index, value, role);
return QAbstractItemModel::setData(index, value, role);
}
Qt::ItemFlags TimeTreeModel::flags(const QModelIndex &index) const
{
return Qt::ItemIsSelectable | Qt::ItemIsEnabled;
return Qt::ItemIsSelectable | Qt::ItemIsEnabled;
}
void TimeTreeModel::beginAddRow()
{
beginInsertRows(QModelIndex(), 0, 0);
beginInsertRows(QModelIndex(), 0, 0);
}
void TimeTreeModel::endAddRow()
{
endInsertRows();
endInsertRows();
}
void TimeTreeModel::timeUpdated()
{
dataChanged(createIndex(0, 0), createIndex(0, this->columnCount()-1));
dataChanged(createIndex(0, 0), createIndex(0, this->columnCount()-1));
}
QVariant TimeTreeModel::headerData(int section, Qt::Orientation orientation, int role /* = Qt::DisplayRole */) const
{
return QVariant();
return QVariant();
}
TimeRecord TimeTreeModel::findInterval(const QModelIndex &index)
{
int year, month, day;
quint64 intervalId;
std::vector<TimeRecord> intervals;
TimeRecord tr;
Level l;
UnpackDate(index.internalId(), l, year, month, day, intervalId);
int year, month, day;
quint64 intervalId;
std::vector<TimeRecord> intervals;
TimeRecord tr;
Level l;
UnpackDate(index.internalId(), l, year, month, day, intervalId);
switch(l)
{
case Level_Year:
case Level_Month:
case Level_Day:
return TimeRecord();
switch(l)
{
case Level_Year:
case Level_Month:
case Level_Day:
return TimeRecord();
case Level_Time:
mTimeLine->getTime(year, month, day, &intervals);
return intervals[index.row()];
}
case Level_Time:
mTimeLine->getTime(year, month, day, &intervals);
return intervals[index.row()];
}
}
void TimeTreeModel::cutInterval(const QModelIndex& index)
{
TimeRecord t = findInterval(index);
if (!t.id())
return;
TimeRecord t = findInterval(index);
if (!t.id())
return;
int year, month, day;
quint64 intervalId;
std::vector<TimeRecord> intervals;
TimeRecord tr;
Level l;
UnpackDate(index.internalId(), l, year, month, day, intervalId);
int year, month, day;
quint64 intervalId;
std::vector<TimeRecord> intervals;
TimeRecord tr;
Level l;
UnpackDate(index.internalId(), l, year, month, day, intervalId);
if (l != Level_Time)
return;
if (l != Level_Time)
return;
beginRemoveRows(index.parent(), index.row(), index.row());
mTimeLine->cutInterval(t);
endRemoveRows();
beginRemoveRows(index.parent(), index.row(), index.row());
mTimeLine->cutInterval(t);
endRemoveRows();
}
void TimeTreeModel::insertInterval(const TimeRecord &interval)
{
mTimeLine->insertInterval(interval);
/*
mTimeLine->insertInterval(interval);
/*
// Get local time and see what rows are affected using date only
QDate day = interval.startTime().toLocalTime().date();
while (day >= interval.startTime().toLocalTime().date() && day <= interval.endTime().toLocalTime().date())
@ -411,92 +416,92 @@ void TimeTreeModel::insertInterval(const TimeRecord &interval)
bool operator < (const TimeTreeModel::Item& lhs, const TimeTreeModel::Item& rhs)
{
if (lhs.mLevel < rhs.mLevel)
return true;
if (lhs.mLevel > rhs.mLevel)
if (lhs.mLevel < rhs.mLevel)
return true;
if (lhs.mLevel > rhs.mLevel)
return false;
if (lhs.mYear < rhs.mYear)
return true;
if (lhs.mYear > rhs.mYear)
return false;
if (lhs.mMonth < rhs.mMonth)
return true;
if (lhs.mMonth > rhs.mMonth)
return false;
if (lhs.mDay < rhs.mDay)
return true;
if (lhs.mDay > rhs.mDay)
return false;
if (lhs.mTimeIntervalId < rhs.mTimeIntervalId)
return true;
return false;
if (lhs.mYear < rhs.mYear)
return true;
if (lhs.mYear > rhs.mYear)
return false;
if (lhs.mMonth < rhs.mMonth)
return true;
if (lhs.mMonth > rhs.mMonth)
return false;
if (lhs.mDay < rhs.mDay)
return true;
if (lhs.mDay > rhs.mDay)
return false;
if (lhs.mTimeIntervalId < rhs.mTimeIntervalId)
return true;
return false;
}
int TimeTreeModel::PackDate(Level l, int year, int month, int day, quint64 intervalId) const
{
Item item;
item.mLevel = l;
item.mYear = year;
item.mMonth = month;
item.mDay = day;
item.mTimeIntervalId = intervalId;
Item item;
item.mLevel = l;
item.mYear = year;
item.mMonth = month;
item.mDay = day;
item.mTimeIntervalId = intervalId;
std::map<Item, int>::iterator iter = mItem2Id.find(item);
if (iter != mItem2Id.end())
return iter->second;
std::map<Item, int>::iterator iter = mItem2Id.find(item);
if (iter != mItem2Id.end())
return iter->second;
mItemIdGenerator++;
mItem2Id[item] = mItemIdGenerator;
mId2Item[mItemIdGenerator] = item;
mItemIdGenerator++;
mItem2Id[item] = mItemIdGenerator;
mId2Item[mItemIdGenerator] = item;
return mItemIdGenerator;
return mItemIdGenerator;
}
void TimeTreeModel::UnpackDate(int packed, Level& l, int& year, int& month, int& day, quint64& intervalId) const
{
std::map<int, Item>::const_iterator iter = mId2Item.find(packed);
if (iter != mId2Item.end())
{
l = iter->second.mLevel;
year = iter->second.mYear;
month = iter->second.mMonth;
day = iter->second.mDay;
intervalId = iter->second.mTimeIntervalId;
}
std::map<int, Item>::const_iterator iter = mId2Item.find(packed);
if (iter != mId2Item.end())
{
l = iter->second.mLevel;
year = iter->second.mYear;
month = iter->second.mMonth;
day = iter->second.mDay;
intervalId = iter->second.mTimeIntervalId;
}
}
QModelIndex TimeTreeModel::dayToIndex(const QDate& date)
{
std::set<int> components;
std::set<int>::iterator iter;
mTimeLine->getYears(components);
std::set<int> components;
std::set<int>::iterator iter;
mTimeLine->getYears(components);
iter = components.find(date.year());
if (iter == components.end())
return QModelIndex();
int yearRow = std::distance(components.begin(), iter);
QModelIndex yearIndex = this->createIndex(yearRow, 0, PackDate(Level_Year, date.year(), 1, 1, 0));
iter = components.find(date.year());
if (iter == components.end())
return QModelIndex();
int yearRow = std::distance(components.begin(), iter);
QModelIndex yearIndex = this->createIndex(yearRow, 0, PackDate(Level_Year, date.year(), 1, 1, 0));
mTimeLine->getMonthes(date.year(), components);
iter = components.find(date.month());
if (iter == components.end())
return QModelIndex();
int monthRow = std::distance(components.begin(), iter);
QModelIndex monthIndex = this->createIndex(monthRow, 0, PackDate(Level_Month, date.year(), date.month(), 1, 0));
mTimeLine->getMonthes(date.year(), components);
iter = components.find(date.month());
if (iter == components.end())
return QModelIndex();
int monthRow = std::distance(components.begin(), iter);
QModelIndex monthIndex = this->createIndex(monthRow, 0, PackDate(Level_Month, date.year(), date.month(), 1, 0));
mTimeLine->getDays(date.year(), date.month(), components);
iter = components.find(date.day());
if (iter == components.end())
return QModelIndex();
int dayRow = std::distance(components.begin(), iter);
QModelIndex dayIndex = this->createIndex(dayRow, 0, PackDate(Level_Day, date.year(), date.month(), date.day(), 0));
mTimeLine->getDays(date.year(), date.month(), components);
iter = components.find(date.day());
if (iter == components.end())
return QModelIndex();
int dayRow = std::distance(components.begin(), iter);
QModelIndex dayIndex = this->createIndex(dayRow, 0, PackDate(Level_Day, date.year(), date.month(), date.day(), 0));
return dayIndex;
return dayIndex;
}
#endif

View File

@ -8,53 +8,53 @@
class TimeTreeModel: public QAbstractItemModel
{
public:
TimeTreeModel(PTimeLine timeline, Settings& settings);
~TimeTreeModel();
TimeTreeModel(PTimeLine timeline, Settings& settings);
~TimeTreeModel();
void setTimeLine(PTimeLine timeline);
QModelIndex index(int row, int column, const QModelIndex &parent) const;
QModelIndex parent(const QModelIndex &child) const;
int rowCount(const QModelIndex &parent = QModelIndex()) const;
int columnCount(const QModelIndex &parent = QModelIndex()) const;
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
bool setData(const QModelIndex &index, const QVariant &value, int role /* = Qt::EditRole */);
Qt::ItemFlags flags(const QModelIndex &index) const;
QVariant headerData(int section, Qt::Orientation orientation, int role /* = Qt::DisplayRole */) const;
void beginAddRow();
void endAddRow();
void timeUpdated();
TimeRecord findInterval(const QModelIndex& index);
void cutInterval(const QModelIndex& index);
void insertInterval(const TimeRecord& interval);
void setTimeLine(PTimeLine timeline);
QModelIndex index(int row, int column, const QModelIndex &parent) const;
QModelIndex parent(const QModelIndex &child) const;
int rowCount(const QModelIndex &parent = QModelIndex()) const;
int columnCount(const QModelIndex &parent = QModelIndex()) const;
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
bool setData(const QModelIndex &index, const QVariant &value, int role /* = Qt::EditRole */);
Qt::ItemFlags flags(const QModelIndex &index) const;
QVariant headerData(int section, Qt::Orientation orientation, int role /* = Qt::DisplayRole */) const;
void beginAddRow();
void endAddRow();
void timeUpdated();
TimeRecord findInterval(const QModelIndex& index);
void cutInterval(const QModelIndex& index);
void insertInterval(const TimeRecord& interval);
protected:
PTimeLine mTimeLine;
Settings& mSettings;
QString mTimeFormat;
PTimeLine mTimeLine;
Settings& mSettings;
QString mTimeFormat;
public:
enum Level
{
Level_Year = 0,
Level_Month,
Level_Day,
Level_Time
};
enum Level
{
Level_Year = 0,
Level_Month,
Level_Day,
Level_Time
};
struct Item
{
Level mLevel;
int mYear, mMonth, mDay;
quint64 mTimeIntervalId;
};
struct Item
{
Level mLevel;
int mYear, mMonth, mDay;
quint64 mTimeIntervalId;
};
protected:
mutable int mItemIdGenerator;
mutable std::map<int, Item> mId2Item;
mutable std::map<Item, int> mItem2Id;
mutable int mItemIdGenerator;
mutable std::map<int, Item> mId2Item;
mutable std::map<Item, int> mItem2Id;
int PackDate(Level l, int year, int month, int day, quint64 intervalId) const;
void UnpackDate(int packed, Level& l, int& year, int& month, int& day, quint64& intervalId) const;
QModelIndex dayToIndex(const QDate& date);
int PackDate(Level l, int year, int month, int day, quint64 intervalId) const;
void UnpackDate(int packed, Level& l, int& year, int& month, int& day, quint64& intervalId) const;
QModelIndex dayToIndex(const QDate& date);
};
bool operator < (const TimeTreeModel::Item& lhs, const TimeTreeModel::Item& rhs);

View File

@ -1,7 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'aboutdlg.ui'
**
** Created by: Qt User Interface Compiler version 5.6.2
** Created by: Qt User Interface Compiler version 5.9.5
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
@ -67,11 +67,11 @@ public:
void retranslateUi(QDialog *AboutDlg)
{
AboutDlg->setWindowTitle(QApplication::translate("AboutDlg", "Dialog", 0));
AboutDlg->setWindowTitle(QApplication::translate("AboutDlg", "Dialog", Q_NULLPTR));
mTextLabel->setText(QApplication::translate("AboutDlg", "werwre\n"
"werwer\n"
"", 0));
mLicenseLabel->setText(QApplication::translate("AboutDlg", "TextLabel", 0));
"", Q_NULLPTR));
mLicenseLabel->setText(QApplication::translate("AboutDlg", "TextLabel", Q_NULLPTR));
} // retranslateUi
};

View File

@ -1,7 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'attachmentsdialog.ui'
**
** Created by: Qt User Interface Compiler version 5.6.2
** Created by: Qt User Interface Compiler version 5.9.5
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
@ -69,8 +69,8 @@ public:
void retranslateUi(QDialog *AttachmentsDialog)
{
AttachmentsDialog->setWindowTitle(QApplication::translate("AttachmentsDialog", "Dialog", 0));
label->setText(QApplication::translate("AttachmentsDialog", "There is list of attachments in document. Use context menu or drag-and-drop to manage it.", 0));
AttachmentsDialog->setWindowTitle(QApplication::translate("AttachmentsDialog", "Dialog", Q_NULLPTR));
label->setText(QApplication::translate("AttachmentsDialog", "There is list of attachments in document. Use context menu or drag-and-drop to manage it.", Q_NULLPTR));
} // retranslateUi
};

View File

@ -1,7 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'attachmentslist.ui'
**
** Created by: Qt User Interface Compiler version 5.6.2
** Created by: Qt User Interface Compiler version 5.9.5
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
@ -66,19 +66,19 @@ public:
void retranslateUi(QWidget *AttachmentsList)
{
AttachmentsList->setWindowTitle(QApplication::translate("AttachmentsList", "Form", 0));
mRenameAction->setText(QApplication::translate("AttachmentsList", "Rename", 0));
AttachmentsList->setWindowTitle(QApplication::translate("AttachmentsList", "Form", Q_NULLPTR));
mRenameAction->setText(QApplication::translate("AttachmentsList", "Rename", Q_NULLPTR));
#ifndef QT_NO_TOOLTIP
mRenameAction->setToolTip(QApplication::translate("AttachmentsList", "Rename", 0));
mRenameAction->setToolTip(QApplication::translate("AttachmentsList", "Rename", Q_NULLPTR));
#endif // QT_NO_TOOLTIP
mDeleteAction->setText(QApplication::translate("AttachmentsList", "Delete", 0));
mExportAction->setText(QApplication::translate("AttachmentsList", "Export...", 0));
mDeleteAction->setText(QApplication::translate("AttachmentsList", "Delete", Q_NULLPTR));
mExportAction->setText(QApplication::translate("AttachmentsList", "Export...", Q_NULLPTR));
#ifndef QT_NO_TOOLTIP
mExportAction->setToolTip(QApplication::translate("AttachmentsList", "Export", 0));
mExportAction->setToolTip(QApplication::translate("AttachmentsList", "Export", Q_NULLPTR));
#endif // QT_NO_TOOLTIP
mImportAction->setText(QApplication::translate("AttachmentsList", "Import new...", 0));
mImportAction->setText(QApplication::translate("AttachmentsList", "Import new...", Q_NULLPTR));
#ifndef QT_NO_TOOLTIP
mImportAction->setToolTip(QApplication::translate("AttachmentsList", "Import", 0));
mImportAction->setToolTip(QApplication::translate("AttachmentsList", "Import", Q_NULLPTR));
#endif // QT_NO_TOOLTIP
} // retranslateUi

View File

@ -1,7 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'finddialog.ui'
**
** Created by: Qt User Interface Compiler version 5.6.2
** Created by: Qt User Interface Compiler version 5.9.5
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
@ -82,9 +82,9 @@ public:
void retranslateUi(QDialog *FindDialog)
{
FindDialog->setWindowTitle(QApplication::translate("FindDialog", "Dialog", 0));
label->setText(QApplication::translate("FindDialog", "Text to search:", 0));
mSearchButton->setText(QApplication::translate("FindDialog", "Search", 0));
FindDialog->setWindowTitle(QApplication::translate("FindDialog", "Dialog", Q_NULLPTR));
label->setText(QApplication::translate("FindDialog", "Text to search:", Q_NULLPTR));
mSearchButton->setText(QApplication::translate("FindDialog", "Search", Q_NULLPTR));
} // retranslateUi
};

View File

@ -1,7 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'fvupdateconfirmdialog.ui'
**
** Created by: Qt User Interface Compiler version 5.6.2
** Created by: Qt User Interface Compiler version 5.9.5
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
@ -75,11 +75,11 @@ public:
void retranslateUi(QDialog *FvUpdateConfirmDialog)
{
FvUpdateConfirmDialog->setWindowTitle(QApplication::translate("FvUpdateConfirmDialog", "Software Update", 0));
updateFileIsLocatedLabel->setText(QApplication::translate("FvUpdateConfirmDialog", "The update file is located at:", 0));
updateFileLinkLabel->setText(QApplication::translate("FvUpdateConfirmDialog", "<a href=\"%1\">%1</a>", 0));
downloadThisUpdateLabel->setText(QApplication::translate("FvUpdateConfirmDialog", "Download this update, close \"%1\", install it, and then reopen \"%1\".", 0));
whenYouClickOkLabel->setText(QApplication::translate("FvUpdateConfirmDialog", "When you click \"OK\", this link will be opened in your browser.", 0));
FvUpdateConfirmDialog->setWindowTitle(QApplication::translate("FvUpdateConfirmDialog", "Software Update", Q_NULLPTR));
updateFileIsLocatedLabel->setText(QApplication::translate("FvUpdateConfirmDialog", "The update file is located at:", Q_NULLPTR));
updateFileLinkLabel->setText(QApplication::translate("FvUpdateConfirmDialog", "<a href=\"%1\">%1</a>", Q_NULLPTR));
downloadThisUpdateLabel->setText(QApplication::translate("FvUpdateConfirmDialog", "Download this update, close \"%1\", install it, and then reopen \"%1\".", Q_NULLPTR));
whenYouClickOkLabel->setText(QApplication::translate("FvUpdateConfirmDialog", "When you click \"OK\", this link will be opened in your browser.", Q_NULLPTR));
} // retranslateUi
};

Some files were not shown because too many files have changed in this diff Show More