Fixed layout in detail dialog and painting of text item in rotate mode

--HG--
branch : feature
This commit is contained in:
BojanKverh 2016-07-06 22:15:32 +02:00
parent 192c4d33a7
commit 3a40927764
2 changed files with 56 additions and 69 deletions

View File

@ -390,32 +390,6 @@
<layout class="QGridLayout" name="gridLayout_2"> <layout class="QGridLayout" name="gridLayout_2">
<item row="0" column="0"> <item row="0" column="0">
<widget class="QWidget" name="widget" native="true"> <widget class="QWidget" name="widget" native="true">
<widget class="QLabel" name="labelEditName">
<property name="geometry">
<rect>
<x>10</x>
<y>40</y>
<width>101</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string>Name of detail:</string>
</property>
</widget>
<widget class="QLineEdit" name="lineEditName">
<property name="geometry">
<rect>
<x>110</x>
<y>40</y>
<width>151</width>
<height>23</height>
</rect>
</property>
<property name="maxLength">
<number>15</number>
</property>
</widget>
<widget class="QListWidget" name="listWidgetMCP"> <widget class="QListWidget" name="listWidgetMCP">
<property name="geometry"> <property name="geometry">
<rect> <rect>
@ -503,57 +477,71 @@
</item> </item>
</layout> </layout>
</widget> </widget>
<widget class="QLabel" name="label_5"> <widget class="QWidget" name="formLayoutWidget">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>9</x> <x>0</x>
<y>9</y> <y>0</y>
<width>40</width> <width>271</width>
<height>16</height> <height>61</height>
</rect> </rect>
</property> </property>
<property name="text"> <layout class="QFormLayout" name="formLayout">
<string>Letter:</string> <item row="0" column="0">
</property> <widget class="QLabel" name="label_5">
<property name="text">
<string>Letter:</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLineEdit" name="lineEditLetter">
<property name="maxLength">
<number>3</number>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="labelEditName">
<property name="text">
<string>Name of detail:</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLineEdit" name="lineEditName">
<property name="maxLength">
<number>15</number>
</property>
</widget>
</item>
</layout>
</widget> </widget>
<widget class="QLineEdit" name="lineEditLetter"> <widget class="QWidget" name="formLayoutWidget_2">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>110</x> <x>0</x>
<y>10</y>
<width>151</width>
<height>23</height>
</rect>
</property>
<property name="maxLength">
<number>3</number>
</property>
</widget>
<widget class="QCheckBox" name="checkBoxDetail">
<property name="geometry">
<rect>
<x>10</x>
<y>230</y> <y>230</y>
<width>141</width> <width>261</width>
<height>21</height> <height>80</height>
</rect> </rect>
</property> </property>
<property name="text"> <layout class="QFormLayout" name="formLayout_2">
<string>Detail label visible</string> <item row="0" column="0">
</property> <widget class="QCheckBox" name="checkBoxDetail">
</widget> <property name="text">
<widget class="QCheckBox" name="checkBoxPattern"> <string>Detail label visible</string>
<property name="geometry"> </property>
<rect> </widget>
<x>10</x> </item>
<y>260</y> <item row="1" column="0">
<width>141</width> <widget class="QCheckBox" name="checkBoxPattern">
<height>21</height> <property name="text">
</rect> <string>Pattern label visible</string>
</property> </property>
<property name="text"> </widget>
<string>Pattern label visible</string> </item>
</property> </layout>
</widget> </widget>
</widget> </widget>
</item> </item>

View File

@ -122,8 +122,7 @@ void VTextGraphicsItem::paint(QPainter *painter, const QStyleOptionGraphicsItem
painter->setPen(Qt::black); painter->setPen(Qt::black);
painter->setBrush(Qt::black); painter->setBrush(Qt::black);
painter->drawEllipse( painter->drawEllipse(
m_rectBoundingBox.width()/2, QPointF(m_rectBoundingBox.width()/2, m_rectBoundingBox.height()/2),
m_rectBoundingBox.height()/2,
ROTATE_CIRCLE, ROTATE_CIRCLE,
ROTATE_CIRCLE ROTATE_CIRCLE
); );