4 Commits

Author SHA1 Message Date
Aurélie Delhaie
e2c090b3a0 Fix Splitter between editor and viewer 2022-05-03 20:02:39 +02:00
Aurélie
658f4d860c Merge pull request #1 from mojitaurelie/dev
Fix nav bar, better .pro file
2022-03-01 21:44:26 +01:00
Aurélie Delhaie
926edc5e6d proprocessor cryptopp 2022-03-01 21:43:21 +01:00
Aurélie Delhaie
64d216fcf2 Ecnryptable note 2022-02-08 17:59:05 +01:00
21 changed files with 201 additions and 120 deletions

View File

@@ -4,25 +4,33 @@ greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
CONFIG += c++17
win32:VERSION = 1.1.2.0 # major.minor.patch.build
else:VERSION = 1.1.2 # major.minor.patch
DEFINES += APP_VERSION=\"\\\"$${VERSION}\\\"\"
DEFINES += APP_NAME=\"\\\"TaskNote\\\"\"
# remove possible other optimization flags
win32 {
message("Build for Windows")
QMAKE_CXXFLAGS_RELEASE -= -O
QMAKE_CXXFLAGS_RELEASE -= -O1
QMAKE_CXXFLAGS_RELEASE *= -O2
DEFINES += APP_OS=\"\\\"Windows\\\"\"
DEFINES += APP_OS_VERSION=\"\\\"$$system(wmic os get version /value)\\\"\"
equals(QMAKE_TARGET.arch, arm64) {
message("CPU Architecture : aarch64")
# Add specific arm stuff here
DEFINES += APP_ARCH=\"\\\"arm64\\\"\"
}
equals(QMAKE_TARGET.arch, x86_64) {
message("CPU Architecture : x64")
QMAKE_CXXFLAGS_RELEASE += -favor:INTEL64
DEFINES += APP_ARCH=\"\\\"x64\\\"\"
}
RC_ICONS = icon.ico
VERSION = 1.1.0.0
QMAKE_TARGET_COMPANY = "Aurelie Delhaie"
QMAKE_TARGET_PRODUCT = "TaskNote"
QMAKE_TARGET_DESCRIPTION = "TaskNote"
QMAKE_TARGET_DESCRIPTION = "Simple note-taking workbook"
}
macx {
@@ -33,18 +41,19 @@ macx {
QMAKE_CXXFLAGS_RELEASE -= -O1
QMAKE_CXXFLAGS_RELEASE -= -O2
QMAKE_CXXFLAGS_RELEASE *= -O3
equals(QMAKE_APPLE_DEVICE_ARCHS, arm64) {
message("CPU Architecture : aarch64")
QMAKE_CXXFLAGS_RELEASE += -mcpu=apple-a14
}
VERSION = 1.1.0
QMAKE_APPLE_DEVICE_ARCHS = x86_64 arm64
DEFINES += APP_OS=\"\\\"macOS\\\"\"
DEFINES += APP_OS_VERSION=\"\\\"$$system(uname -r)\\\"\"
DEFINES += APP_ARCH=\"\\\"universal\\\"\"
}
linux-g++* {
message("Build for Linux")
DEFINES += APP_OS=\"\\\"$$system(cat /etc/issue | cut -d\' \' -f1)\\\"\"
DEFINES += APP_OS_VERSION=\"\\\"$$system(uname -r)\\\"\"
DEFINES += APP_ARCH=\"\\\"amd64\\\"\"
QMAKE_CXXFLAGS_RELEASE *= -O3
QMAKE_CXXFLAGS_RELEASE += -march=skylake
VERSION = 1.1.0
}
# You can make your code fail to compile if it uses deprecated APIs.

View File

@@ -1,14 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject>
<!-- Written by QtCreator 5.0.2, 2022-02-01T19:03:04. -->
<!-- Written by QtCreator 6.0.2, 2022-03-01T21:27:21. -->
<qtcreator>
<data>
<variable>EnvironmentId</variable>
<value type="QByteArray">{f1407b1e-b4d5-4aac-ba0d-b38072a0dfb8}</value>
<value type="QByteArray">{dbe9fba1-e5a9-4d98-85bf-f46da0900eba}</value>
</data>
<data>
<variable>ProjectExplorer.Project.ActiveTarget</variable>
<value type="int">0</value>
<value type="qlonglong">0</value>
</data>
<data>
<variable>ProjectExplorer.Project.EditorSettings</variable>
@@ -28,7 +28,7 @@
<value type="QByteArray" key="CurrentPreferences">QmlJSGlobal</value>
</valuemap>
</valuemap>
<value type="int" key="EditorConfiguration.CodeStyle.Count">2</value>
<value type="qlonglong" key="EditorConfiguration.CodeStyle.Count">2</value>
<value type="QByteArray" key="EditorConfiguration.Codec">UTF-8</value>
<value type="bool" key="EditorConfiguration.ConstrainTooltips">false</value>
<value type="int" key="EditorConfiguration.IndentSize">4</value>
@@ -77,7 +77,7 @@
<value type="bool" key="ClangTools.AnalyzeOpenFiles">true</value>
<value type="bool" key="ClangTools.BuildBeforeAnalysis">true</value>
<value type="QString" key="ClangTools.DiagnosticConfig">Builtin.DefaultTidyAndClazy</value>
<value type="int" key="ClangTools.ParallelJobs">4</value>
<value type="int" key="ClangTools.ParallelJobs">8</value>
<valuelist type="QVariantList" key="ClangTools.SelectedDirs"/>
<valuelist type="QVariantList" key="ClangTools.SelectedFiles"/>
<valuelist type="QVariantList" key="ClangTools.SuppressedDiagnostics"/>
@@ -89,30 +89,28 @@
<variable>ProjectExplorer.Project.Target.0</variable>
<valuemap type="QVariantMap">
<value type="QString" key="DeviceType">Desktop</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Qt 6.2.0 for macOS</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Qt 6.2.0 for macOS</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">qt.qt6.620.clang_64_kit</value>
<value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">1</value>
<value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
<value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop Qt 6.2.3 GCC 64bit</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop Qt 6.2.3 GCC 64bit</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">qt.qt6.623.gcc_64_kit</value>
<value type="qlonglong" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value>
<value type="qlonglong" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
<value type="qlonglong" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
<value type="int" key="EnableQmlDebugging">0</value>
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/Users/alexis/build-TaskNote-Qt_6_2_0_for_macOS-Debug</value>
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory.shadowDir">/Users/alexis/build-TaskNote-Qt_6_2_0_for_macOS-Debug</value>
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/aurelie/src/build-TaskNote-Desktop_Qt_6_2_3_GCC_64bit-Debug</value>
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory.shadowDir">/home/aurelie/src/build-TaskNote-Desktop_Qt_6_2_3_GCC_64bit-Debug</value>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
<valuelist type="QVariantList" key="QtProjectManager.QMakeBuildStep.SelectedAbis">
<value type="QString">arm-darwin-generic-mach_o-64bit</value>
</valuelist>
<valuelist type="QVariantList" key="QtProjectManager.QMakeBuildStep.SelectedAbis"/>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
@@ -123,7 +121,7 @@
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clean</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
@@ -131,28 +129,27 @@
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.CustomParsers"/>
<value type="bool" key="ProjectExplorer.BuildConfiguration.ParseStandardOutput">false</value>
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Debug</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">2</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.1">
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/Users/alexis/build-TaskNote-Qt_6_2_0_for_macOS-Release</value>
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory.shadowDir">/Users/alexis/build-TaskNote-Qt_6_2_0_for_macOS-Release</value>
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/aurelie/src/build-TaskNote-Desktop_Qt_6_2_3_GCC_64bit-Release</value>
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory.shadowDir">/home/aurelie/src/build-TaskNote-Desktop_Qt_6_2_3_GCC_64bit-Release</value>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
<valuelist type="QVariantList" key="QtProjectManager.QMakeBuildStep.SelectedAbis">
<value type="QString">arm-darwin-generic-mach_o-64bit</value>
</valuelist>
<valuelist type="QVariantList" key="QtProjectManager.QMakeBuildStep.SelectedAbis"/>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
@@ -163,7 +160,7 @@
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clean</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
@@ -171,6 +168,7 @@
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.CustomParsers"/>
<value type="bool" key="ProjectExplorer.BuildConfiguration.ParseStandardOutput">false</value>
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Release</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
@@ -179,20 +177,20 @@
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.2">
<value type="int" key="EnableQmlDebugging">0</value>
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/Users/alexis/build-TaskNote-Qt_6_2_0_for_macOS-Profile</value>
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory.shadowDir">/Users/alexis/build-TaskNote-Qt_6_2_0_for_macOS-Profile</value>
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/aurelie/src/build-TaskNote-Desktop_Qt_6_2_3_GCC_64bit-Profile</value>
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory.shadowDir">/home/aurelie/src/build-TaskNote-Desktop_Qt_6_2_3_GCC_64bit-Profile</value>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">true</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
<valuelist type="QVariantList" key="QtProjectManager.QMakeBuildStep.SelectedAbis"/>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
@@ -203,7 +201,7 @@
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clean</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
@@ -211,6 +209,7 @@
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.CustomParsers"/>
<value type="bool" key="ProjectExplorer.BuildConfiguration.ParseStandardOutput">false</value>
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Profile</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
@@ -218,10 +217,10 @@
<value type="int" key="QtQuickCompiler">0</value>
<value type="int" key="SeparateDebugInfo">0</value>
</valuemap>
<value type="int" key="ProjectExplorer.Target.BuildConfigurationCount">3</value>
<value type="qlonglong" key="ProjectExplorer.Target.BuildConfigurationCount">3</value>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">0</value>
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">0</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Deploy</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value>
@@ -231,7 +230,7 @@
<value type="bool" key="ProjectExplorer.DeployConfiguration.CustomDataEnabled">false</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value>
</valuemap>
<value type="int" key="ProjectExplorer.Target.DeployConfigurationCount">1</value>
<value type="qlonglong" key="ProjectExplorer.Target.DeployConfigurationCount">1</value>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0">
<value type="bool" key="Analyzer.Perf.Settings.UseGlobalSettings">true</value>
<value type="bool" key="Analyzer.QmlProfiler.Settings.UseGlobalSettings">true</value>
@@ -239,21 +238,19 @@
<valuelist type="QVariantList" key="CustomOutputParsers"/>
<value type="int" key="PE.EnvironmentAspect.Base">2</value>
<valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4RunConfiguration:/Users/alexis/TaskNote/TaskNote.pro</value>
<value type="QString" key="ProjectExplorer.RunConfiguration.BuildKey">/Users/alexis/TaskNote/TaskNote.pro</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.CustomExecutableRunConfiguration</value>
<value type="QString" key="ProjectExplorer.RunConfiguration.BuildKey"></value>
<value type="bool" key="RunConfiguration.UseCppDebugger">false</value>
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
<value type="bool" key="RunConfiguration.UseLibrarySearchPath">true</value>
<value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
<value type="QString" key="RunConfiguration.WorkingDirectory.default">/Users/alexis/build-TaskNote-Qt_6_2_0_for_macOS-Release/TaskNote.app/Contents/MacOS</value>
</valuemap>
<value type="int" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
<value type="qlonglong" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
</valuemap>
</data>
<data>
<variable>ProjectExplorer.Project.TargetCount</variable>
<value type="int">1</value>
<value type="qlonglong">1</value>
</data>
<data>
<variable>ProjectExplorer.Project.Updater.FileVersion</variable>

View File

@@ -1,9 +1,12 @@
<RCC>
<qresource prefix="/icon">
<file>resources/outline_add_circle_outline_black_18dp.png</file>
<file>resources/outline_delete_forever_black_18dp.png</file>
<file>resources/outline_save_black_18dp.png</file>
<file>resources/outline_help_outline_black_18dp.png</file>
<file>resources/outline_add_circle_outline_black_48dp.png</file>
<file>resources/outline_delete_forever_black_48dp.png</file>
<file>resources/outline_help_outline_black_48dp.png</file>
<file>resources/outline_lock_black_48dp.png</file>
<file>resources/outline_save_black_48dp.png</file>
<file>resources/outline_shield_black_48dp.png</file>
<file>resources/outline_lock_open_black_48dp.png</file>
</qresource>
<qresource prefix="/logo">
<file>resources/logo.png</file>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 208 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 885 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 183 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 490 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 271 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 620 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 620 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 191 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 468 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 963 B

View File

@@ -6,7 +6,8 @@ AboutDialog::AboutDialog(QWidget *parent) :
ui(new Ui::AboutDialog)
{
ui->setupUi(this);
ui->appNameLabel->setText(QString("TaskNote (%1)").arg(QSysInfo::currentCpuArchitecture()));
ui->appNameLabel->setText(QString("%1 (%2)").arg(APP_NAME, APP_ARCH));
ui->versionLabel->setText(QString("Version %1").arg(APP_VERSION));
}
AboutDialog::~AboutDialog()

View File

@@ -25,6 +25,9 @@
<property name="windowTitle">
<string>About TaskNote</string>
</property>
<property name="modal">
<bool>true</bool>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<layout class="QVBoxLayout" name="verticalLayout">
@@ -69,9 +72,9 @@
</widget>
</item>
<item>
<widget class="QLabel" name="label_3">
<widget class="QLabel" name="versionLabel">
<property name="text">
<string>Version 1.1.0.0</string>
<string>Version 1.2.0.0</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>

View File

@@ -51,12 +51,19 @@ void MainWindow::selectionChanged(int i)
clearAndDisableFields();
return;
}
ui->actionRemove->setDisabled(false);
ui->contentEdit->blockSignals(true);
ui->titleEdit->blockSignals(true);
ui->titleEdit->setDisabled(false);
ui->contentEdit->setDisabled(false);
ui->actionRemove->setDisabled(false);
ui->titleEdit->setText(n->getTitle());
ui->contentEdit->setPlainText(n->getContent());
ui->markdownViewer->setMarkdown(n->getContent());
ui->markdownViewer->setMarkdown(ui->contentEdit->toPlainText());
ui->contentEdit->blockSignals(false);
ui->titleEdit->blockSignals(false);
}
void MainWindow::removeSelected()
@@ -71,6 +78,7 @@ void MainWindow::removeSelected()
void MainWindow::save()
{
ui->actionSave->setDisabled(true);
if (this->currentIndex > -1)
{
Note *n = this->savemng->getNoteByIndex(this->currentIndex);
@@ -89,6 +97,7 @@ void MainWindow::titleChanged()
n->setTitle(ui->titleEdit->text());
ui->noteList->item(this->currentIndex)->setText(ui->titleEdit->text());
}
ui->actionSave->setDisabled(false);
timer->start(1000);
}
@@ -108,6 +117,7 @@ void MainWindow::contentChanged()
n->setContent(ui->contentEdit->toPlainText());
ui->markdownViewer->setMarkdown(ui->contentEdit->toPlainText());
}
ui->actionSave->setDisabled(false);
timer->start(1000);
}
@@ -122,6 +132,9 @@ void MainWindow::updateListView()
void MainWindow::clearAndDisableFields()
{
ui->contentEdit->blockSignals(true);
ui->titleEdit->blockSignals(true);
this->currentIndex = -1;
ui->actionRemove->setDisabled(true);
ui->titleEdit->setDisabled(true);
@@ -129,5 +142,8 @@ void MainWindow::clearAndDisableFields()
ui->titleEdit->clear();
ui->contentEdit->clear();
ui->markdownViewer->clear();
ui->contentEdit->blockSignals(false);
ui->titleEdit->blockSignals(false);
}

View File

@@ -20,8 +20,8 @@
<string>TaskNote</string>
</property>
<widget class="QWidget" name="centralwidget">
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QListWidget" name="noteList">
@@ -63,55 +63,65 @@
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_3">
<item>
<widget class="QLabel" name="label_3">
<property name="text">
<string>Markdown editor</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_2">
<property name="text">
<string>Viewer</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QPlainTextEdit" name="contentEdit">
<property name="enabled">
<bool>false</bool>
</property>
</widget>
</item>
<item>
<widget class="QTextEdit" name="markdownViewer">
<property name="enabled">
<bool>true</bool>
</property>
<property name="autoFormatting">
<set>QTextEdit::AutoAll</set>
</property>
<property name="lineWrapMode">
<enum>QTextEdit::WidgetWidth</enum>
</property>
<property name="readOnly">
<bool>true</bool>
</property>
<property name="acceptRichText">
<bool>false</bool>
</property>
<property name="textInteractionFlags">
<set>Qt::TextSelectableByMouse</set>
</property>
</widget>
</item>
</layout>
<widget class="QSplitter" name="splitter">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="childrenCollapsible">
<bool>false</bool>
</property>
<widget class="QPlainTextEdit" name="contentEdit">
<property name="enabled">
<bool>false</bool>
</property>
<property name="minimumSize">
<size>
<width>200</width>
<height>0</height>
</size>
</property>
<property name="font">
<font>
<kerning>false</kerning>
</font>
</property>
<property name="lineWrapMode">
<enum>QPlainTextEdit::NoWrap</enum>
</property>
</widget>
<widget class="QTextEdit" name="markdownViewer">
<property name="enabled">
<bool>true</bool>
</property>
<property name="minimumSize">
<size>
<width>200</width>
<height>0</height>
</size>
</property>
<property name="autoFormatting">
<set>QTextEdit::AutoAll</set>
</property>
<property name="lineWrapMode">
<enum>QTextEdit::NoWrap</enum>
</property>
<property name="readOnly">
<bool>true</bool>
</property>
<property name="acceptRichText">
<bool>false</bool>
</property>
<property name="textInteractionFlags">
<set>Qt::TextSelectableByMouse</set>
</property>
</widget>
</widget>
</item>
</layout>
</item>
@@ -120,15 +130,30 @@
</layout>
</widget>
<widget class="QToolBar" name="toolBar">
<property name="enabled">
<bool>true</bool>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>33</height>
<height>96</height>
</size>
</property>
<property name="contextMenuPolicy">
<enum>Qt::PreventContextMenu</enum>
</property>
<property name="windowTitle">
<string>toolBar</string>
</property>
<property name="movable">
<bool>false</bool>
</property>
<property name="toolButtonStyle">
<enum>Qt::ToolButtonTextUnderIcon</enum>
</property>
<property name="floatable">
<bool>false</bool>
</property>
<attribute name="toolBarArea">
<enum>TopToolBarArea</enum>
</attribute>
@@ -145,7 +170,7 @@
<action name="actionAdd">
<property name="icon">
<iconset resource="../../icons.qrc">
<normaloff>:/icon/resources/outline_add_circle_outline_black_18dp.png</normaloff>:/icon/resources/outline_add_circle_outline_black_18dp.png</iconset>
<normaloff>:/icon/resources/outline_add_circle_outline_black_48dp.png</normaloff>:/icon/resources/outline_add_circle_outline_black_48dp.png</iconset>
</property>
<property name="text">
<string>Add</string>
@@ -157,16 +182,19 @@
</property>
<property name="icon">
<iconset resource="../../icons.qrc">
<normaloff>:/icon/resources/outline_delete_forever_black_18dp.png</normaloff>:/icon/resources/outline_delete_forever_black_18dp.png</iconset>
<normaloff>:/icon/resources/outline_delete_forever_black_48dp.png</normaloff>:/icon/resources/outline_delete_forever_black_48dp.png</iconset>
</property>
<property name="text">
<string>Remove</string>
</property>
</action>
<action name="actionSave">
<property name="enabled">
<bool>false</bool>
</property>
<property name="icon">
<iconset resource="../../icons.qrc">
<normaloff>:/icon/resources/outline_save_black_18dp.png</normaloff>:/icon/resources/outline_save_black_18dp.png</iconset>
<normaloff>:/icon/resources/outline_save_black_48dp.png</normaloff>:/icon/resources/outline_save_black_48dp.png</iconset>
</property>
<property name="text">
<string>Save</string>
@@ -175,7 +203,7 @@
<action name="actionAbout">
<property name="icon">
<iconset resource="../../icons.qrc">
<normaloff>:/icon/resources/outline_help_outline_black_18dp.png</normaloff>:/icon/resources/outline_help_outline_black_18dp.png</iconset>
<normaloff>:/icon/resources/outline_help_outline_black_48dp.png</normaloff>:/icon/resources/outline_help_outline_black_48dp.png</iconset>
</property>
<property name="text">
<string>About</string>

View File

@@ -2,27 +2,34 @@
Note::Note()
{
QUuid uid = QUuid::createUuid();
this->uuid = uid.toString(QUuid::StringFormat::WithoutBraces);
}
QJsonObject Note::toJson()
{
QJsonObject o;
o["uuid"] = this->uuid;
o["title"] = this->title;
o["content"] = this->content;
return o;
}
Note *Note::fromJson(QJsonObject o)
{
Note *n = new Note();
n->uuid = o["uuid"].toString(n->uuid);
n->title = o["title"].toString();
n->content = o["content"].toString();
n->encrypted = o["encrypted"].toBool(false);
return n;
}
QString Note::getUuid()
{
return uuid;
}
QString Note::getTitle()
{
return title;
@@ -30,9 +37,12 @@ QString Note::getTitle()
QString Note::getContent()
{
return content;
if (!this->encrypted)
{
return content;
}
return "";
}
void Note::setTitle(QString value)
{
this->title = value;
@@ -40,6 +50,7 @@ void Note::setTitle(QString value)
void Note::setContent(QString value)
{
if (!this->encrypted) {
this->content = value;
}
}

View File

@@ -1,8 +1,15 @@
#ifndef NOTE_H
#define NOTE_H
#define TAG_SIZE 12
#include <iostream>
#include <string>
#include <QString>
#include <QJsonObject>
#include <QUuid>
#include <QMessageBox>
class Note
{
@@ -12,15 +19,17 @@ public:
QJsonObject toJson();
static Note* fromJson(QJsonObject o);
QString getUuid();
QString getTitle();
QString getContent();
void setTitle(QString value);
void setContent(QString value);
private:
QString uuid;
QString title;
QString content;
bool encrypted;
};
#endif // NOTE_H

View File

@@ -8,6 +8,10 @@ SaveManager::SaveManager()
SaveManager::~SaveManager()
{
flushSave();
foreach (Note *n, notes)
{
delete n;
}
}
void SaveManager::flushSave()