[rkward-cvs] rkward/rkward/dataeditor rkeditordataframe.cpp,1.30,1.31 rkeditordataframe.h,1.7,1.8 rkeditordataframepart.cpp,1.4,1.5 rkeditordataframepart.h,1.5,1.6
Thomas Friedrichsmeier
tfry at users.sourceforge.net
Thu Oct 20 18:42:39 UTC 2005
Update of /cvsroot/rkward/rkward/rkward/dataeditor
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17201/rkward/dataeditor
Modified Files:
rkeditordataframe.cpp rkeditordataframe.h
rkeditordataframepart.cpp rkeditordataframepart.h
Log Message:
Fix problem with RKEditorDataFrame-GUI sometimes not being removed when editor window is closed (I hope)
Index: rkeditordataframe.cpp
===================================================================
RCS file: /cvsroot/rkward/rkward/rkward/dataeditor/rkeditordataframe.cpp,v
retrieving revision 1.30
retrieving revision 1.31
diff -C2 -d -r1.30 -r1.31
*** rkeditordataframe.cpp 2 Oct 2005 17:19:02 -0000 1.30
--- rkeditordataframe.cpp 20 Oct 2005 18:42:37 -0000 1.31
***************
*** 37,44 ****
#define GET_DATA_OFFSET 10
! RKEditorDataFrame::RKEditorDataFrame (QWidget *parent) : TwinTable (parent) {
RK_TRACE (EDITOR);
! part = new RKEditorDataFramePart (parent, this);
open_chain = 0;
--- 37,44 ----
#define GET_DATA_OFFSET 10
! RKEditorDataFrame::RKEditorDataFrame (QWidget *parent, KParts::Part* part) : TwinTable (parent) {
RK_TRACE (EDITOR);
! RKEditorDataFrame::part = part;
open_chain = 0;
Index: rkeditordataframepart.cpp
===================================================================
RCS file: /cvsroot/rkward/rkward/rkward/dataeditor/rkeditordataframepart.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** rkeditordataframepart.cpp 17 Sep 2005 18:04:00 -0000 1.4
--- rkeditordataframepart.cpp 20 Oct 2005 18:42:37 -0000 1.5
***************
*** 30,40 ****
#include "../debug.h"
! RKEditorDataFramePart::RKEditorDataFramePart (QWidget *parent, RKEditorDataFrame *editor_widget) : KParts::Part (parent) {
RK_TRACE (EDITOR);
KInstance* instance = new KInstance ("rkward");
setInstance (instance);
! setWidget (editor_widget);
! editor = editor_widget;
setXMLFile ("rkeditordataframepart.rc");
--- 30,40 ----
#include "../debug.h"
! RKEditorDataFramePart::RKEditorDataFramePart (QWidget *parent) : KParts::Part (parent) {
RK_TRACE (EDITOR);
KInstance* instance = new KInstance ("rkward");
setInstance (instance);
! editor = new RKEditorDataFrame (parent, this);
! setWidget (editor);
setXMLFile ("rkeditordataframepart.rc");
Index: rkeditordataframe.h
===================================================================
RCS file: /cvsroot/rkward/rkward/rkward/dataeditor/rkeditordataframe.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** rkeditordataframe.h 14 Sep 2004 23:34:01 -0000 1.7
--- rkeditordataframe.h 20 Oct 2005 18:42:37 -0000 1.8
***************
*** 33,41 ****
class RKEditorDataFrame : public TwinTable, public RCommandReceiver {
Q_OBJECT
public:
- RKEditorDataFrame (QWidget *parent);
-
- ~RKEditorDataFrame ();
-
void flushChanges ();
--- 33,43 ----
class RKEditorDataFrame : public TwinTable, public RCommandReceiver {
Q_OBJECT
+ protected:
+ friend class RKEditorDataFramePart;
+ /** constructor. Protected as you should not create an RKEditorDataFrame directly. Create an RKEditorDataFramePart instead. */
+ RKEditorDataFrame (QWidget *parent, KParts::Part* part);
+ /** destructor */
+ ~RKEditorDataFrame ();
public:
void flushChanges ();
Index: rkeditordataframepart.h
===================================================================
RCS file: /cvsroot/rkward/rkward/rkward/dataeditor/rkeditordataframepart.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** rkeditordataframepart.h 18 Sep 2005 15:17:52 -0000 1.5
--- rkeditordataframepart.h 20 Oct 2005 18:42:37 -0000 1.6
***************
*** 31,35 ****
Q_OBJECT
public:
! RKEditorDataFramePart (QWidget *parent, RKEditorDataFrame *editor_widget);
~RKEditorDataFramePart ();
--- 31,35 ----
Q_OBJECT
public:
! RKEditorDataFramePart (QWidget *parent);
~RKEditorDataFramePart ();
***************
*** 45,48 ****
--- 45,50 ----
/** paste the clipboard into the table, but not beyond selection boundaries */
void slotEditPasteToSelection();
+ /** return a pointer to the underlying editor widget */
+ RKEditorDataFrame *getEditor () { return editor; };
private:
KAction* editCut;
***************
*** 52,55 ****
--- 54,58 ----
KAction* editPasteToTable;
+ /** we could always use static_cast<RKEditorDataFrame*> (widget ()) instead of keeping this pointer. This saves some typing, though */
RKEditorDataFrame *editor;
More information about the rkward-tracker
mailing list