[rkward-cvs] rkward/rkward/plugin rkstandardcomponent.cpp,1.17,1.18 rkstandardcomponentgui.cpp,1.2,1.3
Thomas Friedrichsmeier
tfry at users.sourceforge.net
Mon Mar 20 01:29:03 UTC 2006
Update of /cvsroot/rkward/rkward/rkward/plugin
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31301/rkward/plugin
Modified Files:
rkstandardcomponent.cpp rkstandardcomponentgui.cpp
Log Message:
Small cleanups
Index: rkstandardcomponentgui.cpp
===================================================================
RCS file: /cvsroot/rkward/rkward/rkward/plugin/rkstandardcomponentgui.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** rkstandardcomponentgui.cpp 20 Mar 2006 00:59:28 -0000 1.2
--- rkstandardcomponentgui.cpp 20 Mar 2006 01:29:01 -0000 1.3
***************
*** 390,394 ****
}
- qDebug ("component added to page %d", current_page);
current_def->page_components.append (component);
}
--- 390,393 ----
Index: rkstandardcomponent.cpp
===================================================================
RCS file: /cvsroot/rkward/rkward/rkward/plugin/rkstandardcomponent.cpp,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -d -r1.17 -r1.18
*** rkstandardcomponent.cpp 20 Mar 2006 00:57:31 -0000 1.17
--- rkstandardcomponent.cpp 20 Mar 2006 01:29:01 -0000 1.18
***************
*** 36,43 ****
#include "../misc/xmlhelper.h"
#include "../settings/rksettingsmoduleplugins.h"
- /*#include "../rkward.h"
- #include "../rkeditormanager.h"
- #include "../rkcommandeditor.h"
- */
// component widgets
--- 36,39 ----
***************
*** 72,75 ****
--- 68,72 ----
if (xml->highestError () >= DL_ERROR) {
KMessageBox::error (this, i18n ("There has been an error while trying to parse the description of this pluign ('%1'). Please refer to stdout for details.").arg (filename), i18n("Could not create plugin"));
+ deleteLater ();
return;
}
***************
*** 90,96 ****
connect (qApp, SIGNAL (aboutToQuit ()), this, SLOT (deleteLater ()));
-
- /* update_timer = new QTimer (this);
- connect (update_timer, SIGNAL (timeout ()), this, SLOT (doChangeUpdate ())); */
// construct the GUI
--- 87,90 ----
***************
*** 98,101 ****
--- 92,96 ----
if (!createTopLevel (doc_element)) {
RK_ASSERT (false);
+ deleteLater ();
return; // should never happen
}
***************
*** 317,321 ****
}
- /** reimplemented for technical reasons. Additionally registers component children with the component stack if in wizard mode */
void RKStandardComponent::addChild (const QString &id, RKComponentBase *child) {
RK_TRACE (PLUGIN);
--- 312,315 ----
***************
*** 349,353 ****
XMLHelper* xml = XMLHelper::getStaticHelper ();
! XMLChildList children = xml->getChildElements (element, "", DL_ERROR);
XMLChildList::const_iterator it;
--- 343,347 ----
XMLHelper* xml = XMLHelper::getStaticHelper ();
! XMLChildList children = xml->getChildElements (element, QString::null, DL_ERROR);
XMLChildList::const_iterator it;
***************
*** 358,378 ****
if (allow_pages && (e.tagName () == "page")) {
! RKComponent *page = component ()->addPage ();
! QVBoxLayout *layout = new QVBoxLayout (page);
! QVBox *box = new QVBox (page);
box->setSpacing (RKGlobals::spacingHint ());
layout->addWidget (box);
buildElement (e, box, false);
} else if (e.tagName () == "row") {
! QHBox *box = new QHBox (parent_widget);
box->setSpacing (RKGlobals::spacingHint ());
buildElement (e, box, false);
} else if (e.tagName () == "column") {
! QVBox *box = new QVBox (parent_widget);
box->setSpacing (RKGlobals::spacingHint ());
buildElement (e, box, false);
} else if (e.tagName () == "frame") {
! QGroupBox *box = new QGroupBox (1, Qt::Horizontal, e.attribute ("label"), parent_widget);
box->setInsideSpacing (RKGlobals::spacingHint ());
buildElement (e, box, false);
} else if (e.tagName () == "tabbook") {
--- 352,381 ----
if (allow_pages && (e.tagName () == "page")) {
! widget = component ()->addPage ();
! QVBoxLayout *layout = new QVBoxLayout (widget);
! QVBox *box = new QVBox (widget);
box->setSpacing (RKGlobals::spacingHint ());
layout->addWidget (box);
buildElement (e, box, false);
} else if (e.tagName () == "row") {
! RKComponent *widget = new RKComponent (component (), parent_widget); // wrapping this (and column, frame below) inside an RKComponent has the benefit, that it can have an id, and hence can be set to visibile/hidden, enabled/disabled
! QVBoxLayout *layout = new QVBoxLayout (widget);
! QHBox *box = new QHBox (widget);
box->setSpacing (RKGlobals::spacingHint ());
+ layout->addWidget (box);
buildElement (e, box, false);
} else if (e.tagName () == "column") {
! RKComponent *widget = new RKComponent (component (), parent_widget);
! QVBoxLayout *layout = new QVBoxLayout (widget);
! QVBox *box = new QVBox (widget);
box->setSpacing (RKGlobals::spacingHint ());
+ layout->addWidget (box);
buildElement (e, box, false);
} else if (e.tagName () == "frame") {
! RKComponent *widget = new RKComponent (component (), parent_widget);
! QVBoxLayout *layout = new QVBoxLayout (widget);
! QGroupBox *box = new QGroupBox (1, Qt::Horizontal, e.attribute ("label"), widget);
box->setInsideSpacing (RKGlobals::spacingHint ());
+ layout->addWidget (box);
buildElement (e, box, false);
} else if (e.tagName () == "tabbook") {
More information about the rkward-tracker
mailing list