Fix for compilation error under win32.
authorAndrey Paskal <apaskal@gmail.com>
Wed, 9 Jul 2008 04:15:16 +0000 (08:15 +0400)
committerAndrey Paskal <apaskal@gmail.com>
Wed, 9 Jul 2008 04:15:16 +0000 (08:15 +0400)
src/designer/deditfield.ui
src/designer/deditfield.ui.h

index cbcc76b..c4e87ad 100644 (file)
@@ -8,7 +8,7 @@
         <rect>
             <x>0</x>
             <y>0</y>
-            <width>570</width>
+            <width>569</width>
             <height>507</height>
         </rect>
     </property>
                                     </spacer>
                                 </hbox>
                             </widget>
-                            <widget class="QLayoutWidget" row="1" column="1">
+                            <widget class="QLayoutWidget" row="0" column="1">
                                 <property name="name">
-                                    <cstring>layout10</cstring>
+                                    <cstring>layout9</cstring>
                                 </property>
                                 <hbox>
                                     <property name="name">
                                         <cstring>unnamed</cstring>
                                     </property>
-                                    <widget class="AComboBox">
-                                        <item>
-                                            <property name="text">
-                                                <string>yyyyMMdd</string>
-                                            </property>
-                                        </item>
-                                        <item>
-                                            <property name="text">
-                                                <string>yyMMdd</string>
-                                            </property>
-                                        </item>
-                                        <item>
-                                            <property name="text">
-                                                <string>dd MMMM yyyy</string>
-                                            </property>
-                                        </item>
+                                    <widget class="QLabel">
                                         <property name="name">
-                                            <cstring>aDFormatBox</cstring>
+                                            <cstring>PrLabel</cstring>
+                                        </property>
+                                        <property name="text">
+                                            <string>Prefix:</string>
+                                        </property>
+                                    </widget>
+                                    <widget class="QLineEdit">
+                                        <property name="name">
+                                            <cstring>ePrefix</cstring>
                                         </property>
                                         <property name="sizePolicy">
                                             <sizepolicy>
-                                                <hsizetype>1</hsizetype>
+                                                <hsizetype>7</hsizetype>
                                                 <vsizetype>0</vsizetype>
-                                                <horstretch>2</horstretch>
+                                                <horstretch>1</horstretch>
                                                 <verstretch>0</verstretch>
                                             </sizepolicy>
                                         </property>
                                     </widget>
                                     <widget class="QLabel">
                                         <property name="name">
-                                            <cstring>textLabel2</cstring>
+                                            <cstring>textLabel1_6</cstring>
                                         </property>
                                         <property name="text">
-                                            <string>or</string>
+                                            <string>+</string>
                                         </property>
                                     </widget>
                                     <widget class="QCheckBox">
                                         <property name="name">
-                                            <cstring>useOwnFofmat</cstring>
+                                            <cstring>lzcheckBox</cstring>
                                         </property>
                                         <property name="text">
-                                            <string>Own format</string>
+                                            <string>LZ</string>
                                         </property>
                                     </widget>
-                                    <widget class="QLineEdit">
+                                    <widget class="QLabel">
                                         <property name="name">
-                                            <cstring>eOwnFormat</cstring>
+                                            <cstring>textLabel1_3</cstring>
                                         </property>
-                                        <property name="sizePolicy">
-                                            <sizepolicy>
-                                                <hsizetype>7</hsizetype>
-                                                <vsizetype>0</vsizetype>
-                                                <horstretch>1</horstretch>
-                                                <verstretch>0</verstretch>
-                                            </sizepolicy>
+                                        <property name="text">
+                                            <string>+ UID +</string>
                                         </property>
                                     </widget>
-                                </hbox>
-                            </widget>
-                            <widget class="QLayoutWidget" row="0" column="1">
-                                <property name="name">
-                                    <cstring>layout9</cstring>
-                                </property>
-                                <hbox>
-                                    <property name="name">
-                                        <cstring>unnamed</cstring>
-                                    </property>
                                     <widget class="QLabel">
                                         <property name="name">
-                                            <cstring>PrLabel</cstring>
+                                            <cstring>SfLabel</cstring>
                                         </property>
                                         <property name="text">
-                                            <string>Prefix:</string>
+                                            <string>Suffix:</string>
                                         </property>
                                     </widget>
                                     <widget class="QLineEdit">
                                         <property name="name">
-                                            <cstring>ePrefix</cstring>
+                                            <cstring>eSuffix</cstring>
                                         </property>
                                         <property name="sizePolicy">
                                             <sizepolicy>
                                             </sizepolicy>
                                         </property>
                                     </widget>
-                                    <widget class="QLabel">
-                                        <property name="name">
-                                            <cstring>textLabel1_6</cstring>
-                                        </property>
-                                        <property name="text">
-                                            <string>+</string>
-                                        </property>
-                                    </widget>
-                                    <widget class="QCheckBox">
+                                </hbox>
+                            </widget>
+                            <widget class="QLayoutWidget" row="1" column="1">
+                                <property name="name">
+                                    <cstring>layout8</cstring>
+                                </property>
+                                <hbox>
+                                    <property name="name">
+                                        <cstring>unnamed</cstring>
+                                    </property>
+                                    <widget class="QComboBox">
+                                        <item>
+                                            <property name="text">
+                                                <string>yyyyMMdd</string>
+                                            </property>
+                                        </item>
+                                        <item>
+                                            <property name="text">
+                                                <string>yyMMdd</string>
+                                            </property>
+                                        </item>
+                                        <item>
+                                            <property name="text">
+                                                <string>dd MMMM yyyy</string>
+                                            </property>
+                                        </item>
                                         <property name="name">
-                                            <cstring>lzcheckBox</cstring>
-                                        </property>
-                                        <property name="text">
-                                            <string>LZ</string>
+                                            <cstring>aDFormatBox</cstring>
                                         </property>
                                     </widget>
                                     <widget class="QLabel">
                                         <property name="name">
-                                            <cstring>textLabel1_3</cstring>
+                                            <cstring>textLabel2</cstring>
                                         </property>
                                         <property name="text">
-                                            <string>+ UID +</string>
+                                            <string>or</string>
                                         </property>
                                     </widget>
-                                    <widget class="QLabel">
+                                    <widget class="QCheckBox">
                                         <property name="name">
-                                            <cstring>SfLabel</cstring>
+                                            <cstring>useOwnFofmat</cstring>
                                         </property>
                                         <property name="text">
-                                            <string>Suffix:</string>
+                                            <string>Own format</string>
                                         </property>
                                     </widget>
                                     <widget class="QLineEdit">
                                         <property name="name">
-                                            <cstring>eSuffix</cstring>
+                                            <cstring>eOwnFormat</cstring>
                                         </property>
                                         <property name="sizePolicy">
                                             <sizepolicy>
 </widget>
 <toolbars>
 </toolbars>
-<customwidgets>
-</customwidgets>
 <connections>
     <connection>
         <sender>eType</sender>
         <slot>setExample()</slot>
     </connection>
     <connection>
-        <sender>aDFormatBox</sender>
-        <signal>activated(const QString&amp;)</signal>
-        <receiver>dEditField</receiver>
-        <slot>setExample()</slot>
-    </connection>
-    <connection>
         <sender>ePrefix</sender>
         <signal>textChanged(const QString&amp;)</signal>
         <receiver>dEditField</receiver>
         <receiver>dEditField</receiver>
         <slot>eWidth_valueChanged(int)</slot>
     </connection>
+    <connection>
+        <sender>aDFormatBox</sender>
+        <signal>activated(int)</signal>
+        <receiver>dEditField</receiver>
+        <slot>setExample()</slot>
+    </connection>
 </connections>
 <includes>
     <include location="local" impldecl="in declaration">acfg.h</include>
 </functions>
 <pixmapinproject/>
 <layoutdefaults spacing="5" margin="5"/>
-<includehints>
-    <includehint>acombobox.h</includehint>
-</includehints>
 </UI>
index e46ea26..6d8e4b1 100644 (file)
@@ -144,7 +144,7 @@ void dEditField::setData( aListViewItem *o )
        lzcheckBox->setChecked( md->attr( obj, mda_lz ) == "1" );
        VdRegEx->setText( md->attr( obj, mda_validator ) );
        inputMask->setText( md->attr( obj, mda_inputmask ) );
-
+       aDFormatBox->setEnabled(FALSE);
        if (md->attr( obj, mda_numdate) != "")
        {
                DateFormat->setChecked( md->attr( obj, mda_numdate) != "");
@@ -524,12 +524,13 @@ void dEditField::setExample()
 
      if (lzcheckBox->isChecked())
      {
-       numerator = QString("789").rightJustify( eWidth->value(), '0' );
+       numerator = QString("789").rightJustify( 8, '0' );
      }
      else {
        numerator = QString("789");
      }
     eXample->setText(QString("%1%2%3%4").arg(ePrefix->text()).arg(numerator).arg(eSuffix->text()).arg(curdate));
+    eWidth->setValue(eXample->text().length());
 }