diff --git a/accommodation/accommodation.cpp b/accommodation/accommodation.cpp
index f01ad27..87f8ff4 100644
--- a/accommodation/accommodation.cpp
+++ b/accommodation/accommodation.cpp
@@ -23,6 +23,11 @@ void Accommodation::initServiceUi()
m_service = service;
m_ui = grid;
}
+
+QIcon Accommodation::pluginIcon()
+{
+ return QIcon(":/icons/accPlugin.svg");
+}
/*
QWidget *Accommodation::ui()
{
diff --git a/accommodation/accommodation.h b/accommodation/accommodation.h
index 7416dda..505f642 100644
--- a/accommodation/accommodation.h
+++ b/accommodation/accommodation.h
@@ -27,6 +27,11 @@ protected:
// IPlugin interface
public:
//QWidget *ui();
+
+ // IPlugin interface
+public:
+ virtual QIcon pluginIcon();
+
};
#endif // ACCOMMODATION_H
diff --git a/accommodation/accommodation.pro b/accommodation/accommodation.pro
index 3ea824e..5d311ef 100644
--- a/accommodation/accommodation.pro
+++ b/accommodation/accommodation.pro
@@ -67,3 +67,6 @@ else:unix: LIBS += -L$$OUT_PWD/../qdecimal/lib/ -lqdecimal -ldecnumber
INCLUDEPATH += $$PWD/../qdecimal/src
INCLUDEPATH += $$PWD/../qdecimal/decnumber
+RESOURCES += \
+ accrc.qrc
+
diff --git a/accommodation/accrc.qrc b/accommodation/accrc.qrc
new file mode 100644
index 0000000..4ac8ed9
--- /dev/null
+++ b/accommodation/accrc.qrc
@@ -0,0 +1,5 @@
+
+
+ icons/accPlugin.svg
+
+
diff --git a/accommodation/icons/accPlugin.svg b/accommodation/icons/accPlugin.svg
new file mode 100644
index 0000000..88f894a
--- /dev/null
+++ b/accommodation/icons/accPlugin.svg
@@ -0,0 +1,7 @@
+
\ No newline at end of file
diff --git a/addressbook/addressbook.cpp b/addressbook/addressbook.cpp
index 6d7ebe2..552ee2d 100644
--- a/addressbook/addressbook.cpp
+++ b/addressbook/addressbook.cpp
@@ -18,6 +18,11 @@ void Addressbook::initServiceUi()
((AddressbookGrid *) m_ui)->setForm(form);
}
+QIcon Addressbook::pluginIcon()
+{
+ return QIcon(":/icons/addressbookPlugin.svg");
+}
+
diff --git a/addressbook/addressbook.h b/addressbook/addressbook.h
index c5e8916..b07b982 100644
--- a/addressbook/addressbook.h
+++ b/addressbook/addressbook.h
@@ -23,6 +23,11 @@ protected:
+
+ // IPlugin interface
+public:
+ virtual QIcon pluginIcon();
+
};
#endif // ADDRESSBOOK_H
diff --git a/addressbook/addressbook.pro b/addressbook/addressbook.pro
index 7e00357..a901d68 100644
--- a/addressbook/addressbook.pro
+++ b/addressbook/addressbook.pro
@@ -64,3 +64,6 @@ OTHER_FILES += \
FORMS += \
addressbookform.ui
+
+RESOURCES += \
+ addressbookrc.qrc
diff --git a/addressbook/addressbookform.h b/addressbook/addressbookform.h
index 4c1a377..7888b7d 100644
--- a/addressbook/addressbookform.h
+++ b/addressbook/addressbookform.h
@@ -2,8 +2,7 @@
#define ADDRESSBOOKFORM_H
#include
-#include
-#include "autoform.h"
+#include
#include "data/addressbookdata.h"
#include "addressbook-odb.hxx"
diff --git a/addressbook/addressbookrc.qrc b/addressbook/addressbookrc.qrc
new file mode 100644
index 0000000..f9a5431
--- /dev/null
+++ b/addressbook/addressbookrc.qrc
@@ -0,0 +1,5 @@
+
+
+ icons/addressbookPlugin.svg
+
+
diff --git a/addressbook/data/addressbookdata.h b/addressbook/data/addressbookdata.h
index 07fba57..cc0f2b8 100644
--- a/addressbook/data/addressbookdata.h
+++ b/addressbook/data/addressbookdata.h
@@ -4,7 +4,7 @@
#include
#include
#include
-#include "odb/core.hxx"
+#include
#pragma db object
class AddressbookData : public QObject
@@ -58,7 +58,7 @@ public:
private:
friend class odb::access;
-#pragma db id auto
+ #pragma db id auto
int m_id;
QString m_title;
QString m_firstName;
diff --git a/addressbook/icons/addressbookPlugin.svg b/addressbook/icons/addressbookPlugin.svg
new file mode 100644
index 0000000..8f2b8d2
--- /dev/null
+++ b/addressbook/icons/addressbookPlugin.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/application/appRc.qrc b/application/appRc.qrc
index dda944f..a37b608 100644
--- a/application/appRc.qrc
+++ b/application/appRc.qrc
@@ -3,5 +3,6 @@
icons/login_32.png
icons/login_64.png
style.css
+ icons/settings.svg
diff --git a/application/icons/settings.svg b/application/icons/settings.svg
new file mode 100644
index 0000000..b47999d
--- /dev/null
+++ b/application/icons/settings.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/application/mainwindow.cpp b/application/mainwindow.cpp
index d8134fd..77e7e89 100644
--- a/application/mainwindow.cpp
+++ b/application/mainwindow.cpp
@@ -4,6 +4,7 @@
#include
#include
+#include
#include
#include
#include
@@ -41,8 +42,12 @@ MainWindow::MainWindow(QWidget *parent) :
int i = 0;
foreach (IPlugin *plugin, Context::instance().plugins()) {
- QPushButton *plugButton = new QPushButton(this);
+ QToolButton *plugButton = new QToolButton(this);
plugButton->setText(plugin->pluginName());
+ plugButton->setIcon(plugin->pluginIcon());
+ plugButton->setIconSize(QSize(32, 32));
+ plugButton->setAutoRaise(true);
+ plugButton->setToolButtonStyle(Qt::ToolButtonTextUnderIcon);
ui->navigation->layout()->addWidget(plugButton);
plugButton->setProperty(PLUGIN_INDEX, i);
i++;
@@ -80,7 +85,7 @@ void MainWindow::openPlugin()
}
}
- ui->tabWidget->addTab(plugin->ui(), QIcon(), plugin->pluginName());
+ ui->tabWidget->addTab(plugin->ui(), plugin->pluginIcon(), plugin->pluginName());
ui->tabWidget->widget(ui->tabWidget->count() - 1)->setObjectName(plugin->pluginId());
ui->tabWidget->setCurrentIndex(ui->tabWidget->count() - 1);
}
diff --git a/application/mainwindow.ui b/application/mainwindow.ui
index f8efb33..4a52742 100644
--- a/application/mainwindow.ui
+++ b/application/mainwindow.ui
@@ -56,7 +56,7 @@
0
0
1000
- 19
+ 21