* @param parent NULL or the parent (who destroys the objects at the end)
*/
MainWindow::MainWindow(const QString& homeDir, QWidget *parent) :
- QMainWindow(parent),
- m_homeDir(homeDir),
- m_storageFile(),
- ui(new Ui::MainWindow),
- m_converter(NULL){
+ QMainWindow(parent),
+ m_homeDir(homeDir),
+ m_storageFile(),
+ ui(new Ui::MainWindow),
+ m_converter(NULL),
+ m_logger(),
+ m_guiQueue(),
+ m_guiTimer(new QTimer(this)){
ui->setupUi(this);
initializeHome();
- switchRun(true);
+ startStop(true);
m_statusMessage = new QLabel(tr("Welcome at reimgconvert"));
statusBar()->addWidget(m_statusMessage);
connect(ui->actionSelectDestination, SIGNAL(triggered()), this,
- SLOT(selectDestination()));
+ SLOT(selectDestination()));
connect(ui->pushButtonSelectDest, SIGNAL(clicked()), this,
- SLOT(selectDestination()));
+ SLOT(selectDestination()));
connect(ui->actionSelectSource, SIGNAL(triggered()), this,
- SLOT(selectSource()));
+ SLOT(selectSource()));
connect(ui->pushButtonSelectDest, SIGNAL(clicked()), this,
- SLOT(selectDestination()));
+ SLOT(selectDestination()));
connect(ui->actionAbout, SIGNAL(triggered()), this, SLOT(about()));
restoreState();
connect(ui->comboBoxTemplate, SIGNAL(currentIndexChanged(const QString&)),
- this, SLOT(on_templateChangeIndex(const QString&)));
+ this, SLOT(on_templateChangeIndex(const QString&)));
connect(ui->pushButtonActivate, SIGNAL(clicked()), this, SLOT(activate()));
+ connect(m_guiTimer, SIGNAL(timeout()), this, SLOT(guiTimerUpdate()));
restoreState();
+ m_guiTimer->start(100);
}
/**
*/
void MainWindow::setMaxDimensions(int maxWidth, int maxHeight){
if (maxWidth > maxHeight){
- ui->comboBoxLandscapeX->setCurrentText(QString::number(maxWidth));
- ui->comboBoxLandscapeY->setCurrentText("*");
- ui->comboBoxPortraitX->setCurrentText("*");
- ui->comboBoxPortraitY->setCurrentText(QString::number(maxHeight));
- ui->comboBoxSquareX->setCurrentText(QString::number(maxHeight));
+ ui->comboBoxLandscapeX->setCurrentText(QString::number(maxWidth));
+ ui->comboBoxLandscapeY->setCurrentText("*");
+ ui->comboBoxPortraitX->setCurrentText("*");
+ ui->comboBoxPortraitY->setCurrentText(QString::number(maxHeight));
+ ui->comboBoxSquareX->setCurrentText(QString::number(maxHeight));
}else{
- ui->comboBoxLandscapeY->setCurrentText(QString::number(maxHeight));
- ui->comboBoxLandscapeX->setCurrentText("*");
- ui->comboBoxPortraitY->setCurrentText("*");
- ui->comboBoxPortraitX->setCurrentText(QString::number(maxWidth));
- ui->comboBoxSquareX->setCurrentText(QString::number(maxWidth));
+ ui->comboBoxLandscapeY->setCurrentText(QString::number(maxHeight));
+ ui->comboBoxLandscapeX->setCurrentText("*");
+ ui->comboBoxPortraitY->setCurrentText("*");
+ ui->comboBoxPortraitX->setCurrentText(QString::number(maxWidth));
+ ui->comboBoxSquareX->setCurrentText(QString::number(maxWidth));
}
}
*/
void MainWindow::selectDestination(){
QString dir = QFileDialog::getExistingDirectory(this,
- tr("Select Destination Directory"), ui->comboBoxTarget->currentText(),
- QFileDialog::ShowDirsOnly);
+ tr("Select Destination Directory"), ui->comboBoxTarget->currentText(),
+ QFileDialog::ShowDirsOnly);
if (!dir.isEmpty())
- ui->comboBoxTarget->setCurrentText(dir);
+ ui->comboBoxTarget->setCurrentText(dir);
}
/**
*/
void MainWindow::selectSource(){
QString dir = QFileDialog::getExistingDirectory(this,
- tr("Select Source Directory"), ui->comboBoxSourceDir->currentText(),
- QFileDialog::ShowDirsOnly);
+ tr("Select Source Directory"), ui->comboBoxSourceDir->currentText(),
+ QFileDialog::ShowDirsOnly);
if (!dir.isEmpty())
- ui->comboBoxSourceDir->setCurrentText(dir);
+ ui->comboBoxSourceDir->setCurrentText(dir);
}
/**
dialog.exec();
}
+/**
+ * Callback method of the GUI timer.
+ */
+void MainWindow::guiTimerUpdate()
+{
+ int count = m_guiQueue.count();
+ while(count-- > 0){
+ ReGuiQueueItem item = m_guiQueue.popFront();
+ if (item.m_type == ReGuiQueueItem::Undef)
+ break;
+ if (! item.apply()){
+ switch (item.m_type){
+ case ReGuiQueueItem::ListEnd:
+ ui->listWidget->addItem(item.m_value);
+ break;
+ case ReGuiQueueItem::ReadyMessage:
+ say(LOG_INFO, item.m_value);
+ startStop(false);
+ break;
+ case ReGuiQueueItem::LogMessage:
+ say(LOG_INFO, item.m_value);
+ break;
+ default:
+ say(LOG_ERROR, "unknown item type: " + QString::number(item.m_type)
+ + " " + item.m_value);
+ break;
+ }
+
+ }
+ }
+}
/**
* initializeHomeializes the program home directory.
*/
void MainWindow::initializeHome(){
if (m_homeDir.isEmpty()){
- m_homeDir = QDir::home().absoluteFilePath(".reimgconvert");
+ m_homeDir = QDir::home().absoluteFilePath(".reimgconvert");
}
QDir home(m_homeDir);
if (!home.exists()){
- if (!home.mkpath(m_homeDir)){
- m_homeDir = home.tempPath() + "/.reimgconvert";
- home.mkpath(m_homeDir);
- }
+ if (!home.mkpath(m_homeDir)){
+ m_homeDir = home.tempPath() + "/.reimgconvert";
+ home.mkpath(m_homeDir);
+ }
}
if (!m_homeDir.endsWith("/"))
- m_homeDir += "/";
+ m_homeDir += "/";
m_storageFile = m_homeDir + "state.conf";
restoreState();
}
selection.setFileMode(QFileDialog::DirectoryOnly);
QString dir = ui->comboBoxSourceDir->currentText();
if (!dir.isEmpty())
- selection.setDirectory(dir);
+ selection.setDirectory(dir);
if (selection.exec())
- ui->comboBoxSourceDir->setCurrentText(selection.selectedFiles().at(0));
+ ui->comboBoxSourceDir->setCurrentText(selection.selectedFiles().at(0));
}
/**
* @brief Handles the button click on "convert".
*/
void MainWindow::on_pushButtonConvert_clicked(){
- switchRun(false);
+ startStop(true);
delete m_converter;
m_errors = 0;
int landscapeX = comboInt(ui->comboBoxLandscapeX, 0, "*", 0);
int squareX = comboInt(ui->comboBoxSquareX, 0);
int quality = comboInt(ui->comboBoxQuality, 70);
if (m_errors == 0){
- m_converter = new Converter(ui->comboBoxSourceDir->currentText(),
- ui->comboBoxLandscapeX->currentText(),
- ui->comboBoxSourcePattern->currentText(),
- ui->comboBoxDestType->currentText(), landscapeX, landscapeY, portraitX,
- portraitY, squareX, quality, this);
- // start the thread:
- m_converter->start();
+ m_converter = new Converter(ui->comboBoxSourceDir->currentText(),
+ ui->comboBoxLandscapeX->currentText(),
+ ui->comboBoxSourcePattern->currentText(),
+ ui->comboBoxDestType->currentText(), landscapeX, landscapeY, portraitX,
+ portraitY, squareX, quality, this);
+ // start the thread:
+ m_converter->start();
}
}
/**
* @brief Handles the event "thread changed".
*
+ * Note: this method is called from a non main thread
+ *
* @param state the new state of the thread
* @param info info about the new state. Not used
*/
-void MainWindow::on_threadStateChanged(Converter::State state, const QString&){
+void MainWindow::on_threadStateChanged(Converter::State state, const QString& info){
switch (state) {
case Converter::STATE_READY:
- ui->pushButtonConvert->show();
- ui->pushButtonStop->hide();
- //ui->statusBar->showMessage(info);
- break;
+ m_guiQueue.pushBack(ReGuiQueueItem(ReGuiQueueItem::ReadyMessage, NULL, info));
+ ui->pushButtonStop->hide();
+ //ui->statusBar->showMessage(info);
+ break;
case Converter::STATE_SUB_TASK_STOPPED:
- //ui->statusBar->showMessage(info);
- break;
+ //ui->statusBar->showMessage(info);
+ break;
case Converter::STATE_STARTING:
default:
- break;
+ break;
}
}
/**
* @brief Logs a message
*
+ * Note: used by non main threads
+ *
* @param message the message to log
* @return <code>true</code>
*/
bool MainWindow::logAppendLast(const QString& message){
+ m_guiQueue.pushBack(ReGuiQueueItem(ReGuiQueueItem::ListEnd, ui->listWidget, message));
QListWidgetItem* item = ui->listWidget->item(0);
item->setText(item->text() + " " + message);
return true;
* Reads the history of the widget values and other parameters and set it.
*/
void MainWindow::restoreState(){
- ReStateStorage storage(m_storageFile);
+ ReStateStorage storage(m_storageFile, &m_logger);
storage.setForm("main");
storage.restore(ui->comboBoxMaxHeight, "comboBoxMaxHeight", true);
storage.restore(ui->comboBoxMaxWidth, "comboBoxMaxWidth", true);
* Stores the history of the widget values and other parameters.
*/
void MainWindow::saveState(){
- ReStateStorage storage(m_storageFile);
+ ReStateStorage storage(m_storageFile, &m_logger);
storage.setForm("main");
storage.store(ui->comboBoxMaxHeight, "comboBoxMaxHeight");
storage.store(ui->comboBoxMaxWidth, "comboBoxMaxWidth");
}
/**
- * Enables/disables the buttons/actions relevant for running.
+ * Starts or stops the search.
*
- * @param runActive <code>true</code>: the conversion is possible
+ * @param start <code>true</code>: the search should start
*/
-void MainWindow::switchRun(bool runActive){
- if (runActive){
- ui->pushButtonConvert->show();
- ui->pushButtonStop->hide();
- }else{
- ui->pushButtonConvert->hide();
- ui->pushButtonStop->show();
- }
- ui->actionConvert->setEnabled(runActive);
- ui->actionStop->setEnabled(not runActive);
+void MainWindow::startStop(bool isStart){
+ ui->actionStart->setEnabled(!isStart);
+ ui->actionStop->setEnabled(isStart);
+ ui->pushButtonConvert->setEnabled(! isStart);
+ ui->pushButtonStop->setEnabled(isStart);
+}
+
+/**
+ * Issues a message.
+ *
+ * @param level type of the message
+ * @param message message to issue
+ * @return <code>level == LOG_ERROR</code>
+ */
+bool MainWindow::say(ReLoggerLevel level, const QString& message)
+{
+ if (level == LOG_ERROR || level == LOG_WARNING)
+ error(message);
+ else
+ log(message);
+ return level == LOG_ERROR;
}
<rect>
<x>0</x>
<y>0</y>
- <width>799</width>
- <height>651</height>
+ <width>823</width>
+ <height>783</height>
</rect>
</property>
<property name="minimumSize">
<string>ReImgConvert</string>
</property>
<widget class="QWidget" name="centralWidget">
- <widget class="QWidget" name="widget" native="true">
- <property name="geometry">
- <rect>
- <x>11</x>
- <y>11</y>
- <width>787</width>
- <height>647</height>
- </rect>
- </property>
- <layout class="QVBoxLayout" name="verticalLayout">
- <item>
- <widget class="QTabWidget" name="tabWidget">
- <property name="minimumSize">
- <size>
- <width>0</width>
- <height>150</height>
- </size>
- </property>
- <property name="maximumSize">
- <size>
- <width>16777215</width>
- <height>150</height>
- </size>
- </property>
- <property name="currentIndex">
- <number>0</number>
- </property>
- <widget class="QWidget" name="tab_2">
- <attribute name="title">
- <string>Dimensions (quick)</string>
- </attribute>
- <layout class="QVBoxLayout" name="verticalLayout_6">
- <item>
- <layout class="QHBoxLayout" name="horizontalLayout_4">
- <item>
- <widget class="QLabel" name="label_2">
- <property name="minimumSize">
- <size>
- <width>100</width>
- <height>0</height>
- </size>
- </property>
- <property name="maximumSize">
- <size>
- <width>100</width>
- <height>16777215</height>
- </size>
- </property>
- <property name="text">
- <string>Template:</string>
- </property>
- </widget>
- </item>
+ <layout class="QVBoxLayout" name="verticalLayout_3">
+ <item>
+ <widget class="QWidget" name="widget" native="true">
+ <layout class="QVBoxLayout" name="verticalLayout">
+ <item>
+ <widget class="QTabWidget" name="tabWidget">
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>150</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>16777215</width>
+ <height>150</height>
+ </size>
+ </property>
+ <property name="currentIndex">
+ <number>0</number>
+ </property>
+ <widget class="QWidget" name="tab_2">
+ <attribute name="title">
+ <string>Dimensions (quick)</string>
+ </attribute>
+ <layout class="QVBoxLayout" name="verticalLayout_6">
<item>
- <widget class="QComboBox" name="comboBoxTemplate">
- <item>
- <property name="text">
- <string>Website: 1024x768</string>
- </property>
- </item>
+ <layout class="QHBoxLayout" name="horizontalLayout_4">
<item>
- <property name="text">
- <string>Website II: 800x600</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>Photo: 2048x1536</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>Photo II: 3072x2304</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>Midi: 600x400</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>Mini: 150x100</string>
- </property>
- </item>
- </widget>
- </item>
- </layout>
- </item>
- <item>
- <layout class="QHBoxLayout" name="horizontalLayout_5">
- <item>
- <layout class="QFormLayout" name="formLayout_7">
- <item row="0" column="0">
- <widget class="QLabel" name="label_14">
+ <widget class="QLabel" name="label_2">
<property name="minimumSize">
<size>
<width>100</width>
</size>
</property>
<property name="text">
- <string>Max. Width:</string>
+ <string>Template:</string>
</property>
</widget>
</item>
- <item row="0" column="1">
- <widget class="QComboBox" name="comboBoxMaxWidth">
+ <item>
+ <widget class="QComboBox" name="comboBoxTemplate">
<property name="minimumSize">
<size>
- <width>100</width>
+ <width>315</width>
<height>0</height>
</size>
</property>
- <property name="maximumSize">
+ <item>
+ <property name="text">
+ <string>Website: 1024x768</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Website II: 800x600</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Photo: 2048x1536</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Photo II: 3072x2304</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Midi: 600x400</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Mini: 150x100</string>
+ </property>
+ </item>
+ </widget>
+ </item>
+ <item>
+ <spacer name="horizontalSpacer_6">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
<size>
- <width>100</width>
- <height>16777215</height>
+ <width>40</width>
+ <height>20</height>
</size>
</property>
- <property name="editable">
- <bool>true</bool>
- </property>
- </widget>
+ </spacer>
</item>
</layout>
</item>
<item>
- <spacer name="horizontalSpacer_6">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>40</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- <item>
- <layout class="QFormLayout" name="formLayout_8">
- <item row="0" column="0">
- <widget class="QLabel" name="label_15">
- <property name="minimumSize">
- <size>
- <width>100</width>
- <height>0</height>
- </size>
- </property>
- <property name="maximumSize">
- <size>
- <width>100</width>
- <height>16777215</height>
- </size>
- </property>
+ <layout class="QHBoxLayout" name="horizontalLayout_5">
+ <item>
+ <layout class="QFormLayout" name="formLayout_7">
+ <item row="0" column="0">
+ <widget class="QLabel" name="label_14">
+ <property name="minimumSize">
+ <size>
+ <width>100</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>100</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>Max. Width:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1">
+ <widget class="QComboBox" name="comboBoxMaxWidth">
+ <property name="minimumSize">
+ <size>
+ <width>100</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>100</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="editable">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <layout class="QFormLayout" name="formLayout_8">
+ <item row="0" column="0">
+ <widget class="QLabel" name="label_15">
+ <property name="minimumSize">
+ <size>
+ <width>100</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>100</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>Max. Height:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1">
+ <widget class="QComboBox" name="comboBoxMaxHeight">
+ <property name="minimumSize">
+ <size>
+ <width>100</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>100</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="editable">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <widget class="QPushButton" name="pushButtonActivate">
<property name="text">
- <string>Max. Height:</string>
+ <string>&Activate template</string>
</property>
</widget>
</item>
- <item row="0" column="1">
- <widget class="QComboBox" name="comboBoxMaxHeight">
- <property name="minimumSize">
- <size>
- <width>100</width>
- <height>0</height>
- </size>
+ <item>
+ <spacer name="horizontalSpacer_5">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
</property>
- <property name="maximumSize">
+ <property name="sizeHint" stdset="0">
<size>
- <width>100</width>
- <height>16777215</height>
+ <width>40</width>
+ <height>20</height>
</size>
</property>
- <property name="editable">
- <bool>true</bool>
- </property>
- </widget>
+ </spacer>
</item>
</layout>
</item>
+ </layout>
+ </widget>
+ <widget class="QWidget" name="tab">
+ <attribute name="title">
+ <string>Dimensions (separated)</string>
+ </attribute>
+ <layout class="QHBoxLayout" name="horizontalLayout_3">
<item>
- <spacer name="horizontalSpacer_5">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
+ <widget class="QGroupBox" name="groupBox">
+ <property name="minimumSize">
+ <size>
+ <width>230</width>
+ <height>100</height>
+ </size>
</property>
- <property name="sizeHint" stdset="0">
+ <property name="maximumSize">
<size>
- <width>40</width>
- <height>20</height>
+ <width>230</width>
+ <height>100</height>
</size>
</property>
- </spacer>
- </item>
- <item>
- <widget class="QPushButton" name="pushButtonActivate">
- <property name="text">
- <string>&Activate</string>
+ <property name="title">
+ <string>Portrait:</string>
</property>
- </widget>
- </item>
- </layout>
- </item>
- </layout>
- </widget>
- <widget class="QWidget" name="tab">
- <attribute name="title">
- <string>Dimensions (separated)</string>
- </attribute>
- <layout class="QHBoxLayout" name="horizontalLayout_3">
- <item>
- <widget class="QGroupBox" name="groupBox">
- <property name="minimumSize">
- <size>
- <width>230</width>
- <height>100</height>
- </size>
- </property>
- <property name="maximumSize">
- <size>
- <width>230</width>
- <height>100</height>
- </size>
- </property>
- <property name="title">
- <string>Portrait:</string>
- </property>
- <widget class="QWidget" name="layoutWidget1">
- <property name="geometry">
- <rect>
- <x>2</x>
- <y>30</y>
- <width>221</width>
- <height>61</height>
- </rect>
- </property>
- <layout class="QFormLayout" name="formLayout">
- <item row="0" column="0">
- <widget class="QLabel" name="label_9">
- <property name="minimumSize">
- <size>
- <width>100</width>
- <height>0</height>
- </size>
- </property>
- <property name="maximumSize">
- <size>
- <width>100</width>
- <height>16777215</height>
- </size>
- </property>
- <property name="text">
- <string>Max. Width:</string>
- </property>
- </widget>
- </item>
- <item row="0" column="1">
- <widget class="QComboBox" name="comboBoxPortraitX">
- <property name="minimumSize">
- <size>
- <width>100</width>
- <height>0</height>
- </size>
- </property>
- <property name="maximumSize">
- <size>
- <width>100</width>
- <height>16777215</height>
- </size>
- </property>
- <property name="editable">
- <bool>true</bool>
- </property>
- </widget>
- </item>
- <item row="1" column="0">
- <widget class="QLabel" name="label">
- <property name="minimumSize">
- <size>
- <width>100</width>
- <height>0</height>
- </size>
- </property>
- <property name="maximumSize">
- <size>
- <width>100</width>
- <height>16777215</height>
- </size>
- </property>
- <property name="text">
- <string>Max. Height:</string>
- </property>
- </widget>
- </item>
- <item row="1" column="1">
- <widget class="QComboBox" name="comboBoxPortraitY">
- <property name="minimumSize">
- <size>
- <width>100</width>
- <height>0</height>
- </size>
- </property>
- <property name="maximumSize">
- <size>
- <width>100</width>
- <height>16777215</height>
- </size>
- </property>
- <property name="editable">
- <bool>true</bool>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </widget>
- </item>
- <item>
- <spacer name="horizontalSpacer">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>48</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- <item>
- <widget class="QGroupBox" name="groupBox_2">
- <property name="minimumSize">
- <size>
- <width>230</width>
- <height>100</height>
- </size>
- </property>
- <property name="maximumSize">
- <size>
- <width>230</width>
- <height>100</height>
- </size>
- </property>
- <property name="title">
- <string>Landscape:</string>
- </property>
- <widget class="QWidget" name="layoutWidget2">
- <property name="geometry">
- <rect>
- <x>3</x>
- <y>31</y>
- <width>221</width>
- <height>61</height>
- </rect>
- </property>
- <layout class="QFormLayout" name="formLayout_2">
- <item row="0" column="0">
- <widget class="QLabel" name="label_3">
- <property name="minimumSize">
- <size>
- <width>100</width>
- <height>0</height>
- </size>
- </property>
- <property name="maximumSize">
- <size>
- <width>100</width>
- <height>16777215</height>
- </size>
- </property>
- <property name="text">
- <string>Max. Width:</string>
- </property>
- </widget>
- </item>
- <item row="0" column="1">
- <widget class="QComboBox" name="comboBoxLandscapeX">
- <property name="minimumSize">
- <size>
- <width>100</width>
- <height>0</height>
- </size>
- </property>
- <property name="maximumSize">
- <size>
- <width>100</width>
- <height>16777215</height>
- </size>
- </property>
- <property name="editable">
- <bool>true</bool>
- </property>
- </widget>
- </item>
- <item row="1" column="0">
- <widget class="QLabel" name="label_4">
- <property name="minimumSize">
- <size>
- <width>100</width>
- <height>0</height>
- </size>
- </property>
- <property name="maximumSize">
- <size>
- <width>100</width>
- <height>16777215</height>
- </size>
- </property>
- <property name="text">
- <string>Max. Height:</string>
- </property>
- </widget>
- </item>
- <item row="1" column="1">
- <widget class="QComboBox" name="comboBoxLandscapeY">
- <property name="minimumSize">
- <size>
- <width>100</width>
- <height>0</height>
- </size>
- </property>
- <property name="maximumSize">
- <size>
- <width>100</width>
- <height>16777215</height>
- </size>
- </property>
- <property name="editable">
- <bool>true</bool>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </widget>
- </item>
- <item>
- <spacer name="horizontalSpacer_2">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>47</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- <item>
- <widget class="QGroupBox" name="groupBox_3">
- <property name="minimumSize">
- <size>
- <width>150</width>
- <height>100</height>
- </size>
- </property>
- <property name="maximumSize">
- <size>
- <width>150</width>
- <height>100</height>
- </size>
- </property>
- <property name="title">
- <string>Square:</string>
- </property>
- <widget class="QComboBox" name="comboBoxSquareX">
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>60</y>
- <width>100</width>
- <height>26</height>
- </rect>
- </property>
- <property name="minimumSize">
- <size>
- <width>100</width>
- <height>0</height>
- </size>
- </property>
- <property name="maximumSize">
- <size>
- <width>100</width>
- <height>16777215</height>
- </size>
- </property>
- <property name="editable">
- <bool>true</bool>
- </property>
- </widget>
- <widget class="QLabel" name="label_5">
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>40</y>
- <width>141</width>
- <height>18</height>
- </rect>
- </property>
- <property name="text">
- <string>Max. Width/Height:</string>
- </property>
- </widget>
- </widget>
- </item>
- </layout>
- <zorder>groupBox_2</zorder>
- <zorder>groupBox_3</zorder>
- <zorder>groupBox</zorder>
- <zorder>horizontalSpacer</zorder>
- </widget>
- </widget>
- </item>
- <item>
- <widget class="QGroupBox" name="groupBox_4">
- <property name="minimumSize">
- <size>
- <width>0</width>
- <height>150</height>
- </size>
- </property>
- <property name="maximumSize">
- <size>
- <width>16777215</width>
- <height>150</height>
- </size>
- </property>
- <property name="title">
- <string>Others:</string>
- </property>
- <layout class="QVBoxLayout" name="verticalLayout_3" stretch="1,0">
- <property name="sizeConstraint">
- <enum>QLayout::SetFixedSize</enum>
- </property>
- <item>
- <layout class="QHBoxLayout" name="horizontalLayout_7">
- <item>
- <layout class="QFormLayout" name="formLayout_3">
- <item row="0" column="0">
- <widget class="QLabel" name="label_6">
- <property name="minimumSize">
- <size>
- <width>100</width>
- <height>0</height>
- </size>
- </property>
- <property name="maximumSize">
- <size>
- <width>100</width>
- <height>16777215</height>
- </size>
- </property>
- <property name="text">
- <string>Quality (%)</string>
+ <widget class="QWidget" name="layoutWidget1">
+ <property name="geometry">
+ <rect>
+ <x>2</x>
+ <y>30</y>
+ <width>221</width>
+ <height>65</height>
+ </rect>
</property>
+ <layout class="QFormLayout" name="formLayout">
+ <item row="0" column="0">
+ <widget class="QLabel" name="label_9">
+ <property name="minimumSize">
+ <size>
+ <width>100</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>100</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>Max. Width:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1">
+ <widget class="QComboBox" name="comboBoxPortraitX">
+ <property name="minimumSize">
+ <size>
+ <width>100</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>100</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="editable">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0">
+ <widget class="QLabel" name="label">
+ <property name="minimumSize">
+ <size>
+ <width>100</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>100</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>Max. Height:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1">
+ <widget class="QComboBox" name="comboBoxPortraitY">
+ <property name="minimumSize">
+ <size>
+ <width>100</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>100</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="editable">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ </layout>
</widget>
- </item>
- <item row="0" column="1">
- <widget class="QComboBox" name="comboBoxQuality">
- <property name="minimumSize">
- <size>
- <width>100</width>
- <height>0</height>
- </size>
- </property>
- <property name="maximumSize">
- <size>
- <width>100</width>
- <height>16777215</height>
- </size>
- </property>
- <property name="editable">
- <bool>true</bool>
+ </widget>
+ </item>
+ <item>
+ <widget class="QGroupBox" name="groupBox_2">
+ <property name="minimumSize">
+ <size>
+ <width>230</width>
+ <height>100</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>230</width>
+ <height>100</height>
+ </size>
+ </property>
+ <property name="title">
+ <string>Landscape:</string>
+ </property>
+ <widget class="QWidget" name="layoutWidget2">
+ <property name="geometry">
+ <rect>
+ <x>3</x>
+ <y>31</y>
+ <width>221</width>
+ <height>65</height>
+ </rect>
</property>
+ <layout class="QFormLayout" name="formLayout_2">
+ <item row="0" column="0">
+ <widget class="QLabel" name="label_3">
+ <property name="minimumSize">
+ <size>
+ <width>100</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>100</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>Max. Width:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1">
+ <widget class="QComboBox" name="comboBoxLandscapeX">
+ <property name="minimumSize">
+ <size>
+ <width>100</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>100</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="editable">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0">
+ <widget class="QLabel" name="label_4">
+ <property name="minimumSize">
+ <size>
+ <width>100</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>100</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>Max. Height:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1">
+ <widget class="QComboBox" name="comboBoxLandscapeY">
+ <property name="minimumSize">
+ <size>
+ <width>100</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>100</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="editable">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ </layout>
</widget>
- </item>
- </layout>
- </item>
- <item>
- <spacer name="horizontalSpacer_4">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>40</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- <item>
- <layout class="QFormLayout" name="formLayout_5">
- <property name="fieldGrowthPolicy">
- <enum>QFormLayout::AllNonFixedFieldsGrow</enum>
- </property>
- <item row="0" column="0">
- <widget class="QLabel" name="label_10">
- <property name="minimumSize">
- <size>
- <width>100</width>
- <height>0</height>
- </size>
- </property>
- <property name="maximumSize">
- <size>
+ </widget>
+ </item>
+ <item>
+ <widget class="QGroupBox" name="groupBox_3">
+ <property name="minimumSize">
+ <size>
+ <width>150</width>
+ <height>100</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>150</width>
+ <height>100</height>
+ </size>
+ </property>
+ <property name="title">
+ <string>Square:</string>
+ </property>
+ <widget class="QComboBox" name="comboBoxSquareX">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>60</y>
<width>100</width>
- <height>16777215</height>
- </size>
- </property>
- <property name="text">
- <string>File Pattern:</string>
+ <height>26</height>
+ </rect>
</property>
- </widget>
- </item>
- <item row="0" column="1">
- <widget class="QComboBox" name="comboBoxSourcePattern">
<property name="minimumSize">
<size>
<width>100</width>
<height>16777215</height>
</size>
</property>
- <property name="toolTip">
- <string>A pattern of the source files with wildcards '*' (anything) and '?' (exact one char)</string>
- </property>
<property name="editable">
<bool>true</bool>
</property>
- <item>
- <property name="text">
- <string notr="true">*.jpg</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string notr="true">*.png</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>*.gif</string>
- </property>
- </item>
</widget>
- </item>
- </layout>
- </item>
- <item>
- <spacer name="horizontalSpacer_3">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>40</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- <item>
- <layout class="QFormLayout" name="formLayout_6">
- <item row="0" column="0">
- <widget class="QLabel" name="label_11">
- <property name="minimumSize">
- <size>
- <width>100</width>
- <height>0</height>
- </size>
- </property>
- <property name="maximumSize">
- <size>
- <width>100</width>
- <height>16777215</height>
- </size>
+ <widget class="QLabel" name="label_5">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>40</y>
+ <width>141</width>
+ <height>18</height>
+ </rect>
</property>
<property name="text">
- <string>Dest. Type:</string>
- </property>
- </widget>
- </item>
- <item row="0" column="1">
- <widget class="QComboBox" name="comboBoxDestType">
- <property name="minimumSize">
- <size>
- <width>100</width>
- <height>0</height>
- </size>
- </property>
- <property name="maximumSize">
- <size>
- <width>100</width>
- <height>16777215</height>
- </size>
+ <string>Max. Width/Height:</string>
</property>
- <item>
- <property name="text">
- <string notr="true">jpg</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string notr="true">png</string>
- </property>
- </item>
</widget>
- </item>
- </layout>
- </item>
- </layout>
- </item>
- <item>
- <layout class="QHBoxLayout" name="horizontalLayout_6">
- <item>
- <widget class="QLabel" name="label_7">
- <property name="minimumSize">
- <size>
- <width>100</width>
- <height>0</height>
- </size>
- </property>
- <property name="maximumSize">
- <size>
- <width>100</width>
- <height>16777215</height>
- </size>
- </property>
+ </widget>
+ </item>
+ <item>
+ <spacer name="horizontalSpacer_2">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>47</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ <zorder>groupBox_2</zorder>
+ <zorder>groupBox_3</zorder>
+ <zorder>groupBox</zorder>
+ <zorder>horizontalSpacer_2</zorder>
+ </widget>
+ </widget>
+ </item>
+ <item>
+ <layout class="QGridLayout" name="gridLayout">
+ <item row="0" column="2">
+ <widget class="QLabel" name="label_10">
+ <property name="minimumSize">
+ <size>
+ <width>100</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>100</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>File Pattern:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1">
+ <widget class="QComboBox" name="comboBoxQuality">
+ <property name="minimumSize">
+ <size>
+ <width>100</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>100</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="editable">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="4">
+ <widget class="QLabel" name="label_11">
+ <property name="minimumSize">
+ <size>
+ <width>100</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>100</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>Dest. Type:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="5">
+ <widget class="QComboBox" name="comboBoxDestType">
+ <property name="minimumSize">
+ <size>
+ <width>100</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>100</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <item>
<property name="text">
- <string>Destination: </string>
+ <string notr="true">jpg</string>
</property>
- </widget>
- </item>
- <item>
- <widget class="QComboBox" name="comboBoxTarget">
- <property name="editable">
- <bool>true</bool>
- </property>
- <property name="currentText">
- <string/>
+ </item>
+ <item>
+ <property name="text">
+ <string notr="true">png</string>
</property>
- </widget>
- </item>
- <item>
- <widget class="QPushButton" name="pushButtonSelectDest">
- <property name="minimumSize">
- <size>
- <width>50</width>
- <height>0</height>
- </size>
+ </item>
+ </widget>
+ </item>
+ <item row="0" column="3">
+ <widget class="QComboBox" name="comboBoxSourcePattern">
+ <property name="minimumSize">
+ <size>
+ <width>100</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>100</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="toolTip">
+ <string>A pattern of the source files with wildcards '*' (anything) and '?' (exact one char)</string>
+ </property>
+ <property name="editable">
+ <bool>true</bool>
+ </property>
+ <item>
+ <property name="text">
+ <string notr="true">*.jpg</string>
</property>
- <property name="maximumSize">
- <size>
- <width>50</width>
- <height>16777215</height>
- </size>
+ </item>
+ <item>
+ <property name="text">
+ <string notr="true">*.png</string>
</property>
+ </item>
+ <item>
<property name="text">
- <string>...</string>
+ <string>*.gif</string>
</property>
- </widget>
- </item>
- </layout>
- </item>
- </layout>
- </widget>
- </item>
- <item>
- <layout class="QHBoxLayout" name="horizontalLayout_2">
- <item>
- <layout class="QVBoxLayout" name="verticalLayout_2">
- <item>
- <widget class="QLabel" name="label_8">
+ </item>
+ </widget>
+ </item>
+ <item row="0" column="0">
+ <widget class="QLabel" name="label_6">
+ <property name="minimumSize">
+ <size>
+ <width>100</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>100</width>
+ <height>16777215</height>
+ </size>
+ </property>
<property name="text">
- <string>Source Directory (Images):</string>
+ <string>Quality (%)</string>
</property>
</widget>
</item>
+ <item row="0" column="6">
+ <spacer name="horizontalSpacer_3">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
- <layout class="QHBoxLayout" name="horizontalLayout">
+ <layout class="QVBoxLayout" name="verticalLayout_2">
<item>
- <widget class="QComboBox" name="comboBoxSourceDir">
- <property name="editable">
- <bool>true</bool>
- </property>
- <property name="currentText">
- <string>/tmp/img</string>
+ <widget class="QLabel" name="label_8">
+ <property name="text">
+ <string>Source Directory (Images):</string>
</property>
</widget>
</item>
<item>
- <widget class="QPushButton" name="pushButtonSelectSource">
+ <layout class="QHBoxLayout" name="horizontalLayout">
+ <item>
+ <widget class="QComboBox" name="comboBoxSourceDir">
+ <property name="editable">
+ <bool>true</bool>
+ </property>
+ <property name="currentText">
+ <string>/tmp/img</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="pushButtonSelectSource">
+ <property name="maximumSize">
+ <size>
+ <width>30</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="toolTip">
+ <string>Auswahldialog</string>
+ </property>
+ <property name="text">
+ <string>...</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <layout class="QVBoxLayout" name="verticalLayout_5">
+ <item>
+ <widget class="QLabel" name="label_7">
+ <property name="minimumSize">
+ <size>
+ <width>100</width>
+ <height>0</height>
+ </size>
+ </property>
<property name="maximumSize">
<size>
- <width>30</width>
+ <width>100</width>
<height>16777215</height>
</size>
</property>
- <property name="toolTip">
- <string>Auswahldialog</string>
- </property>
<property name="text">
- <string>...</string>
+ <string>Destination: </string>
</property>
</widget>
</item>
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout_6">
+ <item>
+ <widget class="QComboBox" name="comboBoxTarget">
+ <property name="editable">
+ <bool>true</bool>
+ </property>
+ <property name="currentText">
+ <string/>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="pushButtonSelectDest">
+ <property name="minimumSize">
+ <size>
+ <width>50</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>50</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>...</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
</layout>
</item>
</layout>
</item>
<item>
- <layout class="QVBoxLayout" name="verticalLayout_5">
- <item>
- <spacer name="verticalSpacer">
- <property name="orientation">
- <enum>Qt::Vertical</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>20</width>
- <height>40</height>
- </size>
- </property>
- </spacer>
- </item>
+ <layout class="QHBoxLayout" name="horizontalLayout_7">
<item>
<widget class="QPushButton" name="pushButtonConvert">
<property name="minimumSize">
</property>
</widget>
</item>
+ <item>
+ <spacer name="horizontalSpacer_4">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
<item>
<widget class="QPushButton" name="pushButtonStop">
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
<property name="minimumSize">
<size>
<width>150</width>
</item>
</layout>
</item>
+ <item>
+ <widget class="QListWidget" name="listWidget"/>
+ </item>
</layout>
- </item>
- <item>
- <widget class="QListWidget" name="listWidget"/>
- </item>
- </layout>
- <zorder>listWidget</zorder>
- <zorder>groupBox_4</zorder>
- <zorder>tabWidget</zorder>
- </widget>
+ <zorder>listWidget</zorder>
+ <zorder>tabWidget</zorder>
+ <zorder></zorder>
+ </widget>
+ </item>
+ </layout>
</widget>
<widget class="QMenuBar" name="menuBar">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
- <width>799</width>
- <height>23</height>
+ <width>823</width>
+ <height>26</height>
</rect>
</property>
<widget class="QMenu" name="menu_File">
<property name="title">
<string>&File</string>
</property>
- <addaction name="actionConvert"/>
+ <addaction name="actionStart"/>
<addaction name="actionStop"/>
<addaction name="separator"/>
<addaction name="actionSelectSource"/>
<attribute name="toolBarBreak">
<bool>false</bool>
</attribute>
- <addaction name="actionConvert"/>
+ <addaction name="actionStart"/>
<addaction name="actionStop"/>
</widget>
<widget class="QStatusBar" name="statusBar"/>
<bool>false</bool>
</attribute>
</widget>
- <action name="actionConvert">
+ <action name="actionStart">
<property name="icon">
<iconset resource="reimgconvert.qrc">
<normaloff>:/main/icons/action_go.png</normaloff>:/main/icons/action_go.png</iconset>
</property>
</action>
<action name="actionStop">
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
<property name="icon">
<iconset resource="reimgconvert.qrc">
<normaloff>:/main/icons/cancel.png</normaloff>:/main/icons/cancel.png</iconset>