(activeArchivePath); }
private:
Archiver* archiver = new Archiver;
diff --git a/fernanda/src/style.h b/fernanda/src/style.h
index c9e5f73..a15c54f 100644
--- a/fernanda/src/style.h
+++ b/fernanda/src/style.h
@@ -1,3 +1,13 @@
+/*
+* Fernanda is a plain text editor for drafting long-form fiction. (At least, that's the plan.)
+* Copyright(C) 2022 - 2023 @fairybow (https://github.com/fairybow)
+*
+* https://github.com/fairybow/fernanda
+*
+* You should have received a copy of the GNU General Public License
+* along with this program.If not, see .
+*/
+
// style.h, Fernanda
#pragma once
diff --git a/fernanda/src/text.cpp b/fernanda/src/text.cpp
index 79cd0f5..04c841b 100644
--- a/fernanda/src/text.cpp
+++ b/fernanda/src/text.cpp
@@ -1,27 +1,17 @@
+/*
+* Fernanda is a plain text editor for drafting long-form fiction. (At least, that's the plan.)
+* Copyright(C) 2022 - 2023 @fairybow (https://github.com/fairybow)
+*
+* https://github.com/fairybow/fernanda
+*
+* You should have received a copy of the GNU General Public License
+* along with this program.If not, see .
+*/
+
// text.cpp, Fernanda
#include "text.h"
-const QString Text::operator%(QString lhs, const char* rhs)
-{
- return lhs + QStringLiteral("") + rhs;
-}
-
-const QString Text::operator%(QString lhs, QString rhs)
-{
- return lhs + QStringLiteral("
") + rhs;
-}
-
-const QString Text::operator/(QString lhs, const char* rhs)
-{
- return lhs + QStringLiteral("
") + rhs;
-}
-
-const QString Text::operator/(QString lhs, QString rhs)
-{
- return lhs + QStringLiteral("
") + rhs;
-}
-
const QRegularExpression Text::regex(Regex operation)
{
QRegularExpression result;
@@ -73,31 +63,6 @@ const QString Text::multiplyThese(QString character, int defaultArgument)
return result;
}
-const QString Text::multiSpaces(int spaces)
-{
- return multiplyThese(" ", spaces);
-}
-
-const QString Text::newLines(int lines)
-{
- return multiplyThese("\n", lines);
-}
-
-const QString Text::tableColumnSpacing(int columns)
-{
- return multiplyThese("
\n | ", columns);
-}
-
-const QString Text::heading(const char* text)
-{
- return QStringLiteral("") + text + QStringLiteral("
");
-}
-
-const QString Text::bold(const char* text)
-{
- return QStringLiteral("") + text + QStringLiteral("");
-}
-
const QString Text::pad(const char* text, int spaces)
{
QString padding = multiSpaces(spaces);
@@ -147,11 +112,6 @@ const QString Text::saveAndButtons(bool isQuit)
return pad("Save and change");
}
-const QString Text::openUdButton()
-{
- return pad("Open the user data folder");
-}
-
const QString Text::samples()
{
return
@@ -192,26 +152,6 @@ const QString Text::windowEditorShortcuts()
};
}
-const QString Text::shortcuts()
-{
- return heading("Shortcuts") % table({ menuShortcuts(), windowEditorShortcuts() });
-}
-
-const QString Text::repo()
-{
- return link("https://github.com/fairybow/fernanda");
-}
-
-const QString Text::releases()
-{
- return link("https://github.com/fairybow/fernanda/releases");
-}
-
-const QString Text::gitHubApi()
-{
- return QStringLiteral("https://api.github.com/repos/fairybow/fernanda/releases");
-}
-
const QString Text::about()
{
return
@@ -264,11 +204,6 @@ const QString Text::version(VersionCheck check, QString latestVersion)
};
}
-const QString Text::timeUp()
-{
- return QStringLiteral("Time's up!") + multiSpaces(10);
-}
-
const QString Text::totalCounts(int lines, int words, int characters)
{
return
diff --git a/fernanda/src/text.h b/fernanda/src/text.h
index a5a040b..c625bb8 100644
--- a/fernanda/src/text.h
+++ b/fernanda/src/text.h
@@ -1,3 +1,13 @@
+/*
+* Fernanda is a plain text editor for drafting long-form fiction. (At least, that's the plan.)
+* Copyright(C) 2022 - 2023 @fairybow (https://github.com/fairybow)
+*
+* https://github.com/fairybow/fernanda
+*
+* You should have received a copy of the GNU General Public License
+* along with this program.If not, see .
+*/
+
// text.h, Fernanda
#pragma once
@@ -29,35 +39,36 @@ namespace Text
Old
};
- const QString operator%(QString lhs, const char* rhs);
- const QString operator%(QString lhs, QString rhs);
- const QString operator/(QString lhs, const char* rhs);
- const QString operator/(QString lhs, QString rhs);
const QRegularExpression regex(Regex operation);
const QString multiplyThese(QString character, int defaultArgument = 1);
- const QString multiSpaces(int spaces = 3);
- const QString newLines(int lines = 2);
- const QString tableColumnSpacing(int columns = 9);
- const QString heading(const char* text);
- const QString bold(const char* text);
const QString pad(const char* text, int spaces = 3);
const QString pad(QString text, int spaces = 3);
const QString table(QStringList columns);
const QString link(const char* url, QString displayName = nullptr);
const QString change(bool isQuit = false);
const QString saveAndButtons(bool isQuit = false);
- const QString openUdButton();
const QString samples();
const QString menuShortcuts();
const QString windowEditorShortcuts();
- const QString shortcuts();
- const QString repo();
- const QString releases();
- const QString gitHubApi();
const QString about();
const QString version(VersionCheck check, QString latestVersion);
- const QString timeUp();
const QString totalCounts(int lines, int words, int characters);
+
+ inline const QString operator%(QString lhs, const char* rhs) { return lhs + QStringLiteral("") + rhs; }
+ inline const QString operator%(QString lhs, QString rhs) { return lhs + QStringLiteral("
") + rhs; }
+ inline const QString operator/(QString lhs, const char* rhs) { return lhs + QStringLiteral("
") + rhs; }
+ inline const QString operator/(QString lhs, QString rhs) { return lhs + QStringLiteral("
") + rhs; }
+ inline const QString multiSpaces(int spaces = 3) { return multiplyThese(" ", spaces); }
+ inline const QString newLines(int lines = 2) { return multiplyThese("\n", lines); }
+ inline const QString tableColumnSpacing(int columns = 9) { return multiplyThese("
\n | ", columns); }
+ inline const QString heading(const char* text) { return QStringLiteral("") + text + QStringLiteral("
"); }
+ inline const QString bold(const char* text) { return QStringLiteral("") + text + QStringLiteral(""); }
+ inline const QString openUdButton() { return pad("Open the user data folder"); }
+ inline const QString shortcuts() { return heading("Shortcuts") % table({ menuShortcuts(), windowEditorShortcuts() }); }
+ inline const QString repo() { return link("https://github.com/fairybow/fernanda"); }
+ inline const QString releases() { return link("https://github.com/fairybow/fernanda/releases"); }
+ inline const QString gitHubApi() { return QStringLiteral("https://api.github.com/repos/fairybow/fernanda/releases"); }
+ inline const QString timeUp() { return QStringLiteral("Time's up!") + multiSpaces(10); }
}
// text.h, Fernanda
diff --git a/fernanda/src/tool.cpp b/fernanda/src/tool.cpp
index 7eee8e0..4b077fb 100644
--- a/fernanda/src/tool.cpp
+++ b/fernanda/src/tool.cpp
@@ -1,3 +1,13 @@
+/*
+* Fernanda is a plain text editor for drafting long-form fiction. (At least, that's the plan.)
+* Copyright(C) 2022 - 2023 @fairybow (https://github.com/fairybow)
+*
+* https://github.com/fairybow/fernanda
+*
+* You should have received a copy of the GNU General Public License
+* along with this program.If not, see .
+*/
+
// tool.cpp, Fernanda
#include "tool.h"
diff --git a/fernanda/src/tool.h b/fernanda/src/tool.h
index 64f8b8e..2a7af72 100644
--- a/fernanda/src/tool.h
+++ b/fernanda/src/tool.h
@@ -1,3 +1,13 @@
+/*
+* Fernanda is a plain text editor for drafting long-form fiction. (At least, that's the plan.)
+* Copyright(C) 2022 - 2023 @fairybow (https://github.com/fairybow)
+*
+* https://github.com/fairybow/fernanda
+*
+* You should have received a copy of the GNU General Public License
+* along with this program.If not, see .
+*/
+
// tool.h, Fernanda
#pragma once
@@ -34,6 +44,7 @@ class Tool : public QPushButton
};
Tool(Type type, QMainWindow* parentWindow = nullptr);
+
void toggle(bool value);
public slots:
diff --git a/fernanda/src/userdata.cpp b/fernanda/src/userdata.cpp
index dc0bf32..4973b32 100644
--- a/fernanda/src/userdata.cpp
+++ b/fernanda/src/userdata.cpp
@@ -1,12 +1,17 @@
+/*
+* Fernanda is a plain text editor for drafting long-form fiction. (At least, that's the plan.)
+* Copyright(C) 2022 - 2023 @fairybow (https://github.com/fairybow)
+*
+* https://github.com/fairybow/fernanda
+*
+* You should have received a copy of the GNU General Public License
+* along with this program.If not, see .
+*/
+
// userdata.cpp, Fernanda
#include "userdata.h"
-void UserData::setName(QString name)
-{
- dataVars.appName = name.toLower();
-}
-
const UserData::StdFs::path UserData::doThis(Operation operation)
{
auto user_data = Path::toStdFs(QDir::homePath()) / Path::toStdFs("." + dataVars.appName);
diff --git a/fernanda/src/userdata.h b/fernanda/src/userdata.h
index f56ef10..5c901c2 100644
--- a/fernanda/src/userdata.h
+++ b/fernanda/src/userdata.h
@@ -1,3 +1,13 @@
+/*
+* Fernanda is a plain text editor for drafting long-form fiction. (At least, that's the plan.)
+* Copyright(C) 2022 - 2023 @fairybow (https://github.com/fairybow)
+*
+* https://github.com/fairybow/fernanda
+*
+* You should have received a copy of the GNU General Public License
+* along with this program.If not, see .
+*/
+
// userdata.h, Fernanda
#pragma once
@@ -85,7 +95,6 @@ namespace UserData
QString appName;
} dataVars;
- void setName(QString name);
const StdFs::path doThis(Operation operation = Operation::Create);
void saveConfig(IniGroup group, IniValue valueType, QVariant value);
QVariant loadConfig(IniGroup group, IniValue valueType, QVariant fallback = QVariant(), UserData::Type type = UserData::Type::QVariant);
@@ -94,6 +103,8 @@ namespace UserData
void clear(StdFs::path dirPath, bool clearSelf = false);
QString timestamp();
std::string dll();
+
+ inline void setName(QString name) { dataVars.appName = name.toLower(); }
}
// userdata.h, Fernanda
diff --git a/fernanda/src/version.h b/fernanda/src/version.h
index 9f052d8..65a218d 100644
--- a/fernanda/src/version.h
+++ b/fernanda/src/version.h
@@ -1,15 +1,25 @@
+/*
+* Fernanda is a plain text editor for drafting long-form fiction. (At least, that's the plan.)
+* Copyright(C) 2022 - 2023 @fairybow (https://github.com/fairybow)
+*
+* https://github.com/fairybow/fernanda
+*
+* You should have received a copy of the GNU General Public License
+* along with this program.If not, see .
+*/
+
// version.h, Fernanda
#pragma once
-#define VER_FILEVERSION 0,16,0,34
-#define VER_FILEVERSION_STR "v0.16.0-beta34"
+#define VER_FILEVERSION 0,16,1,35
+#define VER_FILEVERSION_STR "v0.16.1-beta35"
#define VER_PRODUCTVERSION VER_FILEVERSION
#define VER_PRODUCTVERSION_STR VER_FILEVERSION_STR
#define VER_COMPANYNAME_STR "@fairybow"
#define VER_FILEDESCRIPTION_STR "Fernanda"
#define VER_INTERNALNAME_STR "Fernanda"
-#define VER_LEGALCOPYRIGHT_STR "Copyright \xa9 2022 @fairybow"
+#define VER_LEGALCOPYRIGHT_STR "Copyright \xa9 2023 @fairybow"
#define VER_LEGALTRADEMARKS1_STR "All Rights Reserved"
#define VER_LEGALTRADEMARKS2_STR VER_LEGALTRADEMARKS1_STR
#define VER_ORIGINALFILENAME_STR "fernanda.exe"