Add ability to store informations for element like label, manufacturer, ref etc....

Add widget to edit it, save/load works
Informations are stored in a diagramcontext, this class was modified (new feature) to store information
but keep compatibilty with older version.  


git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@2850 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
blacksun
2014-02-12 17:36:35 +00:00
parent 2c8bf84795
commit b361788873
14 changed files with 510 additions and 16 deletions

View File

@@ -32,6 +32,7 @@ elementpropertieswidget::elementpropertieswidget(Element *elmt, QWidget *parent)
diagram_ (elmt->diagram())
{
frp_ = 0;
eiw_ = 0;
buildInterface();
}
@@ -109,6 +110,8 @@ void elementpropertieswidget::buildInterface() {
//Add tab according to the element
switch (element_ -> linkType()) {
case Element::Simple:
eiw_ = new ElementInfoWidget(element_, this);
tab_ -> addTab(eiw_, tr("Information"));
break;
case Element::NextReport:
frp_ = new FolioReportProperties(element_, this);
@@ -119,6 +122,8 @@ void elementpropertieswidget::buildInterface() {
tab_ -> addTab(frp_, tr("Report de folio"));
break;
case Element::Master:
eiw_ = new ElementInfoWidget(element_, this);
tab_ -> addTab(eiw_, tr("Information"));
break;
case Element::SlaveNC:
break;
@@ -153,7 +158,8 @@ void elementpropertieswidget::standardButtonClicked(QAbstractButton *button) {
case QDialogButtonBox::ResetRole:
break;
case QDialogButtonBox::ApplyRole:
if (frp_) frp_->Apply();
if (frp_) frp_->Apply(); //folio report widget
else if (eiw_) eiw_->apply(); //element information widget
this->accept();
case QDialogButtonBox::RejectRole:
this->reject();