From f3a73e3de57663e20a350fd9b0c99759501cd15b Mon Sep 17 00:00:00 2001 From: castano Date: Mon, 7 Jan 2008 07:27:09 +0000 Subject: [PATCH] Small progress with ui. --- src/nvtt/tools/configdialog.cpp | 12 +- src/nvtt/tools/configdialog.h | 1 + src/nvtt/tools/configdialog.ui | 761 ++++++++++++++------------------ 3 files changed, 346 insertions(+), 428 deletions(-) diff --git a/src/nvtt/tools/configdialog.cpp b/src/nvtt/tools/configdialog.cpp index d08c62a..885baa5 100644 --- a/src/nvtt/tools/configdialog.cpp +++ b/src/nvtt/tools/configdialog.cpp @@ -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) diff --git a/src/nvtt/tools/configdialog.h b/src/nvtt/tools/configdialog.h index f68201d..3c44073 100644 --- a/src/nvtt/tools/configdialog.h +++ b/src/nvtt/tools/configdialog.h @@ -48,6 +48,7 @@ protected slots: void uniformWeightToggled(bool checked); void luminanceWeightToggled(bool checked); + void normalMapModeChanged(bool checked); bool open(QString fileName); diff --git a/src/nvtt/tools/configdialog.ui b/src/nvtt/tools/configdialog.ui index 30dae34..a002798 100644 --- a/src/nvtt/tools/configdialog.ui +++ b/src/nvtt/tools/configdialog.ui @@ -5,8 +5,8 @@ 0 0 - 591 - 510 + 674 + 475 @@ -19,28 +19,10 @@ true - - 9 - - - 6 - - - 0 - - - 6 - - - 0 - - - 6 - @@ -103,28 +85,38 @@ - - 7 - 7 + 0 0 - 0 + 3 - - 9 - - 6 + -1 + + + 0 + + + 0 + + + 0 + + + 0 - 2 + 0 + + + Qt::ElideNone false @@ -134,29 +126,15 @@ File Path - - 9 - - - 6 - - - 0 - - - 6 - - - 0 - 0 + 0 0 @@ -171,27 +149,6 @@ - - - - - 0 - 0 - 0 - 0 - - - - - 16777215 - 120 - - - - true - - - @@ -199,112 +156,109 @@ Image Settings - - 9 - - - 6 - - - - - 0 - 0 - 0 - 0 - - - - Color Mode - - - - 9 - - - 0 - - - - - RGB - - - true - - - - - - - Normal Map - - - - - - - - - - - 0 - 0 - 0 - 0 - - - - Alpha Mode - - - - 9 - - - 0 - - - - - None - - - false - - - - - - - Transparency - - - true + + + + + + 0 + 0 + + + + Color Mode + + + Qt::AlignHCenter + + + + 0 - - - - - - Premultiplied + + + + RGB + + + true + + + + + + + Normal Map + + + + + + + + + + + 0 + 0 + + + + Alpha Mode + + + Qt::AlignHCenter + + + + 0 - - - - + + + + None + + + false + + + + + + + Transparency + + + true + + + + + + + Premultiplied + + + + + + + - - 0 - 0 - + + + + 0 + 0 + + Wrap Mode: @@ -342,18 +296,10 @@ - - 0 - - - 6 - - + - - 7 - 0 + 0 0 @@ -369,9 +315,7 @@ - - 4 - 0 + 0 0 @@ -379,12 +323,12 @@ QAbstractSpinBox::UpDownArrows - - 4.000000000000000 - 0.050000000000000 + + 4.000000000000000 + 0.050000000000000 @@ -397,18 +341,10 @@ - - 0 - - - 6 - - + - - 7 - 0 + 0 0 @@ -424,9 +360,7 @@ - - 4 - 0 + 0 0 @@ -434,12 +368,12 @@ QAbstractSpinBox::UpDownArrows - - 4.000000000000000 - 0.050000000000000 + + 4.000000000000000 + 0.050000000000000 @@ -457,8 +391,8 @@ - 204 - 131 + 433 + 16 @@ -467,15 +401,9 @@ - Mipmap Settings + Mipmaps - - 9 - - - 6 - @@ -488,18 +416,13 @@ - - 0 - - 0 + 1 - - 7 - 5 + 0 0 @@ -543,9 +466,7 @@ false - - 0 - 0 + 0 0 @@ -553,7 +474,7 @@ 16777215 - 26 + 24 @@ -562,24 +483,19 @@ ... + + Qt::ToolButtonTextOnly + - - 0 - - - 6 - - - 7 - 0 + 0 0 @@ -595,9 +511,7 @@ false - - 0 - 0 + 0 0 @@ -613,9 +527,7 @@ false - - 0 - 0 + 0 0 @@ -647,7 +559,7 @@ - Normal Map Settings + Normal Map @@ -656,22 +568,28 @@ - - 9 + + 0 - - 6 + + 0 + + + 0 + + + 0 - - 0 - - - 6 - + + + 0 + 0 + + Format: @@ -679,7 +597,7 @@ Qt::PlainText - Qt::NoTextInteraction + Qt::NoTextInteraction formatComboBox @@ -729,14 +647,14 @@ - - 0 - - - 6 - + + + 0 + 0 + + Quality: @@ -744,7 +662,7 @@ Qt::PlainText - Qt::NoTextInteraction + Qt::NoTextInteraction formatComboBox @@ -781,171 +699,172 @@ - - - - 0 - 0 - 0 - 0 - - - - Color Weights - - - - 9 - - - 6 - - - - - 0 - - - 6 - - - - - Red - - - redSpinBox - - - - - - - 1.000000000000000 - - - 0.050000000000000 - - - 1.000000000000000 - - - - - - - - - 0 - - - 6 - - - - - Green - - - greenSpinBox - - - - - - - 1.000000000000000 - - - 0.050000000000000 - - - 1.000000000000000 - - - - - - - - - 0 - - - 6 - + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 0 + 0 + + + + Color Weights + + + Qt::AlignHCenter + + - - - Blue - - - blueSpinBox - - + + + + + Red + + + redSpinBox + + + + + + + 1.000000000000000 + + + 0.050000000000000 + + + 1.000000000000000 + + + + - - - 1.000000000000000 - - - 0.050000000000000 - - - 1.000000000000000 - - + + + + + Green + + + greenSpinBox + + + + + + + 1.000000000000000 + + + 0.050000000000000 + + + 1.000000000000000 + + + + - - - - - - 0 - - - 6 - - - - - 16777215 - 22 - - - - Uniform Weights - - - true - - - true - - + + + + + Blue + + + blueSpinBox + + + + + + + 1.000000000000000 + + + 0.050000000000000 + + + 1.000000000000000 + + + + - - - - 16777215 - 22 - - - - Luminance Weights - - - true - - + + + + + + 16777215 + 22 + + + + Uniform Weights + + + true + + + true + + + + + + + + 16777215 + 22 + + + + Luminance Weights + + + true + + + + - - - + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + @@ -954,8 +873,8 @@ - 20 - 191 + 484 + 31 @@ -965,20 +884,20 @@ - - 9 + + 0 - - 6 + + 0 + + + 0 + + + 0 - - 0 - - - 6 - @@ -986,12 +905,6 @@ - - 0 - - - 6 - @@ -1026,12 +939,6 @@ - - 0 - - - 6 -