- Users table model renamed to UsersTableModel- causes linker conflict

with class TableModel in accomodation plugin.
- Edit record dialog is now screen centered.
- Plugin tabs in application main window are now closable.
This commit is contained in:
2015-11-24 15:09:50 +01:00
parent a6d795ec87
commit 989c8fdac3
8 changed files with 24 additions and 6 deletions
+5
View File
@@ -1,5 +1,9 @@
#include "defaultformhandler.h"
#include <QApplication>
#include <QDesktopWidget>
#include <QRect>
DefaultFormHandler::DefaultFormHandler()
{
m_dialog = new FormDialog();
@@ -14,6 +18,7 @@ void DefaultFormHandler::showForm(IForm *formWidget)
{
m_dialog->setForm(formWidget);
m_dialog->setModal(true);
m_dialog->move(QApplication::desktop()->screen()->rect().center() - m_dialog->rect().center());
m_dialog->show();
}
+4 -1
View File
@@ -2,6 +2,9 @@
<ui version="4.0">
<class>FormDialog</class>
<widget class="QDialog" name="FormDialog">
<property name="windowModality">
<enum>Qt::ApplicationModal</enum>
</property>
<property name="geometry">
<rect>
<x>0</x>
@@ -11,7 +14,7 @@
</rect>
</property>
<property name="windowTitle">
<string>Dialog</string>
<string>Edit record</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<property name="leftMargin">
+1 -1
View File
@@ -1,6 +1,6 @@
#include "tablemodel.h"
TableModel::TableModel(QObject *parent) :AutoTableModel<User>(parent)
UsersTableModel::UsersTableModel(QObject *parent) :AutoTableModel<User>(parent)
{
}
+2 -2
View File
@@ -5,11 +5,11 @@
#include "../data/core-data.h"
#include "core-odb.hxx"
class TableModel : public AutoTableModel<User>
class UsersTableModel : public AutoTableModel<User>
{
Q_OBJECT
public:
explicit TableModel(QObject *parent = NULL);
explicit UsersTableModel(QObject *parent = NULL);
};
#endif // TABLEMODEL_H
+1 -1
View File
@@ -3,7 +3,7 @@
UsersUi::UsersUi(QWidget *parent) :GridForm<User>(parent)
{
setTableModel(new TableModel);
setTableModel(new UsersTableModel);
}
UsersUi::~UsersUi()