[prev in list] [next in list] [prev in thread] [next in thread]
List: koffice-devel
Subject: koffice/kexi/shapes/relationdesign
From: Adam Pigg <adam () piggz ! co ! uk>
Date: 2009-08-24 21:45:46
Message-ID: 1251150346.452668.24280.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 1015213 by piggz:
create connection points on each side of the shape for each field...todo: the points \
move when the shape is resized which in this case is undesirable (atleast for \
vertical changes), maybe KoShape could allow options to be specified when creating \
points which affects how they are moved, or methods could be added to control the \
placement of existing points?
CCMAIL: koffice-devel@kde.org
M +22 -3 kexirelationdesignshape.cpp
M +2 -0 kexirelationdesignshape.h
--- trunk/koffice/kexi/shapes/relationdesign/kexirelationdesignshape.cpp \
#1015212:1015213 @@ -115,6 +115,7 @@
sf->notnull = e.attribute("notnull").toInt();
m_fieldData.append(sf);
}
+addConnectionPoints();
return true;
}
@@ -194,8 +195,6 @@
}
update();
- //Connect to the new database
- //m_connection = new KexiDB::Connection();
}
}
@@ -231,7 +230,27 @@
}
}
-
+ addConnectionPoints();
update();
}
}
+
+void KexiRelationDesignShape::addConnectionPoints()
+{
+ uint i = 0;
+ int offset = 0;
+
+ int point_count = connectionPoints().count();
+
+ for (int j = 0; j < point_count; ++j) {
+ removeConnectionPoint(0);
+ }
+
+ foreach (SimpleField *column, m_fieldData) {
+ ++i;
+ offset = (13.0*i) + 15;
+ addConnectionPoint(QPointF(0,offset));
+ addConnectionPoint(QPointF(boundingRect().width(), offset));
+
+ }
+}
--- trunk/koffice/kexi/shapes/relationdesign/kexirelationdesignshape.h \
#1015212:1015213 @@ -51,6 +51,8 @@
virtual bool loadOdfFrameElement( const KoXmlElement & element, \
KoShapeLoadingContext & context );
private:
+ void addConnectionPoints();
+
//Data for display
QString m_relation;
QString m_database;
_______________________________________________
koffice-devel mailing list
koffice-devel@kde.org
https://mail.kde.org/mailman/listinfo/koffice-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic