1.11.3 Better windows support
authorinsilmaril
Fri Nov 09 12:07:20 2007 +0000 (2007-11-09)
changeset 6237ba1c04d96d5
parent 622 9f739222ee8c
child 624 4ffc47ae27e4
1.11.3 Better windows support
attributedialog.cpp
attributedialog.h
attributedialog.ui
attributewidget.cpp
attributewidget.h
attributewidget.ui
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/attributedialog.cpp	Fri Nov 09 12:07:20 2007 +0000
     1.3 @@ -0,0 +1,19 @@
     1.4 +#include "attributedialog.h"
     1.5 +
     1.6 +
     1.7 +AttributeDialog::AttributeDialog (QWidget *parent):QDialog (parent)
     1.8 +{
     1.9 +	ui.setupUi (this);
    1.10 +}
    1.11 +
    1.12 +
    1.13 +void AttributeDialog::closeEvent( QCloseEvent* ce )
    1.14 +{
    1.15 +    ce->accept();	// can be reopened with show()
    1.16 +	hide();
    1.17 +	emit (windowClosed() );
    1.18 +    return;
    1.19 +}
    1.20 +
    1.21 +
    1.22 +
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/attributedialog.h	Fri Nov 09 12:07:20 2007 +0000
     2.3 @@ -0,0 +1,22 @@
     2.4 +#ifndef ATTRIBUTEDIALOG_H
     2.5 +#define ATTRIBUTEDIALOG_H
     2.6 +
     2.7 +#include "ui_attributedialog.h"
     2.8 +
     2.9 +#include <QDialog>
    2.10 +#include <QCloseEvent>
    2.11 +
    2.12 +class AttributeDialog:public QDialog
    2.13 +{
    2.14 +	Q_OBJECT 
    2.15 +public:
    2.16 +	AttributeDialog (QWidget *parent=0 );
    2.17 +signals:
    2.18 +	void windowClosed();
    2.19 +protected:
    2.20 +	void closeEvent(QCloseEvent*);
    2.21 +private:
    2.22 +	Ui::AttributeDialog ui;
    2.23 +};
    2.24 +
    2.25 +#endif
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/attributedialog.ui	Fri Nov 09 12:07:20 2007 +0000
     3.3 @@ -0,0 +1,89 @@
     3.4 +<ui version="4.0" >
     3.5 + <class>AttributeDialog</class>
     3.6 + <widget class="QDialog" name="AttributeDialog" >
     3.7 +  <property name="geometry" >
     3.8 +   <rect>
     3.9 +    <x>0</x>
    3.10 +    <y>0</y>
    3.11 +    <width>468</width>
    3.12 +    <height>78</height>
    3.13 +   </rect>
    3.14 +  </property>
    3.15 +  <property name="sizePolicy" >
    3.16 +   <sizepolicy vsizetype="Preferred" hsizetype="Minimum" >
    3.17 +    <horstretch>0</horstretch>
    3.18 +    <verstretch>0</verstretch>
    3.19 +   </sizepolicy>
    3.20 +  </property>
    3.21 +  <property name="windowTitle" >
    3.22 +   <string>Attributes</string>
    3.23 +  </property>
    3.24 +  <layout class="QVBoxLayout" >
    3.25 +   <item>
    3.26 +    <widget class="QLineEdit" name="lineEdit" />
    3.27 +   </item>
    3.28 +   <item>
    3.29 +    <layout class="QHBoxLayout" >
    3.30 +     <item>
    3.31 +      <spacer>
    3.32 +       <property name="orientation" >
    3.33 +        <enum>Qt::Horizontal</enum>
    3.34 +       </property>
    3.35 +       <property name="sizeHint" >
    3.36 +        <size>
    3.37 +         <width>40</width>
    3.38 +         <height>20</height>
    3.39 +        </size>
    3.40 +       </property>
    3.41 +      </spacer>
    3.42 +     </item>
    3.43 +     <item>
    3.44 +      <widget class="QDialogButtonBox" name="buttonBox" >
    3.45 +       <property name="orientation" >
    3.46 +        <enum>Qt::Horizontal</enum>
    3.47 +       </property>
    3.48 +       <property name="standardButtons" >
    3.49 +        <set>QDialogButtonBox::Cancel|QDialogButtonBox::NoButton|QDialogButtonBox::Ok</set>
    3.50 +       </property>
    3.51 +      </widget>
    3.52 +     </item>
    3.53 +    </layout>
    3.54 +   </item>
    3.55 +  </layout>
    3.56 + </widget>
    3.57 + <resources/>
    3.58 + <connections>
    3.59 +  <connection>
    3.60 +   <sender>buttonBox</sender>
    3.61 +   <signal>accepted()</signal>
    3.62 +   <receiver>AttributeDialog</receiver>
    3.63 +   <slot>accept()</slot>
    3.64 +   <hints>
    3.65 +    <hint type="sourcelabel" >
    3.66 +     <x>248</x>
    3.67 +     <y>254</y>
    3.68 +    </hint>
    3.69 +    <hint type="destinationlabel" >
    3.70 +     <x>157</x>
    3.71 +     <y>274</y>
    3.72 +    </hint>
    3.73 +   </hints>
    3.74 +  </connection>
    3.75 +  <connection>
    3.76 +   <sender>buttonBox</sender>
    3.77 +   <signal>rejected()</signal>
    3.78 +   <receiver>AttributeDialog</receiver>
    3.79 +   <slot>reject()</slot>
    3.80 +   <hints>
    3.81 +    <hint type="sourcelabel" >
    3.82 +     <x>316</x>
    3.83 +     <y>260</y>
    3.84 +    </hint>
    3.85 +    <hint type="destinationlabel" >
    3.86 +     <x>286</x>
    3.87 +     <y>274</y>
    3.88 +    </hint>
    3.89 +   </hints>
    3.90 +  </connection>
    3.91 + </connections>
    3.92 +</ui>
     4.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.2 +++ b/attributewidget.cpp	Fri Nov 09 12:07:20 2007 +0000
     4.3 @@ -0,0 +1,6 @@
     4.4 +#include "attributewidget.h"
     4.5 +
     4.6 +AttributeWidget::AttributeWidget (QWidget *parent):QWidget (parent)
     4.7 +{
     4.8 +	ui.setupUi (this);
     4.9 +}
     5.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     5.2 +++ b/attributewidget.h	Fri Nov 09 12:07:20 2007 +0000
     5.3 @@ -0,0 +1,17 @@
     5.4 +#ifndef ATTRIBUTEWIDGET_H
     5.5 +#define ATTRIBUTEWIDGET_H
     5.6 +
     5.7 +#include "ui_attributewidget.h"
     5.8 +
     5.9 +#include <QWidget>
    5.10 +
    5.11 +class AttributeWidget: public QWidget
    5.12 +{
    5.13 +	Q_OBJECT
    5.14 +public:
    5.15 +	AttributeWidget (QWidget *parent=0);
    5.16 +private:
    5.17 +	Ui::AttributeWidget ui;
    5.18 +
    5.19 +};
    5.20 +#endif
     6.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     6.2 +++ b/attributewidget.ui	Fri Nov 09 12:07:20 2007 +0000
     6.3 @@ -0,0 +1,56 @@
     6.4 +<ui version="4.0" >
     6.5 + <class>AttributeWidget</class>
     6.6 + <widget class="QWidget" name="AttributeWidget" >
     6.7 +  <property name="geometry" >
     6.8 +   <rect>
     6.9 +    <x>0</x>
    6.10 +    <y>0</y>
    6.11 +    <width>400</width>
    6.12 +    <height>115</height>
    6.13 +   </rect>
    6.14 +  </property>
    6.15 +  <property name="windowTitle" >
    6.16 +   <string>Form</string>
    6.17 +  </property>
    6.18 +  <layout class="QHBoxLayout" >
    6.19 +   <property name="spacing" >
    6.20 +    <number>0</number>
    6.21 +   </property>
    6.22 +   <item>
    6.23 +    <widget class="QComboBox" name="keyComboBox" >
    6.24 +     <property name="sizePolicy" >
    6.25 +      <sizepolicy vsizetype="Fixed" hsizetype="Expanding" >
    6.26 +       <horstretch>0</horstretch>
    6.27 +       <verstretch>0</verstretch>
    6.28 +      </sizepolicy>
    6.29 +     </property>
    6.30 +    </widget>
    6.31 +   </item>
    6.32 +   <item>
    6.33 +    <widget class="QComboBox" name="valueComboBox" >
    6.34 +     <property name="sizePolicy" >
    6.35 +      <sizepolicy vsizetype="Fixed" hsizetype="Expanding" >
    6.36 +       <horstretch>0</horstretch>
    6.37 +       <verstretch>0</verstretch>
    6.38 +      </sizepolicy>
    6.39 +     </property>
    6.40 +    </widget>
    6.41 +   </item>
    6.42 +   <item>
    6.43 +    <widget class="QPushButton" name="deleteButton" >
    6.44 +     <property name="sizePolicy" >
    6.45 +      <sizepolicy vsizetype="Fixed" hsizetype="Minimum" >
    6.46 +       <horstretch>0</horstretch>
    6.47 +       <verstretch>0</verstretch>
    6.48 +      </sizepolicy>
    6.49 +     </property>
    6.50 +     <property name="text" >
    6.51 +      <string/>
    6.52 +     </property>
    6.53 +    </widget>
    6.54 +   </item>
    6.55 +  </layout>
    6.56 + </widget>
    6.57 + <resources/>
    6.58 + <connections/>
    6.59 +</ui>