[Uml-devel] branches/work/soc-umbrello/umbrello
Andi Fischer
andi.fischer at hispeed.ch
Tue Jul 17 17:57:34 UTC 2012
SVN commit 1306212 by fischer:
Diff to trunk reduced.
M +1 -1 cmds/cmd_moveWidget.cpp
M +7 -2 codeimport/kdevcppparser/preprocesslexer.cpp
M +6 -0 dialogs/selectopdlg.cpp
M +3 -2 widgets/widget_utils.cpp
M +5 -0 widgets/widgetbase.cpp
--- branches/work/soc-umbrello/umbrello/cmds/cmd_moveWidget.cpp #1306211:1306212
@@ -56,7 +56,7 @@
//w->setX(m_oldX);
//w->setY(m_oldY);
- //m_widgetCtrl->moveWidget(w->getX() - m_oldX, w->getY() - m_oldY);
+ //m_widgetCtrl->moveWidget(w->x() - m_oldX, w->y() - m_oldY);
//m_widgetCtrl->moveWidget(-10,-10);
//m_widgetCtrl->moveWidget(-diffX,-diffY);
//widget->getWidgetController()->moveWidgetBy(-diffX, -diffY);
--- branches/work/soc-umbrello/umbrello/codeimport/kdevcppparser/preprocesslexer.cpp #1306211:1306212
@@ -593,8 +593,7 @@
if (!d.exists())
d.mkdir(tempPath);
- QString fileName = tempPath + '/' + currentPosition().file.toString().replace('/','-');
- fileName = fileName.replace("/-","/");
+ QString fileName = tempPath + '/' + currentPosition().file.toString().replace(QRegExp("[/:mn]"), "-");
QFile f(fileName);
if (f.open(QIODevice::WriteOnly | QIODevice::Text)) {
QTextStream out(&f);
@@ -803,7 +802,13 @@
Token tk;
nextToken(tk);
+ if (tk == '#') {
+ nextToken(tk);
if (tk.type() != -1) {
+ body += '"' + tk.text() + '"';
+ }
+ }
+ else if (tk.type() != -1) {
QString s = tk.text();
body += s;
}
--- branches/work/soc-umbrello/umbrello/dialogs/selectopdlg.cpp #1306211:1306212
@@ -31,6 +31,11 @@
#include <QtGui/QRadioButton>
#include <QtGui/QGroupBox>
+bool caseInsensitiveLessThan(const UMLOperation *s1, const UMLOperation *s2)
+{
+ return s1->name().toLower() < s2->name().toLower();
+}
+
SelectOpDlg::SelectOpDlg(QWidget * parent, UMLClassifier * c)
: KDialog(parent)
{
@@ -73,6 +78,7 @@
mainLayout->addWidget(m_pOpLE, 2, 1);
UMLOperationList list = c->getOpList(true);
+ qSort(list.begin(), list.end(), caseInsensitiveLessThan);
foreach (UMLOperation* obj, list ) {
insertOperation( obj->toString(Uml::SignatureType::SigNoVis), list.count() );
}
--- branches/work/soc-umbrello/umbrello/widgets/widget_utils.cpp #1306211:1306212
@@ -70,9 +70,10 @@
{
const int SIZE = 4;
UMLView *currentView = UMLApp::app()->currentView();
- QGraphicsRectItem *rect = new QGraphicsRectItem(0, 0, SIZE, SIZE);
+ UMLSceneRectItem *rect = new UMLSceneRectItem(p.x() - SIZE / 2,
+ p.y() - SIZE / 2,
+ SIZE, SIZE);
currentView->umlScene()->addItem(rect);
- rect->setPos(p.x() - SIZE / 2, p.y() - SIZE / 2);
rect->setBrush( QBrush(Qt::blue) );
rect->setPen( QPen(Qt::blue) );
return rect;
--- branches/work/soc-umbrello/umbrello/widgets/widgetbase.cpp #1306211:1306212
@@ -517,6 +517,11 @@
return m_usesDiagramTextColor;
}
+/**
+ * Set state if diagram text color is used
+ *
+ * @param state The state to set
+ */
void WidgetBase::setUsesDiagramTextColor(bool state)
{
if (m_usesDiagramTextColor == state) {
More information about the umbrello-devel
mailing list