add base for master element feature

git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@2863 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
blacksun
2014-02-18 20:44:54 +00:00
parent 9d68da7fff
commit cddc841916
14 changed files with 162 additions and 19 deletions

View File

@@ -33,6 +33,7 @@ elementpropertieswidget::elementpropertieswidget(Element *elmt, QWidget *parent)
{
frp_ = 0;
eiw_ = 0;
mpw_ = 0;
buildInterface();
}
@@ -105,7 +106,6 @@ void elementpropertieswidget::buildInterface() {
setWindowTitle(tr("Propri\351t\351s de l'\351l\351ment"));
tab_ = new QTabWidget(this);
tab_ -> addTab(generalWidget(), tr("G\351n\351ral"));
//Add tab according to the element
switch (element_ -> linkType()) {
@@ -122,6 +122,8 @@ void elementpropertieswidget::buildInterface() {
tab_ -> addTab(frp_, tr("Report de folio"));
break;
case Element::Master:
mpw_ = new MasterPropertiesWidget(this);
tab_ -> addTab(mpw_, tr("R\351f\351rence crois\351 (maitre)"));
eiw_ = new ElementInfoWidget(element_, this);
tab_ -> addTab(eiw_, tr("Information"));
break;
@@ -135,6 +137,8 @@ void elementpropertieswidget::buildInterface() {
break;
}
tab_ -> addTab(generalWidget(), tr("G\351n\351ral"));
dbb = new QDialogButtonBox(QDialogButtonBox::Apply | QDialogButtonBox::Cancel | QDialogButtonBox::Reset,
Qt::Horizontal, this);
connect(dbb, SIGNAL(clicked(QAbstractButton*)), this, SLOT(standardButtonClicked(QAbstractButton*)));

View File

@@ -23,6 +23,7 @@
#include <diagram.h>
#include <folioreportproperties.h>
#include <elementinfowidget.h>
#include <masterpropertieswidget.h>
class elementpropertieswidget : public QDialog
{
@@ -48,6 +49,7 @@ class elementpropertieswidget : public QDialog
private:
FolioReportProperties *frp_;
ElementInfoWidget *eiw_;
MasterPropertiesWidget *mpw_;
QDialogButtonBox *dbb;
Element *element_;
Diagram *diagram_;

View File

@@ -0,0 +1,14 @@
#include "masterpropertieswidget.h"
#include "ui_masterpropertieswidget.h"
MasterPropertiesWidget::MasterPropertiesWidget(QWidget *parent) :
QWidget(parent),
ui(new Ui::MasterPropertiesWidget)
{
ui->setupUi(this);
}
MasterPropertiesWidget::~MasterPropertiesWidget()
{
delete ui;
}

View File

@@ -0,0 +1,22 @@
#ifndef MASTERPROPERTIESWIDGET_H
#define MASTERPROPERTIESWIDGET_H
#include <QWidget>
namespace Ui {
class MasterPropertiesWidget;
}
class MasterPropertiesWidget : public QWidget
{
Q_OBJECT
public:
explicit MasterPropertiesWidget(QWidget *parent = 0);
~MasterPropertiesWidget();
private:
Ui::MasterPropertiesWidget *ui;
};
#endif // MASTERPROPERTIESWIDGET_H

View File

@@ -0,0 +1,21 @@
<ui version="4.0">
<author/>
<comment/>
<exportmacro/>
<class>MasterPropertiesWidget</class>
<widget class="QWidget" name="MasterPropertiesWidget">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>400</width>
<height>300</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
</widget>
<pixmapfunction/>
<connections/>
</ui>