diff --git a/CMakeLists.txt b/CMakeLists.txt
index 519b159..20c16b0 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -28,13 +28,13 @@ set(QT_RES
${CMAKE_SOURCE_DIR}/resources/resources.qrc
${CMAKE_SOURCE_DIR}/gui/gui.qrc)
+set(CMAKE_AUTOUIC_SEARCH_PATHS ${CMAKE_SOURCE_DIR}/ui/)
+
# Set Qt source files
set(SRC ${QT_RES}
src/papercards_qml.cpp
- src/Backend.cpp
- src/DocumentHandler.cpp
- src/PdfHandler.cpp
- src/model/Card.cpp)
+ src/mainwindow.cpp
+ src/sidepanel.cpp)
# Copy version to source code
add_definitions(-DMAJOR_VERSION=${PROJECT_VERSION_MAJOR})
diff --git a/Papercards.pro b/Papercards.pro
index 5ae100e..7311e59 100644
--- a/Papercards.pro
+++ b/Papercards.pro
@@ -21,10 +21,14 @@ DEFINES += QT_DEPRECATED_WARNINGS
# You can also select to disable deprecated APIs only up to a certain version of Qt.
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
-SOURCES += src/papercards_qml.cpp src/Backend.cpp src/DocumentHandler.cpp src/model/Card.cpp
-HEADERS += src/Backend.h src/DocumentHandler.h src/model/Card.h
+SOURCES += src/papercards_qml.cpp src/Backend.cpp src/DocumentHandler.cpp src/model/Card.cpp \
+ src/mainwindow.cpp
+HEADERS += src/Backend.h src/DocumentHandler.h src/model/Card.h \
+ src/mainwindow.h \
+ src/material_icons.h
-RESOURCES += resources/resources.qrc gui/gui.qrc
+RESOURCES += resources/resources.qrc gui/gui.qrc \
+ ui/ui.qrc
OTHER_FILES += gui/*.qml gui/components/*.qml
@@ -39,3 +43,6 @@ QML_DESIGNER_IMPORT_PATH =
qnx: target.path = /tmp/$${TARGET}/bin
else: unix:!android: target.path = /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += target
+
+FORMS += \
+ ui/mainwindow.ui
diff --git a/Papercards.pro.qtds b/Papercards.pro.qtds
new file mode 100644
index 0000000..1fa0e54
--- /dev/null
+++ b/Papercards.pro.qtds
@@ -0,0 +1,280 @@
+
+
+
+
+
+ EnvironmentId
+ {81b37160-b93f-423f-8322-a4aeadea61ae}
+
+
+ ProjectExplorer.Project.ActiveTarget
+ 0
+
+
+ ProjectExplorer.Project.EditorSettings
+
+ true
+ false
+ true
+
+ Cpp
+
+ CppGlobal
+
+
+
+ QmlJS
+
+ QmlJSGlobal
+
+
+ 2
+ UTF-8
+ false
+ 4
+ false
+ 80
+ true
+ true
+ 1
+ true
+ false
+ 0
+ true
+ true
+ 0
+ 8
+ true
+ 1
+ true
+ true
+ true
+ *.md, *.MD, Makefile
+ false
+ true
+
+
+
+ ProjectExplorer.Project.PluginSettings
+
+
+
+ ProjectExplorer.Project.Target.0
+
+ Desktop
+ Desktop
+ Desktop
+ {8994bd34-5ed9-4c45-8c0a-94c8f33eca4a}
+ 0
+ 0
+ 0
+
+ true
+ 0
+ /Users/simon/git/Github/build-Papercards-Desktop-Debug
+ /Users/simon/git/Github/build-Papercards-Desktop-Debug
+
+
+ true
+ QtProjectManager.QMakeBuildStep
+
+ false
+
+
+
+ true
+ Qt4ProjectManager.MakeStep
+
+ false
+
+
+ false
+
+ 2
+ Build
+ Build
+ ProjectExplorer.BuildSteps.Build
+
+
+
+ true
+ Qt4ProjectManager.MakeStep
+
+ true
+ clean
+
+ false
+
+ 1
+ Clean
+ Clean
+ ProjectExplorer.BuildSteps.Clean
+
+ 2
+ false
+
+
+ Debug
+ Qt4ProjectManager.Qt4BuildConfiguration
+ 2
+ 2
+ 2
+
+
+ true
+ 2
+ /Users/simon/git/Github/build-Papercards-Desktop-Release
+ /Users/simon/git/Github/build-Papercards-Desktop-Release
+
+
+ true
+ QtProjectManager.QMakeBuildStep
+
+ false
+
+
+
+ true
+ Qt4ProjectManager.MakeStep
+
+ false
+
+
+ false
+
+ 2
+ Build
+ Build
+ ProjectExplorer.BuildSteps.Build
+
+
+
+ true
+ Qt4ProjectManager.MakeStep
+
+ true
+ clean
+
+ false
+
+ 1
+ Clean
+ Clean
+ ProjectExplorer.BuildSteps.Clean
+
+ 2
+ false
+
+
+ Release
+ Qt4ProjectManager.Qt4BuildConfiguration
+ 0
+ 0
+ 2
+
+
+ true
+ 0
+ /Users/simon/git/Github/build-Papercards-Desktop-Profile
+ /Users/simon/git/Github/build-Papercards-Desktop-Profile
+
+
+ true
+ QtProjectManager.QMakeBuildStep
+
+ false
+
+
+
+ true
+ Qt4ProjectManager.MakeStep
+
+ false
+
+
+ false
+
+ 2
+ Build
+ Build
+ ProjectExplorer.BuildSteps.Build
+
+
+
+ true
+ Qt4ProjectManager.MakeStep
+
+ true
+ clean
+
+ false
+
+ 1
+ Clean
+ Clean
+ ProjectExplorer.BuildSteps.Clean
+
+ 2
+ false
+
+
+ Profile
+ Qt4ProjectManager.Qt4BuildConfiguration
+ 0
+ 0
+ 0
+
+ 3
+
+
+ 0
+ Deploy
+ Deploy
+ ProjectExplorer.BuildSteps.Deploy
+
+ 1
+
+ false
+ ProjectExplorer.DefaultDeployConfiguration
+
+ 1
+
+
+ false
+ false
+ 1000
+
+ true
+
+ 2
+
+
+ ProjectExplorer.CustomExecutableRunConfiguration
+
+
+ false
+
+ false
+ true
+ false
+ false
+ true
+
+
+
+ 1
+
+
+
+ ProjectExplorer.Project.TargetCount
+ 1
+
+
+ ProjectExplorer.Project.Updater.FileVersion
+ 22
+
+
+ Version
+ 22
+
+
diff --git a/frameworks/MacOSXBundleInfo.plist.in b/frameworks/MacOSXBundleInfo.plist.in
index ac73fe2..e06e193 100644
--- a/frameworks/MacOSXBundleInfo.plist.in
+++ b/frameworks/MacOSXBundleInfo.plist.in
@@ -34,5 +34,7 @@
NSApplication
NSSupportsAutomaticGraphicsSwitching
+ NSHighResolutionCapable
+
\ No newline at end of file
diff --git a/gui/Test.qml b/gui/Test.qml
new file mode 100644
index 0000000..339327c
--- /dev/null
+++ b/gui/Test.qml
@@ -0,0 +1,38 @@
+import QtQuick 2.12
+import QtQuick.Layouts 1.12
+import QtQuick.Controls 2.12
+
+ApplicationWindow {
+
+ id: root
+ visible: true
+ title: "Papercards"
+ width: 800
+ height: 600
+
+ ToolBar {
+ id: toolBar
+ height: 40
+ position: ToolBar.Header
+ anchors.right: parent.right
+ anchors.rightMargin: 0
+ anchors.left: parent.left
+ anchors.leftMargin: 0
+ anchors.top: parent.top
+ anchors.topMargin: 0
+ }
+
+ Switch {
+ id: element
+ x: 228
+ y: 310
+ text: qsTr("Test")
+ }
+
+}
+
+/*##^##
+Designer {
+ D{i:1;anchors_width:800;anchors_x:-6;anchors_y:0}
+}
+##^##*/
diff --git a/gui/gui.qrc b/gui/gui.qrc
index 6c84c50..ed3c7b9 100644
--- a/gui/gui.qrc
+++ b/gui/gui.qrc
@@ -16,6 +16,7 @@
components/DefaultMenuBar.qml
components/NativeMenuBar.qml
DialogConfirmDiscard.qml
+ Test.qml
qtquickcontrols2.conf
diff --git a/gui/main.qml b/gui/main.qml
index c699dfc..e9d3c2c 100644
--- a/gui/main.qml
+++ b/gui/main.qml
@@ -8,6 +8,7 @@ import io.papercards.backend 1.0
import "components" as Components
ApplicationWindow {
+// flags: Qt.FramelessWindowHint
property real scaleFactor: statusBar.scaleFactor
property var targetFunction
property bool discard: false
diff --git a/gui/qtquickcontrols2.conf b/gui/qtquickcontrols2.conf
index 35507d2..5924471 100644
--- a/gui/qtquickcontrols2.conf
+++ b/gui/qtquickcontrols2.conf
@@ -1,5 +1,4 @@
[Controls]
-Style=Material
[Material]
Theme=Dark
diff --git a/resources/MaterialIcons-Regular.ttf b/resources/MaterialIcons-Regular.ttf
deleted file mode 100644
index 377d924..0000000
Binary files a/resources/MaterialIcons-Regular.ttf and /dev/null differ
diff --git a/resources/PapercardsIcons.ttf b/resources/PapercardsIcons.ttf
deleted file mode 100644
index 2fbb085..0000000
Binary files a/resources/PapercardsIcons.ttf and /dev/null differ
diff --git a/resources/WorkSans-Light.ttf b/resources/WorkSans-Light.ttf
deleted file mode 100644
index 8b03227..0000000
Binary files a/resources/WorkSans-Light.ttf and /dev/null differ
diff --git a/resources/WorkSans-Regular.ttf b/resources/WorkSans-Regular.ttf
deleted file mode 100644
index ba11a2d..0000000
Binary files a/resources/WorkSans-Regular.ttf and /dev/null differ
diff --git a/resources/feather.ttf b/resources/feather.ttf
new file mode 100644
index 0000000..0b33dac
Binary files /dev/null and b/resources/feather.ttf differ
diff --git a/resources/logo.png b/resources/logo.png
index d49f59a..22baf9c 100644
Binary files a/resources/logo.png and b/resources/logo.png differ
diff --git a/resources/logo.psd b/resources/logo.psd
new file mode 100644
index 0000000..a11aade
Binary files /dev/null and b/resources/logo.psd differ
diff --git a/resources/logo_old.png b/resources/logo_old.png
new file mode 100644
index 0000000..d49f59a
Binary files /dev/null and b/resources/logo_old.png differ
diff --git a/resources/resources.qrc b/resources/resources.qrc
index 6531bdd..6522cae 100644
--- a/resources/resources.qrc
+++ b/resources/resources.qrc
@@ -1,21 +1,7 @@
- WorkSans-Light.ttf
- WorkSans-Regular.ttf
- MaterialIcons-Regular.ttf
default_deck.json
logo.png
- roboto/Roboto-Black.ttf
- roboto/Roboto-BlackItalic.ttf
- roboto/Roboto-Bold.ttf
- roboto/Roboto-BoldItalic.ttf
- roboto/Roboto-Italic.ttf
- roboto/Roboto-Light.ttf
- roboto/Roboto-LightItalic.ttf
- roboto/Roboto-Medium.ttf
- roboto/Roboto-MediumItalic.ttf
- roboto/Roboto-Regular.ttf
- roboto/Roboto-Thin.ttf
- roboto/Roboto-ThinItalic.ttf
+ feather.ttf
diff --git a/resources/roboto/Roboto-Black.ttf b/resources/roboto/Roboto-Black.ttf
deleted file mode 100644
index 2d45238..0000000
Binary files a/resources/roboto/Roboto-Black.ttf and /dev/null differ
diff --git a/resources/roboto/Roboto-BlackItalic.ttf b/resources/roboto/Roboto-BlackItalic.ttf
deleted file mode 100644
index 29a4359..0000000
Binary files a/resources/roboto/Roboto-BlackItalic.ttf and /dev/null differ
diff --git a/resources/roboto/Roboto-Bold.ttf b/resources/roboto/Roboto-Bold.ttf
deleted file mode 100644
index d998cf5..0000000
Binary files a/resources/roboto/Roboto-Bold.ttf and /dev/null differ
diff --git a/resources/roboto/Roboto-BoldItalic.ttf b/resources/roboto/Roboto-BoldItalic.ttf
deleted file mode 100644
index b4e2210..0000000
Binary files a/resources/roboto/Roboto-BoldItalic.ttf and /dev/null differ
diff --git a/resources/roboto/Roboto-Italic.ttf b/resources/roboto/Roboto-Italic.ttf
deleted file mode 100644
index 5b390ff..0000000
Binary files a/resources/roboto/Roboto-Italic.ttf and /dev/null differ
diff --git a/resources/roboto/Roboto-Light.ttf b/resources/roboto/Roboto-Light.ttf
deleted file mode 100644
index 3526798..0000000
Binary files a/resources/roboto/Roboto-Light.ttf and /dev/null differ
diff --git a/resources/roboto/Roboto-LightItalic.ttf b/resources/roboto/Roboto-LightItalic.ttf
deleted file mode 100644
index 46e9bf7..0000000
Binary files a/resources/roboto/Roboto-LightItalic.ttf and /dev/null differ
diff --git a/resources/roboto/Roboto-Medium.ttf b/resources/roboto/Roboto-Medium.ttf
deleted file mode 100644
index f714a51..0000000
Binary files a/resources/roboto/Roboto-Medium.ttf and /dev/null differ
diff --git a/resources/roboto/Roboto-MediumItalic.ttf b/resources/roboto/Roboto-MediumItalic.ttf
deleted file mode 100644
index 5dc6a2d..0000000
Binary files a/resources/roboto/Roboto-MediumItalic.ttf and /dev/null differ
diff --git a/resources/roboto/Roboto-Regular.ttf b/resources/roboto/Roboto-Regular.ttf
deleted file mode 100644
index 2b6392f..0000000
Binary files a/resources/roboto/Roboto-Regular.ttf and /dev/null differ
diff --git a/resources/roboto/Roboto-Thin.ttf b/resources/roboto/Roboto-Thin.ttf
deleted file mode 100644
index 4e797cf..0000000
Binary files a/resources/roboto/Roboto-Thin.ttf and /dev/null differ
diff --git a/resources/roboto/Roboto-ThinItalic.ttf b/resources/roboto/Roboto-ThinItalic.ttf
deleted file mode 100644
index eea836f..0000000
Binary files a/resources/roboto/Roboto-ThinItalic.ttf and /dev/null differ
diff --git a/resources/underline-solid.svg b/resources/underline-solid.svg
new file mode 100755
index 0000000..6f3cc98
--- /dev/null
+++ b/resources/underline-solid.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/src/MainWindow.cpp b/src/MainWindow.cpp
new file mode 100644
index 0000000..0019809
--- /dev/null
+++ b/src/MainWindow.cpp
@@ -0,0 +1,13 @@
+#include "MainWindow.h"
+#include "ui_mainwindow.h"
+
+#include
+
+MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::mainWindow) {
+ ui->setupUi(this);
+ setUnifiedTitleAndToolBarOnMac(true);
+}
+
+MainWindow::~MainWindow() {
+ delete ui;
+}
diff --git a/src/MainWindow.h b/src/MainWindow.h
new file mode 100644
index 0000000..e579c91
--- /dev/null
+++ b/src/MainWindow.h
@@ -0,0 +1,20 @@
+#ifndef MAIN_WINDOW_H
+#define MAIN_WINDOW_H
+
+#include
+
+namespace Ui {
+ class mainWindow;
+}
+
+class MainWindow : public QMainWindow {
+ Q_OBJECT
+private:
+ Ui::mainWindow *ui;
+
+public:
+ explicit MainWindow(QWidget *parent = nullptr);
+ ~MainWindow() override;
+};
+
+#endif // MAIN_WINDOW_H
diff --git a/src/SidePanel.cpp b/src/SidePanel.cpp
new file mode 100644
index 0000000..98d19db
--- /dev/null
+++ b/src/SidePanel.cpp
@@ -0,0 +1,12 @@
+#include "SidePanel.h"
+#include "ui_sidepanel.h"
+
+#include
+
+SidePanel::SidePanel(QWidget *parent) : QWidget(parent), ui(new Ui::sidePanel) {
+ ui->setupUi(this);
+}
+
+SidePanel::~SidePanel() {
+ delete ui;
+}
diff --git a/src/SidePanel.h b/src/SidePanel.h
new file mode 100644
index 0000000..c4fec65
--- /dev/null
+++ b/src/SidePanel.h
@@ -0,0 +1,20 @@
+#ifndef SIDE_PANEL_H
+#define SIDE_PANEL_H
+
+#include "QWidget"
+
+namespace Ui {
+class sidePanel;
+}
+
+class SidePanel : public QWidget {
+ Q_OBJECT
+ private:
+ Ui::sidePanel *ui;
+
+ public:
+ explicit SidePanel(QWidget *parent = nullptr);
+ ~SidePanel() override;
+};
+
+#endif //SIDE_PANEL_H
diff --git a/src/Backend.cpp b/src/old/Backend.cpp
similarity index 99%
rename from src/Backend.cpp
rename to src/old/Backend.cpp
index 9e8e932..bdfbe49 100644
--- a/src/Backend.cpp
+++ b/src/old/Backend.cpp
@@ -268,7 +268,7 @@ void BackEnd::exportAsPdf(const QUrl &fileUrl) {
QPdfWriter writer(filePath);
writer.setCreator("Simon Schäfer");
writer.setPdfVersion(QPagedPaintDevice::PdfVersion_A1b);
- writer.setResolution(130);
+ writer.setResolution(600);
writer.setTitle("Tests Deck");
QPageSize page_size = QPageSize(QPageSize::A6);
@@ -280,6 +280,7 @@ void BackEnd::exportAsPdf(const QUrl &fileUrl) {
QPainter painter;
painter.begin(&writer);
+ painter.scale(10,10);
for (Card *card : this->cards_) {
writer.newPage();
QTextDocument print_document;
diff --git a/src/Backend.h b/src/old/Backend.h
similarity index 100%
rename from src/Backend.h
rename to src/old/Backend.h
diff --git a/src/CMakeLists.txt b/src/old/CMakeLists.txt
similarity index 100%
rename from src/CMakeLists.txt
rename to src/old/CMakeLists.txt
diff --git a/src/DocumentHandler.cpp b/src/old/DocumentHandler.cpp
similarity index 100%
rename from src/DocumentHandler.cpp
rename to src/old/DocumentHandler.cpp
diff --git a/src/DocumentHandler.h b/src/old/DocumentHandler.h
similarity index 100%
rename from src/DocumentHandler.h
rename to src/old/DocumentHandler.h
diff --git a/src/PdfHandler.cpp b/src/old/PdfHandler.cpp
similarity index 100%
rename from src/PdfHandler.cpp
rename to src/old/PdfHandler.cpp
diff --git a/src/PdfHandler.h b/src/old/PdfHandler.h
similarity index 99%
rename from src/PdfHandler.h
rename to src/old/PdfHandler.h
index ff2c67a..894f2ce 100644
--- a/src/PdfHandler.h
+++ b/src/old/PdfHandler.h
@@ -5,6 +5,7 @@
class PdfHandler : public QObject {
+
};
#endif //PDF_HANDLER_H
diff --git a/src/old/QFontIcon.cpp b/src/old/QFontIcon.cpp
new file mode 100644
index 0000000..c9de9c7
--- /dev/null
+++ b/src/old/QFontIcon.cpp
@@ -0,0 +1,176 @@
+/*
+MIT License
+
+Copyright (c) 2017 Sacha Schutz
+
+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.
+*/
+
+#include "QFontIcon.h"
+#include
+#include
+QFontIcon * QFontIcon::mInstance = Q_NULLPTR;
+
+bool QFontIcon::addFont(const QString &filename)
+{
+ int id = QFontDatabase::addApplicationFont(filename);
+
+ if (id == -1){
+ qWarning()<<"Cannot load font";
+ return false;
+ }
+
+ QString family = QFontDatabase::applicationFontFamilies(id).first();
+ instance()->addFamily(family);
+ return true;
+}
+
+QFontIcon *QFontIcon::instance()
+{
+ if (!mInstance)
+ mInstance = new QFontIcon;
+
+ return mInstance;
+}
+
+QIcon QFontIcon::icon(const QString &code, const QColor &baseColor, const QString &family)
+{
+ if (instance()->families().isEmpty())
+ {
+ qWarning()<families().first();
+
+
+ QFontIconEngine * engine = new QFontIconEngine;
+ engine->setFontFamily(useFamily);
+ engine->setLetter(code);
+ engine->setBaseColor(baseColor);
+ return QIcon(engine);
+
+
+}
+
+
+const QStringList &QFontIcon::families() const
+{
+ return mfamilies;
+}
+
+void QFontIcon::addFamily(const QString &family)
+{
+ mfamilies.append(family);
+}
+
+QFontIcon::QFontIcon(QObject *parent)
+ :QObject(parent)
+{
+
+}
+
+QFontIcon::~QFontIcon()
+{
+
+}
+
+//=======================================================================================================
+
+
+QFontIconEngine::QFontIconEngine()
+ :QIconEngine()
+{
+
+}
+
+QFontIconEngine::~QFontIconEngine()
+{
+}
+
+void QFontIconEngine::paint(QPainter *painter, const QRect &rect, QIcon::Mode mode, QIcon::State state)
+{
+ Q_UNUSED(state);
+ QFont font = QFont(mFontFamily);
+ int drawSize = qRound(rect.height() * 0.8);
+ font.setPixelSize(28);
+ qDebug() << rect.height();
+ font.setStyleStrategy(QFont::PreferAntialias);
+
+ QColor penColor;
+ if (!mBaseColor.isValid())
+ penColor = QApplication::palette("QWidget").color(QPalette::Normal,QPalette::ButtonText);
+ else
+ penColor = mBaseColor;
+
+ if (mode == QIcon::Disabled)
+ penColor = QApplication::palette("QWidget").color(QPalette::Disabled,QPalette::ButtonText);
+
+
+ if (mode == QIcon::Selected)
+ penColor = QApplication::palette("QWidget").color(QPalette::Active,QPalette::ButtonText);
+
+ painter->save();
+ painter->setRenderHint(QPainter::Antialiasing);
+ painter->setRenderHint(QPainter::SmoothPixmapTransform);
+ painter->setRenderHint(QPainter::HighQualityAntialiasing);
+ painter->setRenderHint(QPainter::TextAntialiasing);
+ painter->setPen(QPen(penColor));
+ painter->setFont(font);
+ painter->drawText(rect, Qt::AlignCenter|Qt::AlignVCenter, mLetter);
+
+ painter->restore();
+}
+
+QPixmap QFontIconEngine::pixmap(const QSize &size, QIcon::Mode mode, QIcon::State state)
+{
+ QPixmap pix(size);
+ pix.fill(Qt::transparent);
+
+ QPainter painter(&pix);
+ paint(&painter, QRect(QPoint(0,0),size), mode, state);
+ return pix;
+
+}
+
+void QFontIconEngine::setFontFamily(const QString &family)
+{
+ mFontFamily = family;
+}
+
+void QFontIconEngine::setLetter(const QString &letter)
+{
+ mLetter = letter;
+}
+
+void QFontIconEngine::setBaseColor(const QColor &baseColor)
+{
+ mBaseColor = baseColor;
+}
+
+
+QIconEngine *QFontIconEngine::clone() const
+{
+ QFontIconEngine * engine = new QFontIconEngine;
+ engine->setFontFamily(mFontFamily);
+ engine->setBaseColor(mBaseColor);
+ return engine;
+}
diff --git a/src/old/QFontIcon.h b/src/old/QFontIcon.h
new file mode 100644
index 0000000..2eccd40
--- /dev/null
+++ b/src/old/QFontIcon.h
@@ -0,0 +1,85 @@
+/*
+MIT License
+
+Copyright (c) 2017 Sacha Schutz
+
+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.
+*/
+
+#ifndef Q_FONT_ICON_H
+#define Q_FONT_ICON_H
+
+#include
+#include
+#include
+#include
+#include
+#include
+
+class QFontIcon;
+class QFontIconEngine;
+#define FIcon(code) QFontIcon::icon(code)
+
+class QFontIconEngine : public QIconEngine
+{
+ public:
+ QFontIconEngine();
+ ~QFontIconEngine();
+ virtual void paint(QPainter * painter, const QRect& rect, QIcon::Mode mode, QIcon::State state)Q_DECL_OVERRIDE ;
+ virtual QPixmap pixmap(const QSize &size, QIcon::Mode mode, QIcon::State state)Q_DECL_OVERRIDE;
+ void setFontFamily(const QString& family);
+ // define icon code using QChar or implicit using ushort ...
+ void setLetter(const QString& letter);
+ // You can set a base color. I don't advice. Keep system color
+ void setBaseColor(const QColor& baseColor);
+ virtual QIconEngine* clone() const;
+
+ private:
+ QString mFontFamily;
+ QString mLetter;
+ QColor mBaseColor;
+};
+
+class QFontIcon : public QObject
+{
+ Q_OBJECT
+
+ public:
+ // add Font. By default, the first one is used
+ static bool addFont(const QString& filename);
+ static QFontIcon * instance();
+ // main methods. Return icons from code
+ static QIcon icon(const QString& code, const QColor& baseColor = QColor(),const QString& family = QString());
+ // return added fonts
+ const QStringList& families() const;
+
+ protected:
+ void addFamily(const QString& family);
+
+
+ private:
+ explicit QFontIcon(QObject *parent = 0);
+ ~QFontIcon();
+ static QFontIcon * mInstance;
+ QStringList mfamilies;
+
+
+};
+
+#endif //Q_FONT_ICON_H
diff --git a/src/old/material_icons.h b/src/old/material_icons.h
new file mode 100644
index 0000000..e855a5a
--- /dev/null
+++ b/src/old/material_icons.h
@@ -0,0 +1,963 @@
+#ifndef MATERIAL_ICONS_H
+#define MATERIAL_ICONS_H
+
+#include
+#include