[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: koffice/kugar/kudesigner
From: Alexander Dymo <cloudtemple () mksat ! net>
Date: 2003-03-31 21:18:13
[Download RAW message or body]
CVS commit by dymo:
Applied patch from Per Winkvist <per.winkvist@cellnetwork.com>. Fast property editing \
is now available (like in the older versions of qt designer).
M +17 -0 cfield.cpp 1.10
M +1 -0 cfield.h 1.6
M +12 -0 clabel.cpp 1.13
M +2 -0 clabel.h 1.5
M +1 -0 creportitem.h 1.11
M +1 -0 cspecialfield.h 1.5
M +14 -0 cv.cpp 1.32
M +1 -0 cv.h 1.21
--- koffice/kugar/kudesigner/cfield.cpp #1.9:1.10
@@ -16,4 +16,6 @@
***************************************************************************/
#include <klocale.h>
+#include <klineeditdlg.h>
+
#include "cfield.h"
#include "property.h"
@@ -72,2 +74,17 @@ QString CanvasField::getXml()
return "\t\t<Field" + CanvasReportItem::getXml() + " />\n";
}
+
+void CanvasField::fastProperty()
+{
+ bool accepted;
+ QString sValue = props["Field"]->value();
+
+ /* Remove the [] brackets around the text */
+// sValue = sValue.mid( 1, sValue.length() - 2 );
+ QString sText = KLineEditDlg::getText( i18n( "Change field" ),
+ "Field:", sValue , &accepted );
+ if ( accepted )
+ props["Field"]->setValue( sText );
+
+}
+
--- koffice/kugar/kudesigner/cfield.h #1.5:1.6
@@ -31,4 +31,5 @@ public:
CanvasLabel::updateGeomProps();
}
+ virtual void fastProperty();
};
--- koffice/kugar/kudesigner/clabel.cpp #1.12:1.13
@@ -16,4 +16,5 @@
***************************************************************************/
#include <klocale.h>
+#include <klineeditdlg.h>
#include <qpainter.h>
@@ -198,2 +199,13 @@ QString CanvasLabel::getXml()
return "\t\t<Label" + CanvasReportItem::getXml() + " />\n";
}
+
+void CanvasLabel::fastProperty()
+{
+ bool accepted;
+
+ QString sText = KLineEditDlg::getText( i18n( "Change label" ),
+ "", props["Text"]->value(), &accepted );
+ if ( accepted )
+ props["Text"]->setValue( sText );
+}
+
--- koffice/kugar/kudesigner/clabel.h #1.4:1.5
@@ -40,4 +40,6 @@ public:
CanvasReportItem::updateGeomProps();
}
+
+ virtual void fastProperty();
};
--- koffice/kugar/kudesigner/creportitem.h #1.10:1.11
@@ -54,4 +54,5 @@ public:
virtual int isInHolder(const QPoint p);
virtual void drawHolders(QPainter &painter);
+ virtual void fastProperty() { };
protected:
--- koffice/kugar/kudesigner/cspecialfield.h #1.4:1.5
@@ -31,4 +31,5 @@ public:
CanvasLabel::updateGeomProps();
}
+ virtual void fastProperty() {};
};
--- koffice/kugar/kudesigner/cv.cpp #1.31:1.32
@@ -560,4 +560,18 @@ void ReportCanvas::contentsMouseMoveEven
}
+
+void ReportCanvas::contentsMouseDoubleClickEvent( QMouseEvent *e )
+{
+ CanvasReportItem *item = 0L;
+
+ if ( m_canvas->selected.count() == 1 )
+ item = static_cast<CanvasReportItem *>( m_canvas->selected.first() );
+ if ( item ) {
+ item->fastProperty();
+ item->hide();
+ item->show();
+ }
+}
+
void ReportCanvas::setRequest(RequestType r)
{
--- koffice/kugar/kudesigner/cv.h #1.20:1.21
@@ -59,4 +59,5 @@ protected:
void contentsMouseReleaseEvent(QMouseEvent*);
void contentsMouseMoveEvent(QMouseEvent*);
+ void contentsMouseDoubleClickEvent( QMouseEvent * );
void contentsDragEnterEvent ( QDragEnterEvent * );
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic