Small progress with ui.

This commit is contained in:
castano 2008-01-07 07:27:09 +00:00
parent 2b716b62da
commit f3a73e3de5
3 changed files with 350 additions and 432 deletions

View File

@ -54,6 +54,9 @@ void ConfigDialog::init()
connect(ui.blueSpinBox, SIGNAL(valueChanged(double)), this, SLOT(colorWeightChanged()));
connect(ui.uniformButton, SIGNAL(toggled(bool)), this, SLOT(uniformWeightToggled(bool)));
connect(ui.luminanceButton, SIGNAL(toggled(bool)), this, SLOT(luminanceWeightToggled(bool)));
//connect(ui.rgbMapRadioButton, SIGNAL(toggled(bool)), this, SLOT(colorModeChanged()));
connect(ui.normalMapRadioButton, SIGNAL(toggled(bool)), this, SLOT(normalMapModeChanged(bool)));
}
@ -124,7 +127,14 @@ void ConfigDialog::luminanceWeightToggled(bool checked)
}
}
void ConfigDialog::normalMapModeChanged(bool checked)
{
ui.alphaModeGroupBox->setEnabled(!checked);
ui.inputGammaSpinBox->setEnabled(!checked);
ui.inputGammaLabel->setEnabled(!checked);
ui.outputGammaSpinBox->setEnabled(!checked);
ui.outputGammaLabel->setEnabled(!checked);
}
bool ConfigDialog::open(QString fileName)

View File

@ -48,6 +48,7 @@ protected slots:
void uniformWeightToggled(bool checked);
void luminanceWeightToggled(bool checked);
void normalMapModeChanged(bool checked);
bool open(QString fileName);

View File

@ -5,8 +5,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>591</width>
<height>510</height>
<width>674</width>
<height>475</height>
</rect>
</property>
<property name="windowTitle" >
@ -19,28 +19,10 @@
<bool>true</bool>
</property>
<layout class="QVBoxLayout" >
<property name="margin" >
<number>9</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item>
<layout class="QHBoxLayout" >
<property name="margin" >
<number>0</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item>
<layout class="QVBoxLayout" >
<property name="margin" >
<number>0</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item>
<widget class="QListWidget" name="listWidget" >
<property name="minimumSize" >
@ -103,28 +85,38 @@
<item>
<widget class="QStackedWidget" name="stackedWidget" >
<property name="sizePolicy" >
<sizepolicy>
<hsizetype>7</hsizetype>
<vsizetype>7</vsizetype>
<sizepolicy vsizetype="Expanding" hsizetype="Expanding" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="currentIndex" >
<number>0</number>
<number>3</number>
</property>
<widget class="QWidget" name="inputPage" >
<layout class="QVBoxLayout" >
<property name="margin" >
<number>9</number>
</property>
<property name="spacing" >
<number>6</number>
<number>-1</number>
</property>
<property name="leftMargin" >
<number>0</number>
</property>
<property name="topMargin" >
<number>0</number>
</property>
<property name="rightMargin" >
<number>0</number>
</property>
<property name="bottomMargin" >
<number>0</number>
</property>
<item>
<widget class="QTabWidget" name="tabWidget" >
<property name="currentIndex" >
<number>2</number>
<number>0</number>
</property>
<property name="elideMode" >
<enum>Qt::ElideNone</enum>
</property>
<property name="usesScrollButtons" >
<bool>false</bool>
@ -134,29 +126,15 @@
<string>File Path</string>
</attribute>
<layout class="QVBoxLayout" >
<property name="margin" >
<number>9</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item>
<layout class="QHBoxLayout" >
<property name="margin" >
<number>0</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item>
<widget class="QLineEdit" name="imagePathLineEdit" />
</item>
<item>
<widget class="QPushButton" name="openButton" >
<property name="sizePolicy" >
<sizepolicy>
<hsizetype>0</hsizetype>
<vsizetype>0</vsizetype>
<sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
@ -171,27 +149,6 @@
<item>
<widget class="QGraphicsView" name="graphicsView" />
</item>
<item>
<widget class="QTextEdit" name="imageDescription" >
<property name="sizePolicy" >
<sizepolicy>
<hsizetype>0</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximumSize" >
<size>
<width>16777215</width>
<height>120</height>
</size>
</property>
<property name="readOnly" >
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="widget" >
@ -199,18 +156,12 @@
<string>Image Settings</string>
</attribute>
<layout class="QVBoxLayout" >
<property name="margin" >
<number>9</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item>
<widget class="QGroupBox" name="groupBox_5" >
<layout class="QHBoxLayout" >
<item>
<widget class="QGroupBox" name="groupBox" >
<property name="sizePolicy" >
<sizepolicy>
<hsizetype>0</hsizetype>
<vsizetype>0</vsizetype>
<sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
@ -218,15 +169,15 @@
<property name="title" >
<string>Color Mode</string>
</property>
<layout class="QVBoxLayout" >
<property name="margin" >
<number>9</number>
<property name="alignment" >
<set>Qt::AlignHCenter</set>
</property>
<layout class="QVBoxLayout" >
<property name="spacing" >
<number>0</number>
</property>
<item>
<widget class="QRadioButton" name="radioButton_3" >
<widget class="QRadioButton" name="rgbRadioButton" >
<property name="text" >
<string>RGB</string>
</property>
@ -236,7 +187,7 @@
</widget>
</item>
<item>
<widget class="QRadioButton" name="radioButton_6" >
<widget class="QRadioButton" name="normalMapRadioButton" >
<property name="text" >
<string>Normal Map</string>
</property>
@ -246,11 +197,9 @@
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox_4" >
<widget class="QGroupBox" name="alphaModeGroupBox" >
<property name="sizePolicy" >
<sizepolicy>
<hsizetype>0</hsizetype>
<vsizetype>0</vsizetype>
<sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
@ -258,10 +207,10 @@
<property name="title" >
<string>Alpha Mode</string>
</property>
<layout class="QVBoxLayout" >
<property name="margin" >
<number>9</number>
<property name="alignment" >
<set>Qt::AlignHCenter</set>
</property>
<layout class="QVBoxLayout" >
<property name="spacing" >
<number>0</number>
</property>
@ -295,16 +244,21 @@
</layout>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" >
<property name="margin" >
<number>0</number>
</property>
<property name="spacing" >
<number>0</number>
</property>
<item>
<widget class="QLabel" name="label_13" >
<widget class="QLabel" name="wrapModeLabel" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Preferred" hsizetype="Expanding" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text" >
<string>Wrap Mode:</string>
</property>
@ -342,18 +296,10 @@
</item>
<item>
<layout class="QHBoxLayout" >
<property name="margin" >
<number>0</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item>
<widget class="QLabel" name="label_5" >
<widget class="QLabel" name="inputGammaLabel" >
<property name="sizePolicy" >
<sizepolicy>
<hsizetype>7</hsizetype>
<vsizetype>0</vsizetype>
<sizepolicy vsizetype="Fixed" hsizetype="Expanding" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
@ -369,9 +315,7 @@
<item>
<widget class="QDoubleSpinBox" name="inputGammaSpinBox" >
<property name="sizePolicy" >
<sizepolicy>
<hsizetype>4</hsizetype>
<vsizetype>0</vsizetype>
<sizepolicy vsizetype="Fixed" hsizetype="Maximum" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
@ -379,12 +323,12 @@
<property name="buttonSymbols" >
<enum>QAbstractSpinBox::UpDownArrows</enum>
</property>
<property name="maximum" >
<double>4.000000000000000</double>
</property>
<property name="minimum" >
<double>0.050000000000000</double>
</property>
<property name="maximum" >
<double>4.000000000000000</double>
</property>
<property name="singleStep" >
<double>0.050000000000000</double>
</property>
@ -397,18 +341,10 @@
</item>
<item>
<layout class="QHBoxLayout" >
<property name="margin" >
<number>0</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item>
<widget class="QLabel" name="label_6" >
<widget class="QLabel" name="outputGammaLabel" >
<property name="sizePolicy" >
<sizepolicy>
<hsizetype>7</hsizetype>
<vsizetype>0</vsizetype>
<sizepolicy vsizetype="Fixed" hsizetype="Expanding" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
@ -424,9 +360,7 @@
<item>
<widget class="QDoubleSpinBox" name="outputGammaSpinBox" >
<property name="sizePolicy" >
<sizepolicy>
<hsizetype>4</hsizetype>
<vsizetype>0</vsizetype>
<sizepolicy vsizetype="Fixed" hsizetype="Maximum" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
@ -434,12 +368,12 @@
<property name="buttonSymbols" >
<enum>QAbstractSpinBox::UpDownArrows</enum>
</property>
<property name="maximum" >
<double>4.000000000000000</double>
</property>
<property name="minimum" >
<double>0.050000000000000</double>
</property>
<property name="maximum" >
<double>4.000000000000000</double>
</property>
<property name="singleStep" >
<double>0.050000000000000</double>
</property>
@ -457,8 +391,8 @@
</property>
<property name="sizeHint" >
<size>
<width>204</width>
<height>131</height>
<width>433</width>
<height>16</height>
</size>
</property>
</spacer>
@ -467,15 +401,9 @@
</widget>
<widget class="QWidget" name="widget" >
<attribute name="title" >
<string>Mipmap Settings</string>
<string>Mipmaps</string>
</attribute>
<layout class="QVBoxLayout" >
<property name="margin" >
<number>9</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item>
<widget class="QCheckBox" name="generateMipmapsCheckBox" >
<property name="text" >
@ -488,18 +416,13 @@
</item>
<item>
<layout class="QHBoxLayout" >
<property name="margin" >
<number>0</number>
</property>
<property name="spacing" >
<number>0</number>
<number>1</number>
</property>
<item>
<widget class="QLabel" name="mipmapFilterLabel" >
<property name="sizePolicy" >
<sizepolicy>
<hsizetype>7</hsizetype>
<vsizetype>5</vsizetype>
<sizepolicy vsizetype="Preferred" hsizetype="Expanding" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
@ -543,9 +466,7 @@
<bool>false</bool>
</property>
<property name="sizePolicy" >
<sizepolicy>
<hsizetype>0</hsizetype>
<vsizetype>0</vsizetype>
<sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
@ -553,7 +474,7 @@
<property name="maximumSize" >
<size>
<width>16777215</width>
<height>26</height>
<height>24</height>
</size>
</property>
<property name="autoFillBackground" >
@ -562,24 +483,19 @@
<property name="text" >
<string>...</string>
</property>
<property name="toolButtonStyle" >
<enum>Qt::ToolButtonTextOnly</enum>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" >
<property name="margin" >
<number>0</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item>
<widget class="QCheckBox" name="limitMipmapsCheckBox" >
<property name="sizePolicy" >
<sizepolicy>
<hsizetype>7</hsizetype>
<vsizetype>0</vsizetype>
<sizepolicy vsizetype="Fixed" hsizetype="Expanding" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
@ -595,9 +511,7 @@
<bool>false</bool>
</property>
<property name="sizePolicy" >
<sizepolicy>
<hsizetype>0</hsizetype>
<vsizetype>0</vsizetype>
<sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
@ -613,9 +527,7 @@
<bool>false</bool>
</property>
<property name="sizePolicy" >
<sizepolicy>
<hsizetype>0</hsizetype>
<vsizetype>0</vsizetype>
<sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
@ -647,7 +559,7 @@
</widget>
<widget class="QWidget" name="widget" >
<attribute name="title" >
<string>Normal Map Settings</string>
<string>Normal Map</string>
</attribute>
</widget>
</widget>
@ -656,22 +568,28 @@
</widget>
<widget class="QWidget" name="compressionPage" >
<layout class="QVBoxLayout" >
<property name="margin" >
<number>9</number>
<property name="leftMargin" >
<number>0</number>
</property>
<property name="spacing" >
<number>6</number>
<property name="topMargin" >
<number>0</number>
</property>
<property name="rightMargin" >
<number>0</number>
</property>
<property name="bottomMargin" >
<number>0</number>
</property>
<item>
<layout class="QHBoxLayout" >
<property name="margin" >
<number>0</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item>
<widget class="QLabel" name="label_3" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Preferred" hsizetype="Expanding" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text" >
<string>Format:</string>
</property>
@ -679,7 +597,7 @@
<enum>Qt::PlainText</enum>
</property>
<property name="textInteractionFlags" >
<enum>Qt::NoTextInteraction</enum>
<set>Qt::NoTextInteraction</set>
</property>
<property name="buddy" >
<cstring>formatComboBox</cstring>
@ -729,14 +647,14 @@
</item>
<item>
<layout class="QHBoxLayout" >
<property name="margin" >
<number>0</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item>
<widget class="QLabel" name="label_4" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Preferred" hsizetype="Expanding" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text" >
<string>Quality:</string>
</property>
@ -744,7 +662,7 @@
<enum>Qt::PlainText</enum>
</property>
<property name="textInteractionFlags" >
<enum>Qt::NoTextInteraction</enum>
<set>Qt::NoTextInteraction</set>
</property>
<property name="buddy" >
<cstring>formatComboBox</cstring>
@ -780,12 +698,25 @@
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" >
<item>
<spacer>
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" >
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QGroupBox" name="groupBox_6" >
<property name="sizePolicy" >
<sizepolicy>
<hsizetype>0</hsizetype>
<vsizetype>0</vsizetype>
<sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
@ -793,21 +724,12 @@
<property name="title" >
<string>Color Weights</string>
</property>
<property name="alignment" >
<set>Qt::AlignHCenter</set>
</property>
<layout class="QVBoxLayout" >
<property name="margin" >
<number>9</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item>
<layout class="QHBoxLayout" >
<property name="margin" >
<number>0</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item>
<widget class="QLabel" name="label_10" >
<property name="text" >
@ -835,12 +757,6 @@
</item>
<item>
<layout class="QHBoxLayout" >
<property name="margin" >
<number>0</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item>
<widget class="QLabel" name="label_11" >
<property name="text" >
@ -868,12 +784,6 @@
</item>
<item>
<layout class="QHBoxLayout" >
<property name="margin" >
<number>0</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item>
<widget class="QLabel" name="label_12" >
<property name="text" >
@ -901,12 +811,6 @@
</item>
<item>
<layout class="QHBoxLayout" >
<property name="margin" >
<number>0</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item>
<widget class="QPushButton" name="uniformButton" >
<property name="maximumSize" >
@ -947,6 +851,21 @@
</layout>
</widget>
</item>
<item>
<spacer>
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" >
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item>
<spacer>
<property name="orientation" >
@ -954,8 +873,8 @@
</property>
<property name="sizeHint" >
<size>
<width>20</width>
<height>191</height>
<width>484</width>
<height>31</height>
</size>
</property>
</spacer>
@ -965,20 +884,20 @@
<widget class="QWidget" name="outputPage" />
<widget class="QWidget" name="previewPage" >
<layout class="QVBoxLayout" >
<property name="margin" >
<number>9</number>
<property name="leftMargin" >
<number>0</number>
</property>
<property name="spacing" >
<number>6</number>
<property name="topMargin" >
<number>0</number>
</property>
<property name="rightMargin" >
<number>0</number>
</property>
<property name="bottomMargin" >
<number>0</number>
</property>
<item>
<layout class="QHBoxLayout" >
<property name="margin" >
<number>0</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item>
<widget class="QGraphicsView" name="graphicsView_2" />
</item>
@ -986,12 +905,6 @@
</item>
<item>
<layout class="QHBoxLayout" >
<property name="margin" >
<number>0</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item>
<widget class="QCheckBox" name="filterCheckBox" >
<property name="text" >
@ -1026,12 +939,6 @@
</item>
<item>
<layout class="QHBoxLayout" >
<property name="margin" >
<number>0</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item>
<widget class="QPushButton" name="pushButton_6" >
<property name="text" >