[Kst] kdeextragear-2/kst/kst
George Staikos
staikos at kde.org
Thu Jun 26 07:30:14 CEST 2003
CVS commit by staikos:
leak fixes, and add <None> vector to the vectorselector
M +3 -1 kstmouse.cpp 1.5
M +19 -5 kstplot.cpp 1.15
M +4 -0 vectorselector.ui 1.3
M +16 -0 vectorselector.ui.h 1.2
--- kdeextragear-2/kst/kst/kstmouse.cpp #1.4:1.5
@@ -76,8 +76,10 @@ KstMouse::~KstMouse() {
delete ArrowCursor;
ArrowCursor = 0L;
+ delete IBeamCursor;
+ IBeamCursor = 0L;
}
KstMouseModeType KstMouse::getMode() {
- return (Mode);
+ return Mode;
}
--- kdeextragear-2/kst/kst/kstplot.cpp #1.14:1.15
@@ -121,11 +121,25 @@ KstPlot::KstPlot(QDomElement &e, KstBase
}
- if (in_toplabel) TopLabel = in_toplabel;
- if (in_xlabel) XLabel = in_xlabel;
- if (in_ylabel) YLabel = in_ylabel;
- if (in_ticklabel) TickLabel = in_ticklabel;
+ if (in_toplabel) {
+ delete TopLabel;
+ TopLabel = in_toplabel;
+ }
- TickLabel->setDoScalarReplacement(false);
+ if (in_xlabel) {
+ delete XLabel;
+ XLabel = in_xlabel;
+ }
+
+ if (in_ylabel) {
+ delete YLabel;
+ YLabel = in_ylabel;
+ }
+ if (in_ticklabel) {
+ delete TickLabel;
+ TickLabel = in_ticklabel;
+ }
+
+ TickLabel->setDoScalarReplacement(false);
}
--- kdeextragear-2/kst/kst/vectorselector.ui #1.2:1.3
@@ -79,4 +79,7 @@
<include location="local" impldecl="in implementation">vectorselector.ui.h</include>
</includes>
+<variables>
+ <variable access="private">bool _provideNoneVector;</variable>
+</variables>
<signals>
<signal>newVectorCreated()</signal>
@@ -91,4 +94,5 @@
<slot>setSelection( const QString & tag )</slot>
<slot>setSelection( KstVectorPtr v )</slot>
+ <slot>provideNoneVector( bool provide )</slot>
</slots>
<functions>
--- kdeextragear-2/kst/kst/vectorselector.ui.h #1.1:1.2
@@ -17,4 +17,7 @@ void VectorSelector::allowNewVectors( bo
QString VectorSelector::selectedVector()
{
+ if (_provideNoneVector && _vector->currentItem() == 0) {
+ return QString::null;
+ }
return _vector->currentText();
}
@@ -27,4 +30,7 @@ void VectorSelector::update()
bool found = false;
_vector->clear();
+ if (_provideNoneVector) {
+ _vector->insertItem(tr("<None>"));
+ }
for (KstVectorList::Iterator i = KST::vectorList.begin(); i != KST::vectorList.end(); ++i) {
_vector->insertItem((*i)->tagName());
@@ -42,4 +48,5 @@ void VectorSelector::update()
void VectorSelector::init()
{
+ _provideNoneVector = false;
update();
connect(_vector, SIGNAL(activated(const QString&)), this, SIGNAL(selectionChanged(const QString&)));
@@ -80,3 +87,12 @@ void VectorSelector::setSelection( KstVe
{
setSelection(v->tagName());
+}
+
+
+void VectorSelector::provideNoneVector( bool provide )
+{
+ if (provide != _provideNoneVector) {
+ _provideNoneVector = provide;
+ update();
+ }
}
More information about the Kst
mailing list