diff --git a/accommodation/accommodation.cpp b/accommodation/accommodation.cpp
index f8d8795..f01ad27 100644
--- a/accommodation/accommodation.cpp
+++ b/accommodation/accommodation.cpp
@@ -23,7 +23,7 @@ void Accommodation::initServiceUi()
m_service = service;
m_ui = grid;
}
-
+/*
QWidget *Accommodation::ui()
{
QWidget *ui = IPlugin::ui();
@@ -33,3 +33,4 @@ QWidget *Accommodation::ui()
return ui;
}
+*/
diff --git a/accommodation/accommodation.h b/accommodation/accommodation.h
index 9dbf7ff..7416dda 100644
--- a/accommodation/accommodation.h
+++ b/accommodation/accommodation.h
@@ -26,7 +26,7 @@ protected:
// IPlugin interface
public:
- QWidget *ui();
+ //QWidget *ui();
};
#endif // ACCOMMODATION_H
diff --git a/accommodation/accommodation.pro b/accommodation/accommodation.pro
index f90f628..edfc4da 100644
--- a/accommodation/accommodation.pro
+++ b/accommodation/accommodation.pro
@@ -9,7 +9,8 @@ QT += widgets sql
TARGET = accommodation
TEMPLATE = lib
-DEFINES += ACCOMMODATION_LIBRARY
+DEFINES += ACCOMMODATION_LIBRARY\
+ _GLIBCXX_USE_CXX11_ABI=0
SOURCES += accommodation.cpp \
data/person.cpp \
diff --git a/application/application.pro b/application/application.pro
index 5333ecb..2205f9a 100644
--- a/application/application.pro
+++ b/application/application.pro
@@ -11,6 +11,8 @@ greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
TARGET = prodejna
TEMPLATE = app
+DEFINES += _GLIBCXX_USE_CXX11_ABI=0
+
win32 {
INCLUDEPATH += d:/prac/odb/libodb-2.4.0
INCLUDEPATH += d:/prac/odb/libodb-qt-2.4.0
diff --git a/application/mainwindow.ui b/application/mainwindow.ui
index 644d849..d408b6b 100644
--- a/application/mainwindow.ui
+++ b/application/mainwindow.ui
@@ -6,8 +6,8 @@
0
0
- 825
- 538
+ 1000
+ 700
@@ -43,8 +43,8 @@
0
0
- 825
- 21
+ 1000
+ 19
-
@@ -36,6 +68,19 @@
D
+
+
+ :/icons/remove.svg:/icons/remove.svg
+
+
+
+ 24
+ 24
+
+
+
+ true
+
-
@@ -43,6 +88,22 @@
F
+
+
+ :/icons/filter.svg:/icons/filter.svg
+
+
+
+ 24
+ 24
+
+
+
+ true
+
+
+ true
+
-
@@ -50,6 +111,19 @@
P
+
+
+ :/icons/print.svg:/icons/print.svg
+
+
+
+ 24
+ 24
+
+
+
+ true
+
-
@@ -68,6 +142,17 @@
+ -
+
+
+
+ 16777215
+ 150
+
+
+
+
+
-
@@ -91,6 +176,8 @@
-
+
+
+
diff --git a/core/icons/delete.svg b/core/icons/delete.svg
new file mode 100644
index 0000000..2833017
--- /dev/null
+++ b/core/icons/delete.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/core/icons/edit.svg b/core/icons/edit.svg
new file mode 100644
index 0000000..14734eb
--- /dev/null
+++ b/core/icons/edit.svg
@@ -0,0 +1,13 @@
+
\ No newline at end of file
diff --git a/core/icons/filter.svg b/core/icons/filter.svg
new file mode 100644
index 0000000..6b38d75
--- /dev/null
+++ b/core/icons/filter.svg
@@ -0,0 +1,6 @@
+
\ No newline at end of file
diff --git a/core/icons/new.svg b/core/icons/new.svg
new file mode 100644
index 0000000..e707c9d
--- /dev/null
+++ b/core/icons/new.svg
@@ -0,0 +1,6 @@
+
\ No newline at end of file
diff --git a/core/icons/print.svg b/core/icons/print.svg
new file mode 100644
index 0000000..aec7314
--- /dev/null
+++ b/core/icons/print.svg
@@ -0,0 +1,10 @@
+
\ No newline at end of file
diff --git a/core/icons/remove.svg b/core/icons/remove.svg
new file mode 100644
index 0000000..83c43c2
--- /dev/null
+++ b/core/icons/remove.svg
@@ -0,0 +1,6 @@
+
\ No newline at end of file
diff --git a/core/igridform.cpp b/core/igridform.cpp
index 3f2634a..b784401 100644
--- a/core/igridform.cpp
+++ b/core/igridform.cpp
@@ -4,12 +4,14 @@
#include
#include "context.h"
+#include "filterui.h"
IGridForm::IGridForm(QWidget *parent) :
QWidget(parent),
ui(new Ui::GridForm)
{
ui->setupUi(this);
+ ui->filterWidget->setVisible(false);
m_contextMenu = new QMenu(this);
m_contextMenu->addAction(ui->actionSelectColumns);
@@ -43,6 +45,11 @@ void IGridForm::hideColumns(const QList &cols)
}
}
+QWidget *IGridForm::filterWidget()
+{
+ return ui->filterWidget;
+}
+
void IGridForm::on_btnNew_clicked()
{
@@ -88,3 +95,16 @@ void IGridForm::columnsAccepted()
Context::instance().settings()->setValue("grids/" + pluginId() + "/hide", QVariant::fromValue(varList));
}
+
+
+void IGridForm::on_btnFilter_toggled(bool checked)
+{
+ if (checked)
+ {
+ ui->filterWidget->setVisible(true);
+ }
+ else
+ {
+ ui->filterWidget->setVisible(false);
+ }
+}
diff --git a/core/igridform.h b/core/igridform.h
index 7c676a9..499dc6a 100644
--- a/core/igridform.h
+++ b/core/igridform.h
@@ -8,6 +8,7 @@
#include
#include "columndialog.h"
+#include "filterui.h"
#include "defaultformhandler.h"
#include "core_global.h"
@@ -37,8 +38,8 @@ protected:
virtual void handleNewRecord() = 0;
virtual void handleEditRecord() = 0;
virtual void handleDeleteRecord() = 0;
-
void hideColumns(const QList &cols);
+ QWidget *filterWidget();
private slots:
void on_btnNew_clicked();
@@ -48,12 +49,17 @@ private slots:
void on_actionSelectColumns_triggered();
void columnsAccepted();
+ void on_btnFilter_toggled(bool checked);
+
private:
QString m_pluginId;
IFormHandler *m_formHandler;
Ui::GridForm *ui;
QMenu *m_contextMenu;
ColumnDialog *m_columnDialog;
+
+protected:
+ FilterUi *m_filterUi;
};
#endif // IGRIDFORM_H
diff --git a/core/rc.qrc b/core/rc.qrc
index 3bb3eff..ab51ecb 100644
--- a/core/rc.qrc
+++ b/core/rc.qrc
@@ -3,5 +3,11 @@
metaData.json
users/metaData.json
roles/metaData.json
+ icons/new.svg
+ icons/edit.svg
+ icons/delete.svg
+ icons/remove.svg
+ icons/filter.svg
+ icons/print.svg