• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdeedu API Reference
  • KDE Home
  • Contact Us
 

rocs/VisualEditor

  • sources
  • kde-4.14
  • kdeedu
  • rocs
  • VisualEditor
  • Interface
DataStructurePage.cpp
Go to the documentation of this file.
1 /*
2  This file is part of Rocs.
3  Copyright 2012 Andreas Cord-Landwehr <cola@uni-paderborn.de>
4 
5  This program is free software; you can redistribute it and/or
6  modify it under the terms of the GNU General Public License as
7  published by the Free Software Foundation; either version 2 of
8  the License, or (at your option) any later version.
9 
10  This program is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU General Public License for more details.
14 
15  You should have received a copy of the GNU General Public License
16  along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */
18 
19 #include "DataStructurePage.h"
20 #include <Data.h>
21 #include "Scene/DataItem.h"
22 
23 #include <QWidget>
24 #include <QString>
25 #include <QSvgRenderer>
26 #include <QPainter>
27 
28 #include <KDebug>
29 #include <KLineEdit>
30 #include <KColorCombo>
31 #include <KPushButton>
32 #include <KComboBox>
33 #include "DataStructureBackendManager.h"
34 #include <DataStructureBackendInterface.h>
35 
36 DataStructurePage::DataStructurePage(QWidget* parent)
37  : QWidget(parent)
38 {
39  ui = new Ui::DataStructurePage;
40  ui->setupUi(this);
41 }
42 
43 
44 void DataStructurePage::setDataStructure(DataStructurePtr dataStructure)
45 {
46  Q_ASSERT(dataStructure);
47 
48  if (_dataStructure) {
49  disconnect(_dataStructure.get());
50  }
51 
52  ui->dataStructureName->setText(dataStructure->name());
53  ui->dataStructurePlugin->addItem(dataStructure->document()->backend()->name());
54  ui->dataStructurePlugin->setDisabled(true);
55 
56  if (!ui->pluginExtraProperties->layout()) {
57  QLayout *layout = DataStructureBackendManager::self().dataStructureExtraProperties(dataStructure, ui->pluginExtraProperties);
58  ui->pluginExtraProperties->setLayout(layout);
59  }
60 
61  connect(ui->dataStructureName, SIGNAL(textChanged(QString)),
62  dataStructure.get(), SLOT(setName(QString)));
63 }
QWidget::layout
QLayout * layout() const
QWidget
QLayout
QObject::disconnect
bool disconnect(const QObject *sender, const char *signal, const QObject *receiver, const char *method)
DataStructurePage.h
DataStructurePage::DataStructurePage
DataStructurePage(QWidget *parent=0)
Definition: DataStructurePage.cpp:36
QString
QObject::setName
void setName(const char *name)
DataItem.h
QObject::connect
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
DataStructurePage::setDataStructure
void setDataStructure(DataStructurePtr dataStructure)
Definition: DataStructurePage.cpp:44
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:16:27 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

rocs/VisualEditor

Skip menu "rocs/VisualEditor"
  • Main Page
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdeedu API Reference

Skip menu "kdeedu API Reference"
  • Analitza
  •     lib
  • kalgebra
  • kalzium
  •   libscience
  • kanagram
  • kig
  •   lib
  • klettres
  • marble
  • parley
  • rocs
  •   App
  •   RocsCore
  •   VisualEditor
  •   stepcore

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal