--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>AboutDialog</class>
+ <widget class="QDialog" name="AboutDialog">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>400</width>
+ <height>225</height>
+ </rect>
+ </property>
+ <property name="windowTitle">
+ <string>About</string>
+ </property>
+ <widget class="QTextEdit" name="textEdit">
+ <property name="geometry">
+ <rect>
+ <x>20</x>
+ <y>20</y>
+ <width>351</width>
+ <height>141</height>
+ </rect>
+ </property>
+ <property name="html">
+ <string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
+<html><head><meta name="qrichtext" content="1" /><style type="text/css">
+p, li { white-space: pre-wrap; }
+</style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;">
+<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">ReFind</span> for searching files in a directory tree</p>
+<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">This is a program of the project &quot;<span style=" font-weight:600;">Re</span>al <span style=" font-weight:600;">Pub</span>lic <span style=" font-weight:600;">Lib</span>rary&quot;.</p>
+<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Sources are public domain and available under https://github.com/republib</p>
+<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Implemented in QT (C++) 5.x</p></body></html></string>
+ </property>
+ </widget>
+ <widget class="QPushButton" name="pushButton">
+ <property name="geometry">
+ <rect>
+ <x>280</x>
+ <y>180</y>
+ <width>93</width>
+ <height>27</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>&OK</string>
+ </property>
+ </widget>
+ <action name="action_OK">
+ <property name="text">
+ <string>&OK</string>
+ </property>
+ </action>
+ </widget>
+ <resources/>
+ <connections>
+ <connection>
+ <sender>action_OK</sender>
+ <signal>triggered()</signal>
+ <receiver>AboutDialog</receiver>
+ <slot>close()</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>-1</x>
+ <y>-1</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>199</x>
+ <y>112</y>
+ </hint>
+ </hints>
+ </connection>
+ </connections>
+</ui>
--- /dev/null
+/*
+ * aboutdialog.cpp
+ *
+ * (Un)License: Public Domain
+ * You can use and modify this file without any restriction.
+ * Do what you want.
+ * No warranties and disclaimer of any damages.
+ * More info: http://unlicense.org
+ * The latest sources: https://github.com/republib
+ */
+
+#include "aboutdialog.hpp"
+#include "ui_aboutdialog.h"
+
+AboutDialog::AboutDialog(const QString& version, QWidget *parent) :
+ QDialog(parent), ui(new Ui::AboutDialog){
+ ui->setupUi(this);
+ ui->labelVersion->setText(version);
+}
+
+AboutDialog::~AboutDialog(){
+ delete ui;
+}
--- /dev/null
+/*
+ * aboutdialog.hpp
+ *
+ * (Un)License: Public Domain
+ * You can use and modify this file without any restriction.
+ * Do what you want.
+ * No warranties and disclaimer of any damages.
+ * More info: http://unlicense.org
+ * The latest sources: https://github.com/republib
+ */
+
+#ifndef ABOUTDIALOG_HPP
+#define ABOUTDIALOG_HPP
+
+#include <QDialog>
+
+namespace Ui {
+class AboutDialog;
+}
+
+class AboutDialog: public QDialog {
+ Q_OBJECT
+
+public:
+ explicit AboutDialog(const QString& version, QWidget *parent = 0);
+ ~AboutDialog();
+
+private:
+ Ui::AboutDialog *ui;
+};
+
+#endif // ABOUTDIALOG_HPP
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>AboutDialog</class>
+ <widget class="QDialog" name="AboutDialog">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>423</width>
+ <height>289</height>
+ </rect>
+ </property>
+ <property name="windowTitle">
+ <string>Dialog</string>
+ </property>
+ <property name="modal">
+ <bool>true</bool>
+ </property>
+ <widget class="QTextEdit" name="textEdit">
+ <property name="geometry">
+ <rect>
+ <x>20</x>
+ <y>20</y>
+ <width>381</width>
+ <height>221</height>
+ </rect>
+ </property>
+ <property name="readOnly">
+ <bool>true</bool>
+ </property>
+ <property name="html">
+ <string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
+<html><head><meta name="qrichtext" content="1" /><style type="text/css">
+p, li { white-space: pre-wrap; }
+</style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;">
+<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">ReImgConvert</span> for converting images to smaller dimensions/size.</p>
+<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">This is a program of the project</p>
+<p align="center" style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Re</span>al <span style=" font-weight:600;">Pub</span>lic <span style=" font-weight:600;">Lib</span>rary (RePubLib)</p>
+<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Sources are public domain and available under</p>
+<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a href="https://github.com/republib"><span style=" text-decoration: underline; color:#0000ff;">https://github.com/republib</span></a> </p>
+<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Implemented in QT (C++) 5.x</p>
+<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Icons: Mark James, <a href="http://famfamfam.com"><span style=" text-decoration: underline; color:#0000ff;">http://famfamfam.com</span></a> </p></body></html></string>
+ </property>
+ <property name="acceptRichText">
+ <bool>false</bool>
+ </property>
+ <property name="textInteractionFlags">
+ <set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set>
+ </property>
+ </widget>
+ <widget class="QWidget" name="layoutWidget">
+ <property name="geometry">
+ <rect>
+ <x>20</x>
+ <y>250</y>
+ <width>381</width>
+ <height>29</height>
+ </rect>
+ </property>
+ <layout class="QHBoxLayout" name="horizontalLayout">
+ <item>
+ <widget class="QLabel" name="label">
+ <property name="text">
+ <string>Version:</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="labelVersion">
+ <property name="text">
+ <string>2015.05.00</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <spacer name="horizontalSpacer">
+ <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="pushButtonOK">
+ <property name="text">
+ <string>&OK</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </widget>
+ <resources/>
+ <connections>
+ <connection>
+ <sender>pushButtonOK</sender>
+ <signal>clicked()</signal>
+ <receiver>AboutDialog</receiver>
+ <slot>close()</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>196</x>
+ <y>183</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>199</x>
+ <y>108</y>
+ </hint>
+ </hints>
+ </connection>
+ </connections>
+</ui>
--- /dev/null
+/*
+ * Licence:
+ * You can use and modify this file without any restriction.
+ * There is no warranty.
+ * You also can use the licence from http://www.wtfpl.net/.
+ * The original sources can be found on https://github.com/republib.
+*/
+
+#include "mainwindow.hpp"
+#include <QApplication>
+
+int main(int argc, char *argv[])
+{
+ QApplication a(argc, argv);
+ MainWindow w;
+ w.show();
+
+ return a.exec();
+}
--- /dev/null
+/*
+ * Licence:
+ * You can use and modify this file without any restriction.
+ * There is no warranty.
+ * You also can use the licence from http://www.wtfpl.net/.
+ * The original sources can be found on https://github.com/republib.
+*/
+
+#include "mainwindow.hpp"
+#include "ui_mainwindow.h"
+
+MainWindow::MainWindow(QWidget *parent) :
+ QMainWindow(parent),
+ ui(new Ui::MainWindow)
+{
+ ui->setupUi(this);
+}
+
+MainWindow::~MainWindow()
+{
+ delete ui;
+}
--- /dev/null
+/*
+ * Licence:
+ * You can use and modify this file without any restriction.
+ * There is no warranty.
+ * You also can use the licence from http://www.wtfpl.net/.
+ * The original sources can be found on https://github.com/republib.
+*/
+
+#ifndef MAINWINDOW_HPP
+#define MAINWINDOW_HPP
+
+#include "base/rebase.hpp"
+
+namespace Ui {
+class MainWindow;
+}
+
+class MainWindow : public ReHomeApplication
+{
+ Q_OBJECT
+
+public:
+ explicit MainWindow(QWidget *parent = 0);
+ ~MainWindow();
+
+private:
+ Ui::MainWindow *ui;
+};
+
+#endif // MAINWINDOW_HPP
--- /dev/null
+<ui version="4.0">
+ <class>MainWindow</class>
+ <widget class="QMainWindow" name="MainWindow" >
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>400</width>
+ <height>300</height>
+ </rect>
+ </property>
+ <property name="windowTitle" >
+ <string>MainWindow</string>
+ </property>
+ <widget class="QMenuBar" name="menuBar" />
+ <widget class="QToolBar" name="mainToolBar" />
+ <widget class="QWidget" name="centralWidget" />
+ <widget class="QStatusBar" name="statusBar" />
+ </widget>
+ <layoutDefault spacing="6" margin="11" />
+ <pixmapfunction></pixmapfunction>
+ <resources/>
+ <connections/>
+</ui>
--- /dev/null
+#-------------------------------------------------
+#
+# Project created by QtCreator 2016-01-18T00:51:17
+#
+#-------------------------------------------------
+
+QT += core gui
+
+greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
+
+TARGET = rebackgui
+TEMPLATE = app
+INCLUDEPATH = ../.. /usr/include/c++/4.9
+
+SOURCES += main.cpp\
+ ../../base/ReException.cpp \
+ ../../base/ReQStringUtils.cpp \
+ ../../base/ReFileUtils.cpp \
+ ../../base/ReLogger.cpp \
+ ../../gui/ReStateStorage.cpp \
+ ../../gui/ReGuiValidator.cpp \
+ ../../gui/ReGuiQueue.cpp \
+ mainwindow.cpp \
+ aboutdialog.cpp
+
+HEADERS += mainwindow.hpp \
+ ../../base/rebase.hpp \
+ ../../base/ReQStringUtils.hpp \
+ ../../gui/ReStateStorage.hpp \
+ ../../gui/ReGuiValidator.hpp \
+ ../../gui/regui.hpp \
+ aboutdialog.hpp
+
+FORMS += mainwindow.ui \
+ aboutdialog.ui
+
+DISTFILES += \
+ ReBackGui.html
+
*
*/
-QString sizeToString(qint64 size);
+bool Converter::m_shouldStop = false;
+QStringList Converter::m_files;
+uint64_t Converter::m_totalBytes = 0;
+int Converter::m_totalFiles = 0;
+bool Converter::m_searchReady = false;
+QMutex Converter::m_mutex;
+
+/**
+ * Constructor.
+ *
+ * @param directory the base directory of the images to inspect
+ * @param mainWindow
+ */
+Converter::Converter(const QString &directory, MainWindow *mainWindow):
+ m_sourceDir(directory),
+ m_mainWindow(mainWindow)
+{
+}
+
+/**
+ * @brief Logs an error message.
+ *
+ * @param message the message to log
+ * @return <code>false</code>
+ * @throws ConverterException
+ */
+bool Converter::error(const QString& message){
+ m_mainWindow->log(message);
+ throw ConverterException(message);
+ return false;
+}
+
+/**
+ * @brief Logs a message.
+ *
+ * @param message the message to log
+ * @return <code>true</code>
+ */
+bool Converter::log(const QString& message){
+ printf("%s\n", I18N::s2b(message).constData());
+ m_mainWindow->log(message);
+ return true;
+}
+
/**
* @brief Constructor.
* but larger
* @param mainWindow the window. Will be used for output
*/
-Converter::Converter(const QString& directory, const QString& targetDirectory,
+TaskConverter::TaskConverter(const QString& directory, const QString& targetDirectory,
const QString& sourcePattern, const QString& targetType,
bool simpleConversion, int maxWidth, int maxHeight, int landscapeX,
int landscapeY, int portraitX, int portraitY, int squareX, int quality,
MainWindow* mainWindow) :
- m_dir(directory),
- m_targetDir(targetDirectory),
- m_sourcePattern(sourcePattern),
- m_targetType(targetType),
- m_landscapeWidth(landscapeX),
- m_landscapeHeight(landscapeY),
- m_portraitWidth(portraitX),
- m_portraitHeight(portraitY),
- m_squareWidth(squareX),
- m_quality(targetType == "jpg" ? quality : 0),
- m_mainWindows(mainWindow),
- m_shouldStop(false),
- m_imageInfo(
- new QRegularExpression(" (PNG|GIF|JPEG) (\\d+)x(\\d+) ")),
- m_groupWidth(2),
- m_groupHeight(3),
- m_simpleMode(simpleConversion),
- m_maxWidth(maxWidth),
- m_maxHeight(maxHeight)
+ Converter(directory, mainWindow),
+ m_targetDir(targetDirectory),
+ m_targetType(targetType),
+ m_landscapeWidth(landscapeX),
+ m_landscapeHeight(landscapeY),
+ m_portraitWidth(portraitX),
+ m_portraitHeight(portraitY),
+ m_squareWidth(squareX),
+ m_quality(targetType == "jpg" ? quality : 0),
+ m_imageInfo(
+ new QRegularExpression(" (PNG|GIF|JPEG) (\\d+)x(\\d+) ")),
+ m_groupWidth(2),
+ m_groupHeight(3),
+ m_simpleMode(simpleConversion),
+ m_maxWidth(maxWidth),
+ m_maxHeight(maxHeight)
{
+ ReQStringUtils::ensureLastChar(m_sourceDir, OS_SEPARATOR);
+ ReQStringUtils::ensureLastChar(m_targetDir, OS_SEPARATOR);
}
/**
* @brief Destructor.
*/
-Converter::~Converter(){
+TaskConverter::~TaskConverter(){
delete m_imageInfo;
}
args << arg;
}
-/**
- * @brief Changes the state of the thread.
- *
- * @param state the new state
- * @param info an info about the change
- */
-void Converter::changeState(Converter::State state, const QString& info){
- m_mainWindows->onThreadStateChanged(state, info);
-}
-
/**
* Converts an image into another format.
*
* @param heightNew the new height of the image
* @param quality 0 or quality in % (only for JPEG targets)
*/
-void Converter::convert(const QString& source, const QString& target, int width,
+void TaskConverter::callExternProgram(const QString& source, const QString& target, int width,
int height, int widthNew, int heightNew, int quality){
QStringList args;
// convert -size 100x200 source.png -resize 50x100 target.jpg";
process.close();
}
+/**
+ * @brief Converts one file.
+ *
+ * @param source the file's name with path
+ * @param target the new filename with path
+ * @param size the size of the file (in byte)
+ * @param sizeTarget OUT: the file size of the target
+ */
+void TaskConverter::convertOneFile(const QString& source, const QString& target,
+ qint64 size, qint64& sizeTarget){
+ int width = 0;
+ int height = 0;
+ QString info;
+ clock_t start = clock();
+ if (readProperties(source, width, height, info)){
+ int widthNew = width;
+ int heightNew = height;
+ if (m_simpleMode)
+ handleSimple(width, height, widthNew, heightNew);
+ else
+ handleUserDefined(width, height, widthNew, heightNew);
+ QString node = ReFileUtils::nodeOf(source);
+ log(
+ node + " " + info + " " + ReQStringUtils::readableSize(size)
+ + QString(" -> %1x%2 ").arg(widthNew).arg(heightNew));
+ callExternProgram(source, target, width, height, widthNew, heightNew, m_quality);
+ struct stat info;
+ if (stat(I18N::s2b(target).constData(), &info) == 0){
+ sizeTarget = info.st_size;
+ m_mainWindow->logAppendLast(ReQStringUtils::readableSize(sizeTarget)
+ + " " + ReQStringUtils::readableDuration(
+ clock() - start));
+ }
+ }
+}
+
/**
* Converts an image with a given maximal width and size.
*
* @param heightNew OUT: the height of the converted image
* @return <code>true</code>: the image needs to be converted
*/
-bool Converter::handleSimple(int width, int height, int& widthNew, int& heightNew)
+bool TaskConverter::handleSimple(int width, int height, int& widthNew, int& heightNew)
{
bool doConvert = false;
if (width > m_maxWidth){
* @param heightNew OUT: the height of the converted image
* @return <code>true</code>: the image needs to be converted
*/
-bool Converter::handleUserDefined(int width, int height, int& widthNew, int& heightNew){
+bool TaskConverter::handleUserDefined(int width, int height, int& widthNew, int& heightNew){
bool doConvert = false;
if (abs(width - height) < 5){
// Square format:
return doConvert;
}
-/**
- * @brief Converts one file.
- *
- * @param source the file's name with path
- * @param target the new filename with path
- * @param size the size of the file (in byte)
- * @param sizeTarget OUT: the file size of the target
- */
-void Converter::convertOneFile(const QString& source, const QString& target,
- qint64 size, qint64& sizeTarget){
- int width = 0;
- int height = 0;
- QString info;
- clock_t start = clock();
- if (readProperties(source, width, height, info)){
- int widthNew = width;
- int heightNew = height;
- if (m_simpleMode)
- handleSimple(width, height, widthNew, heightNew);
- else
- handleUserDefined(width, height, widthNew, heightNew);
- QString node = ReFileUtils::nodeOf(source);
- log(
- node + " " + info + " " + ReQStringUtils::readableSize(size)
- + QString(" -> %1x%2 ").arg(widthNew).arg(heightNew));
- convert(source, target, width, height, widthNew, heightNew, m_quality);
- struct stat info;
- if (stat(I18N::s2b(target).constData(), &info) == 0){
- sizeTarget = info.st_size;
- m_mainWindows->logAppendLast(ReQStringUtils::readableSize(sizeTarget)
- + " " + ReQStringUtils::readableDuration(
- clock() - start));
- }
- }
-}
-
-/**
- * @brief Logs an error message.
- *
- * @param message the message to log
- * @return <code>false</code>
- * @throws ConverterException
- */
-bool Converter::error(const QString& message){
- m_mainWindows->log(message);
- throw ConverterException(message);
- return false;
-}
-
-/**
- * @brief Logs a message.
- *
- * @param message the message to log
- * @return <code>true</code>
- */
-bool Converter::log(const QString& message){
- printf("%s\n", I18N::s2b(message).constData());
- m_mainWindows->log(message);
- return true;
-}
-
/**
* Reads the image properties.
*
* @return <code>true</code>: success
* <code>false</code>: properties not readable
*/
-bool Converter::readProperties(const QString& name, int& width, int& height,
+bool TaskConverter::readProperties(const QString& name, int& width, int& height,
QString& info){
QPixmap image(name);
* @return <code>true</code>: success
* <code>false</code>: properties not readable
*/
-bool Converter::readPropertiesByIdentify(const QString& name, int& width, int& height,
+bool TaskConverter::readPropertiesByIdentify(const QString& name, int& width, int& height,
QString& info){
QStringList args;
args << name;
/**
* @brief Runs the thread's task.
*
- * <ul>
- *<li>Makes the target directory (if necessary)</li>
- *<li>Search the images *.png / *.jpg and converts them</li>
- *</ul>
+ * Makes the target directory (if necessary).
+ * Converts all files from the filelist created by TaskSearch.
*/
-void Converter::run(){
+void TaskConverter::run(){
QString msg;
clock_t start = clock();
uint64_t preSize = 0;
uint64_t postSize = 0;
uint64_t lengthTarget = 0;
int no = 0;
+ QString info;
+ QString node;
+ QString targetDir;
try{
- if (!m_dir.exists())
- error(
- QObject::tr("Directory does not exist: ") + m_dir.absolutePath());
- if (!m_targetDir.exists()){
- QString parentName = m_targetDir.path();
- QString subdir = m_targetDir.dirName();
- QDir parent(m_targetDir.path());
- parent.cdUp();
- parent.mkdir(subdir);
- }
- if (!m_targetDir.exists()){
- error(
- QObject::tr("Cannot create the target directory: ")
- + m_targetDir.absolutePath());
- }
- changeState(Converter::STATE_STARTING, "");
+ while (! m_shouldStop && ! m_searchReady){
+ m_mutex.lock();
+ if (m_files.size() == 0)
+ info.clear();
+ else{
+ info = m_files.first();
+ m_files.removeFirst();
+ }
+ m_mutex.unlock();
+ if (info.isEmpty()){
+ QThread::sleep(50);
+ } else {
+ int ix = info.indexOf('\t');
+ node = info.mid(ix + 1);
+ info.resize(ix);
+ targetDir = m_targetDir;
+ if (!info.isEmpty())
+ targetDir += info + OS_SEPARATOR;
+ if (! QDir(targetDir).exists())
+ _mkdir(I18N::s2b(targetDir).constData());
+ QDir dir(targetDir);
+ if (! dir.exists()){
+ error(tr("cannot create directory: %1").arg(targetDir));
+ }else {
+ no++;
+ QString path = m_sourceDir + info + node;
+ qint64 length = QFileInfo(path).size();
+ QString nodeTarget = ReFileUtils::replaceExtension(node,
+ "." + m_targetType);
+ QString target = m_targetDir + info + nodeTarget;
+ convertOneFile(path, target, length, lengthTarget);
+ preSize += length;
+ postSize += lengthTarget;
+ int percentFiles = int(no * 100 / max(1, m_totalFiles));
+ int percentSize = int(preSize * 100 / max(1, m_totalBytes));
+ m_mainWindow->setStatusMessage(LOG_INFO,
+ tr("%1 file(s) of %2 (%3 %), %4 -> %5 (%6 %)")
+ .arg(no).arg(m_totalFiles)
+ .arg(percentFiles + percentSize / 2)
+ .arg(ReQStringUtils::readableSize(preSize))
+ .arg(ReQStringUtils::readableSize(postSize))
+ .arg(postSize * 100.0 / max(1, preSize), 0,
+ 'f', 2));
+
+ }
+ }
+ }
m_shouldStop = false;
- QDirIterator it(m_dir.absolutePath());
- QRegExp regExpr(m_sourcePattern, Qt::CaseInsensitive, QRegExp::Wildcard);
- while (it.hasNext()){
- if (m_shouldStop){
- log(QObject::tr("Canceled by the user"));
- break;
- }
- it.next();
- if (it.fileInfo().isDir())
- continue;
- QString node = it.fileName();
- if (regExpr.indexIn(node) >= 0){
- no++;
- QString path = m_dir.absoluteFilePath(node);
- qint64 length = it.fileInfo().size();
- QString nodeTarget = ReFileUtils::replaceExtension(node,
- "." + m_targetType);
- QString target = m_targetDir.absoluteFilePath(nodeTarget);
- convertOneFile(path, target, length, lengthTarget);
- preSize += length;
- postSize += lengthTarget;
- m_mainWindows->setStatusMessage(LOG_INFO,
- tr("%1 file(s) %2 -> %3 (%4 %)")
- .arg(no)
- .arg(ReQStringUtils::readableSize(preSize))
- .arg(ReQStringUtils::readableSize(postSize))
- .arg(postSize * 100.0 / max(1, preSize), 0,
- 'f', 2));
- }
- }
- changeState(Converter::STATE_SUB_TASK_STOPPED, msg);
} catch (ConverterException exc){
log(
QObject::tr("Execution stopped because of error(s): ")
.arg(ReQStringUtils::readableSize(postSize))
.arg(postSize * 100.0 / preSize, 0, 'f', 2)
.arg(ReQStringUtils::readableDuration(clock() - start));
- changeState(Converter::STATE_READY, msg);
+ m_mainWindow->finishTask(msg);
}
/**
- * @brief Search for the Perl script which make the conversion itself.
+ * Constructor.
*
- * @param node the name of script without path.
- * @return the full name of the script (with path)
+ * @param directory the base directory to inspect
+ * @param sourcePattern the pattern of the image files to convert
+ * @param mainWindow the parent
*/
-QString findScript(const QString& node){
- static QString rc;
- if (rc.isEmpty()){
+TaskSearch::TaskSearch(const QString& directory,
+ const QString& sourcePattern, bool recursive, MainWindow* mainWindow) :
+ Converter(directory, mainWindow),
+ m_sourcePattern(sourcePattern),
+ m_recursive(recursive)
+{
+}
- QDir dir = QDir::current();
- QFile scriptFile(dir.filePath(node));
- if (!scriptFile.exists()){
- extern char** g_argv;
- dir.setPath(g_argv[0]);
- dir.cdUp();
- scriptFile.setFileName(dir.filePath(node));
- }
- if (scriptFile.exists())
- rc = scriptFile.fileName();
- }
- return rc;
+/**
+ * Search the image files in one directory and write it to a list.
+ *
+ * This method is recursive.
+ *
+ * @param dir the directory to inspect
+ */
+void TaskSearch::searchOneDirectory(const QString& dir){
+ QDirIterator it(dir);
+ QRegExp regExpr(m_sourcePattern, Qt::CaseInsensitive, QRegExp::Wildcard);
+ QString relPath;
+ QString info;
+ if (dir.length() > m_sourceDir.length())
+ relPath = m_sourceDir.mid(m_sourceDir.length());
+ while (it.hasNext()){
+ if (m_shouldStop){
+ break;
+ }
+ it.next();
+ if (! it.fileInfo().isDir() && regExpr.indexIn(it.fileName()) >= 0){
+ info = relPath + "\t" + it.fileName();
+ m_mutex.lock();
+ m_files.append(info);
+ m_mutex.unlock();
+ }
+ }
+ if (m_recursive && ! m_shouldStop){
+ QDirIterator it2(dir);
+ while (it2.hasNext()){
+ if (m_shouldStop){
+ break;
+ }
+ it2.next();
+
+ if (it2.fileInfo().isDir()){
+ searchOneDirectory(it2.filePath());
+ }
+ }
+ }
}
+
+/**
+ * Search the input files and write it into the result list.
+ */
+void TaskSearch::run(){
+ m_searchReady = false;
+ searchOneDirectory(m_sourceDir);
+ m_searchReady = true;
+}
+
+/**
+ * Constructor.
+ *
+ * @param directory the base directory to inspect
+ * @param sourcePattern the pattern of the image files to convert
+ * @param mainWindow the parent
+ */
+TaskShowOther::TaskShowOther(const QString& directory,
+ const QString& sourcePattern, bool recursive, MainWindow* mainWindow) :
+ Converter(directory, mainWindow),
+ m_sourcePattern(sourcePattern),
+ m_recursive(recursive)
+{
+}
+
+/**
+ * Search the image files in one directory and write it to a list.
+ *
+ * This method is recursive.
+ *
+ * @param dir the directory to inspect
+ */
+void TaskShowOther::processOneDirectory(const QString& dir){
+ QDirIterator it(dir);
+ QRegExp regExpr(m_sourcePattern, Qt::CaseInsensitive, QRegExp::Wildcard);
+ QString relPath;
+ QString info;
+ if (dir.length() > m_sourceDir.length())
+ relPath = m_sourceDir.mid(m_sourceDir.length());
+ while (it.hasNext()){
+ if (m_shouldStop){
+ break;
+ }
+ it.next();
+ if (! it.fileInfo().isDir() && regExpr.indexIn(it.fileName()) < 0){
+ info = relPath + it.fileName();
+ m_totalFiles++;
+ m_mainWindow->remoteLog(info);
+ }
+ }
+ if (m_recursive && ! m_shouldStop){
+ QDirIterator it2(dir);
+ while (it2.hasNext()){
+ if (m_shouldStop){
+ break;
+ }
+ it2.next();
+
+ if (it2.fileInfo().isDir()){
+ processOneDirectory(it2.filePath());
+ }
+ }
+ }
+}
+
+/**
+ * Search the input files and write it into the result list.
+ */
+void TaskShowOther::run(){
+ m_searchReady = false;
+ m_totalFiles = 0;
+ processOneDirectory(m_sourceDir);
+ m_searchReady = true;
+ m_mainWindow->finishTask(tr("Found: %1 file(s)").arg(m_totalFiles));
+}
+
#include <QProcess>
#include <QList>
#include <QThread>
+#include <QMutex>
class MainWindow;
class ConverterException {
class Converter: public QThread {
Q_OBJECT
+
public:
- enum State {
- STATE_UNDEF, STATE_STARTING, STATE_SUB_TASK_STOPPED, STATE_READY,
- };
-public:
- Converter(const QString& directory, const QString& targetDirectory,
- const QString& sourcePattern, const QString& targetType,
- bool simpleConversion, int maxWidth, int maxHeight, int landscapeX,
- int landscapeY, int portraitX, int portraitY, int squareX, int quality,
- MainWindow* mainWindows);
- ~Converter();
+ Converter(const QString& directory, MainWindow* mainWindow);
public:
bool error(const QString& message);
bool log(const QString& message);
- void run();
- void stop(){
- m_shouldStop = true;
- }
protected:
- bool buildArgs();
- void changeState(State state, const QString& info);
- void convert(const QString& source, const QString& target, int width,
- int height, int widthNew, int heightNew, int quality);
- void convertOneFile(const QString& source, const QString& target,
- qint64 size, qint64& sizeTarget);
- bool handleSimple(int width, int height, int& widthNew, int& heightNew);
- bool handleUserDefined(int width, int height, int& widthNew, int& heightNew);
- bool readProperties(const QString& name, int &width, int &height,
- QString &info);
- bool readPropertiesByIdentify(const QString& name, int &width, int &height,
- QString &info);
+ virtual void run() = 0;
+protected:
+ QString m_sourceDir;
+ MainWindow* m_mainWindow;
+public:
+ static bool m_shouldStop;
+ static QStringList m_files;
+ static qint64 m_totalBytes;
+ static int m_totalFiles;
+ static bool m_searchReady;
+ static QMutex m_mutex;
+};
+
+class TaskConverter : public Converter {
+public:
+ TaskConverter(const QString& directory, const QString& targetDirectory,
+ const QString& sourcePattern, const QString& targetType,
+ bool simpleConversion, int maxWidth, int maxHeight, int landscapeX,
+ int landscapeY, int portraitX, int portraitY, int squareX, int quality,
+ MainWindow* mainWindows);
+ ~TaskConverter();
+protected:
+ virtual void run();
+protected:
+ bool buildArgs();
+ void callExternProgram(const QString& source, const QString& target, int width,
+ int height, int widthNew, int heightNew, int quality);
+ void converterTask();
+ void convertOneFile(const QString& source, const QString& target,
+ qint64 size, qint64& sizeTarget);
+ bool handleSimple(int width, int height, int& widthNew, int& heightNew);
+ bool handleUserDefined(int width, int height, int& widthNew, int& heightNew);
+ bool readProperties(const QString& name, int &width, int &height,
+ QString &info);
+ bool readPropertiesByIdentify(const QString& name, int &width, int &height,
+ QString &info);
+private:
+ QString m_targetDir;
+ QString m_targetType;
+ int m_landscapeWidth;
+ int m_landscapeHeight;
+ int m_portraitWidth;
+ int m_portraitHeight;
+ int m_squareWidth;
+ int m_quality;
+ QRegularExpression* m_imageInfo;
+ int m_groupWidth;
+ int m_groupHeight;
+ bool m_simpleMode;
+ int m_maxWidth;
+ int m_maxHeight;
+};
+
+class TaskSearch : public Converter {
+public:
+ TaskSearch(const QString& dir, const QString& sourcePattern,
+ bool recursive, MainWindow* mainWindows);
+protected:
+ virtual void run();
+protected:
+ void searchOneDirectory(const QString& dir);
+private:
+ QString m_sourcePattern;
+ bool m_recursive;
+};
+
+class TaskShowOther : public Converter {
+public:
+ TaskShowOther(const QString& dir, const QString& sourcePattern,
+ bool recursive, MainWindow* mainWindows);
+protected:
+ virtual void run();
+protected:
+ void processOneDirectory(const QString& dir);
private:
- QDir m_dir;
- QDir m_targetDir;
QString m_sourcePattern;
- QString m_targetType;
- int m_landscapeWidth;
- int m_landscapeHeight;
- int m_portraitWidth;
- int m_portraitHeight;
- int m_squareWidth;
- int m_quality;
- MainWindow* m_mainWindows;
- bool m_shouldStop;
- QRegularExpression* m_imageInfo;
- int m_groupWidth;
- int m_groupHeight;
- bool m_simpleMode;
- int m_maxWidth;
- int m_maxHeight;
+ bool m_recursive;
};
#endif // CONVERTER_HPP
MainWindow::MainWindow(const QString& homeDir, QWidget *parent) :
ReHomeApplication("reimgconvert", homeDir, 2, 100100100, parent),
ui(new Ui::MainWindow),
- m_converter(NULL),
+ m_taskConvert(NULL),
+ m_taskSearch(NULL),
+ m_taskShowOther(NULL),
m_logger(),
m_guiQueue(),
m_guiTimer(new QTimer(this)){
connect(ui->pushButtonSelectDest, SIGNAL(clicked()), this,
SLOT(selectTarget()));
connect(ui->actionSelectSource, SIGNAL(triggered()), this,
- SLOT(selectSource()));
+ SLOT(onSelectSource()));
connect(ui->pushButtonSelectSource, SIGNAL(clicked()), this,
- SLOT(selectSource()));
+ SLOT(onSelectSource()));
connect(ui->actionAbout, SIGNAL(triggered()), this, SLOT(about()));
connect(ui->comboBoxTemplate, SIGNAL(currentIndexChanged(const QString&)),
this, SLOT(onTemplateChangeIndex(const QString&)));
connect(m_guiTimer, SIGNAL(timeout()), this, SLOT(guiTimerUpdate()));
+ connect(ui->pushButtonShowOtherFiles, SIGNAL(clicked()), this, SLOT(onShowOtherFiles()));
restoreState();
m_guiTimer->start(100);
}
*/
MainWindow::~MainWindow(){
delete ui;
- delete m_converter;
+ delete m_taskConvert;
+ delete m_taskSearch;
+ delete m_taskShowOther;
}
/**
return false;
}
+/**
+ * Finishs a task with sending a ready message.
+ *
+ * Note: the method is called from a non-main thread.
+ *
+ * @param message the message to show
+ */
+void MainWindow::finishTask(const QString& message){
+ Converter::m_mutex.lock();
+ m_guiQueue.pushBack(ReGuiQueueItem(ReGuiQueueItem::ReadyMessage, NULL, message));
+ Converter::m_mutex.unlock();
+}
/**
* Callback method of the GUI timer.
*/
{
int count = m_guiQueue.count();
while(count-- > 0){
+ Converter::m_mutex.lock();
ReGuiQueueItem item = m_guiQueue.popFront();
+ Converter::m_mutex.unlock();
if (item.m_type == ReGuiQueueItem::Undef)
break;
if (! item.apply()){
+ " " + item.m_value);
break;
}
-
}
}
}
* @return <code>true</code>
*/
bool MainWindow::logAppendLast(const QString& message){
+ Converter::m_mutex.lock();
m_guiQueue.pushBack(ReGuiQueueItem(ReGuiQueueItem::ListAppendToCurrent,
ui->listWidget, message));
+ Converter::m_mutex.unlock();
return true;
}
* @brief Handles the button click on "convert".
*/
void MainWindow::onConvert(){
- startStop(true);
- delete m_converter;
+ Converter::m_shouldStop = false;
+ startStop(true);
m_errors = 0;
int landscapeX = comboInt(ui->comboBoxLandscapeX, 0, "*", 0);
int landscapeY = comboInt(ui->comboBoxLandscapeY, 0, "*", 0);
bool simpleConversion = match.hasMatch();
if (m_errors == 0){
saveState();
- m_converter = new Converter(ui->comboBoxSourceDir->currentText(),
+ delete m_taskSearch;
+ m_taskSearch = new TaskSearch(ui->comboBoxSourceDir->currentText(),
+ ui->comboBoxSourcePattern->currentText(),
+ ui->checkBoxCopyOtherFiles->isChecked(), this);
+ m_taskSearch->start();
+
+ delete m_taskConvert;
+ m_taskConvert = new TaskConverter(ui->comboBoxSourceDir->currentText(),
ui->comboBoxTargetDir->currentText(),
ui->comboBoxSourcePattern->currentText(),
ui->comboBoxDestType->currentText(),
simpleConversion, maxWidth, maxHeight,
landscapeX, landscapeY, portraitX,
portraitY, squareX, quality, this);
- // start the thread:
- m_converter->start();
+ m_taskConvert->start();
}
}
+
+/**
+ * Selects the destination directory with a dialog.
+ */
+void MainWindow::onSelectSource(){
+ QString dir = QFileDialog::getExistingDirectory(this,
+ tr("Select Source Directory"), ui->comboBoxSourceDir->currentText(),
+ QFileDialog::ShowDirsOnly);
+ if (!dir.isEmpty())
+ ui->comboBoxSourceDir->setCurrentText(dir);
+}
+
+/**
+ * Shows the files not matching the file pattern (describing the images).
+ */
+void MainWindow::onShowOtherFiles(){
+ Converter::m_shouldStop = false;
+ startStop(true);
+ delete m_taskShowOther;
+ m_taskShowOther = new TaskShowOther(ui->comboBoxSourceDir->currentText(),
+ ui->comboBoxSourcePattern->currentText(),
+ ui->checkBoxCopyOtherFiles->isChecked(), this);
+ m_taskShowOther->start();
+}
/**
* @brief Handles the click on the button "file select".
*
* @brief Handles the click on the button "stop".
*/
void MainWindow::onStop(){
- m_converter->stop();
+ Converter::m_shouldStop = true;
}
/**
}
/**
- * @brief Handles the event "thread changed".
+ * Writes a text to the log.
*
- * Note: this method is called from a non main thread
+ * 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
+ * @param message the text to set
*/
-void MainWindow::onThreadStateChanged(Converter::State state, const QString& info){
- switch (state) {
- case Converter::STATE_READY:
- m_guiQueue.pushBack(ReGuiQueueItem(ReGuiQueueItem::ReadyMessage, NULL, info));
- //ui->statusBar->showMessage(info);
- break;
- case Converter::STATE_SUB_TASK_STOPPED:
- //ui->statusBar->showMessage(info);
- break;
- case Converter::STATE_STARTING:
- default:
- break;
- }
+void MainWindow::remoteLog(const QString& message){
+ Converter::m_mutex.lock();
+ m_guiQueue.pushBack(ReGuiQueueItem(ReGuiQueueItem::ListEnd,
+ ui->listWidget, message));
+ Converter::m_mutex.unlock();
}
/**
* Reads the history of the widget values and other parameters and set it.
return level == LOG_ERROR;
}
-/**
- * Selects the destination directory with a dialog.
- */
-void MainWindow::selectSource(){
- QString dir = QFileDialog::getExistingDirectory(this,
- tr("Select Source Directory"), ui->comboBoxSourceDir->currentText(),
- QFileDialog::ShowDirsOnly);
- if (!dir.isEmpty())
- ui->comboBoxSourceDir->setCurrentText(dir);
-}
-
/**
* Sets the maximal dimensions (from the "simple" interface).
*
* @param message the text to set
*/
void MainWindow::setRemoteStatus(const QString& message){
+ Converter::m_mutex.lock();
m_guiQueue.pushBack(ReGuiQueueItem(ReGuiQueueItem::StatusLine,
NULL, message));
+ Converter::m_mutex.unlock();
}
/**
*/
void MainWindow::startStop(bool isStart){
ui->actionStart->setEnabled(!isStart);
+ ui->pushButtonShowOtherFiles->setEnabled(! isStart);
ui->actionStop->setEnabled(isStart);
ui->pushButtonConvert->setEnabled(! isStart);
ui->pushButtonStop->setEnabled(isStart);
public:
virtual void aboutToQuit();
bool error(const QString& message);
+ void finishTask(const QString& message);
bool log(const QString& message);
bool logAppendLast(const QString& message);
- void onThreadStateChanged(Converter::State state, const QString& info);
+ void remoteLog(const QString& message);
void setRemoteStatus(const QString& message);
void setStatusMessage(bool error, const QString& message);
public:
void clear();
void guiTimerUpdate();
void onConvert();
+ void onShowOtherFiles();
void onSourceFileSelect();
void onStop();
void onTemplateChangeIndex(const QString& text);
- void selectSource();
+ void onSelectSource();
void selectTarget();
private:
Ui::MainWindow *ui;
- Converter* m_converter;
+ TaskConverter* m_taskConvert;
+ TaskSearch* m_taskSearch;
+ TaskShowOther* m_taskShowOther;
QLabel* m_statusMessage;
ReLogger m_logger;
ReGuiQueue m_guiQueue;
<rect>
<x>0</x>
<y>0</y>
- <width>823</width>
+ <width>958</width>
<height>783</height>
</rect>
</property>
<string>ReImgConvert</string>
</property>
<widget class="QWidget" name="centralWidget">
- <layout class="QVBoxLayout" name="verticalLayout_3">
+ <layout class="QVBoxLayout" name="verticalLayout">
<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>
- <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>
- <item>
- <widget class="QComboBox" name="comboBoxTemplate">
- <property name="minimumSize">
- <size>
- <width>316</width>
- <height>0</height>
- </size>
- </property>
- <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>
- <item>
- <property name="text">
- <string>User defined</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>40</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </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">
- <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>
- <spacer name="horizontalSpacer_5">
- <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>
- </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>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>
- </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>
- </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>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>
- <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">
+ <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>
+ <widget class="QWidget" name="">
+ <property name="geometry">
+ <rect>
+ <x>11</x>
+ <y>11</y>
+ <width>561</width>
+ <height>30</height>
+ </rect>
+ </property>
+ <layout class="QHBoxLayout" name="horizontalLayout_4">
+ <item>
+ <widget class="QLabel" name="label_2">
<property name="minimumSize">
<size>
- <width>100</width>
+ <width>110</width>
<height>0</height>
</size>
</property>
</size>
</property>
<property name="text">
- <string>File Pattern:</string>
+ <string>Template:</string>
</property>
</widget>
</item>
- <item row="0" column="1">
- <widget class="QComboBox" name="comboBoxQuality">
+ <item>
+ <widget class="QComboBox" name="comboBoxTemplate">
<property name="minimumSize">
<size>
- <width>100</width>
+ <width>390</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>
+ <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>
+ <item>
+ <property name="text">
+ <string>User defined</string>
+ </property>
+ </item>
</widget>
</item>
- <item row="0" column="4">
- <widget class="QLabel" name="label_11">
- <property name="minimumSize">
- <size>
- <width>100</width>
- <height>0</height>
- </size>
+ <item>
+ <spacer name="horizontalSpacer_6">
+ <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="text">
- <string>Dest. Type:</string>
- </property>
- </widget>
+ </spacer>
</item>
- <item row="0" column="5">
- <widget class="QComboBox" name="comboBoxDestType">
+ </layout>
+ </widget>
+ <widget class="QWidget" name="">
+ <property name="geometry">
+ <rect>
+ <x>13</x>
+ <y>62</y>
+ <width>560</width>
+ <height>30</height>
+ </rect>
+ </property>
+ <layout class="QHBoxLayout" name="horizontalLayout_9">
+ <item>
+ <widget class="QLabel" name="label_14">
<property name="minimumSize">
<size>
- <width>100</width>
+ <width>110</width>
<height>0</height>
</size>
</property>
<height>16777215</height>
</size>
</property>
- <item>
- <property name="text">
- <string notr="true">jpg</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string notr="true">png</string>
- </property>
- </item>
+ <property name="text">
+ <string>Max. Width:</string>
+ </property>
</widget>
</item>
- <item row="0" column="3">
- <widget class="QComboBox" name="comboBoxSourcePattern">
+ <item>
+ <widget class="QComboBox" name="comboBoxMaxWidth">
<property name="minimumSize">
<size>
- <width>100</width>
+ <width>125</width>
<height>0</height>
</size>
</property>
<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>
- <item row="0" column="0">
- <widget class="QLabel" name="label_6">
+ <item>
+ <widget class="QLabel" name="label_15">
<property name="minimumSize">
<size>
- <width>100</width>
+ <width>125</width>
<height>0</height>
</size>
</property>
</size>
</property>
<property name="text">
- <string>Quality (%)</string>
+ <string>Max. Height:</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="QVBoxLayout" name="verticalLayout_2">
- <item>
- <widget class="QLabel" name="label_8">
- <property name="text">
- <string>Source Directory (Images):</string>
- </property>
- </widget>
- </item>
- <item>
- <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>100</width>
- <height>16777215</height>
- </size>
- </property>
- <property name="text">
- <string>Destination: </string>
- </property>
- </widget>
- </item>
- <item>
- <layout class="QHBoxLayout" name="horizontalLayout_6">
- <item>
- <widget class="QComboBox" name="comboBoxTargetDir">
- <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="QHBoxLayout" name="horizontalLayout_7">
- <item>
- <widget class="QPushButton" name="pushButtonConvert">
+ <widget class="QComboBox" name="comboBoxMaxHeight">
<property name="minimumSize">
<size>
- <width>150</width>
+ <width>125</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
- <width>150</width>
+ <width>100</width>
<height>16777215</height>
</size>
</property>
- <property name="toolTip">
- <string>Converts the images</string>
- </property>
- <property name="text">
- <string>&Convert</string>
- </property>
- <property name="icon">
- <iconset resource="reimgconvert.qrc">
- <normaloff>:/main/icons/action_go.png</normaloff>:/main/icons/action_go.png</iconset>
+ <property name="editable">
+ <bool>true</bool>
</property>
</widget>
</item>
<item>
- <spacer name="horizontalSpacer">
+ <spacer name="horizontalSpacer_5">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</property>
</spacer>
</item>
- <item>
- <widget class="QPushButton" name="pushButtonClear">
- <property name="toolTip">
- <string>Clears the list</string>
- </property>
- <property name="text">
- <string>C&lear</string>
- </property>
- <property name="shortcut">
- <string notr="true">Ctrl+L</string>
+ </layout>
+ </widget>
+ </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>250</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>234</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>125</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>125</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>
- <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>
+ </widget>
+ </item>
+ <item>
+ <widget class="QGroupBox" name="groupBox_2">
+ <property name="minimumSize">
+ <size>
+ <width>250</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>234</width>
+ <height>65</height>
+ </rect>
</property>
- </spacer>
- </item>
- <item>
- <widget class="QPushButton" name="pushButtonStop">
- <property name="enabled">
- <bool>true</bool>
+ <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>125</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>125</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>
+ <widget class="QGroupBox" name="groupBox_3">
+ <property name="minimumSize">
+ <size>
+ <width>250</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>125</width>
+ <height>26</height>
+ </rect>
</property>
<property name="minimumSize">
<size>
- <width>150</width>
+ <width>125</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
- <width>150</width>
+ <width>100</width>
<height>16777215</height>
</size>
</property>
- <property name="toolTip">
- <string>Stops the conversion</string>
+ <property name="editable">
+ <bool>true</bool>
</property>
- <property name="text">
- <string>&Stop</string>
+ </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="icon">
- <iconset resource="reimgconvert.qrc">
- <normaloff>:/main/icons/cancel.png</normaloff>:/main/icons/cancel.png</iconset>
+ <property name="text">
+ <string>Max. Width/Height:</string>
</property>
</widget>
- </item>
- </layout>
- </item>
- <item>
- <widget class="QListWidget" name="listWidget"/>
- </item>
- </layout>
- <zorder>listWidget</zorder>
- <zorder>tabWidget</zorder>
- <zorder></zorder>
+ </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="QHBoxLayout" name="horizontalLayout_5">
+ <item>
+ <widget class="QLabel" name="label_6">
+ <property name="minimumSize">
+ <size>
+ <width>125</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>100</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>Quality (%):</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QComboBox" name="comboBoxQuality">
+ <property name="minimumSize">
+ <size>
+ <width>125</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>
+ <widget class="QLabel" name="label_10">
+ <property name="minimumSize">
+ <size>
+ <width>125</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>
+ <widget class="QComboBox" name="comboBoxSourcePattern">
+ <property name="minimumSize">
+ <size>
+ <width>125</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>
+ </item>
+ <item>
+ <property name="text">
+ <string notr="true">*.png</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>*.gif</string>
+ </property>
+ </item>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="label_11">
+ <property name="minimumSize">
+ <size>
+ <width>125</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>
+ <widget class="QComboBox" name="comboBoxDestType">
+ <property name="minimumSize">
+ <size>
+ <width>125</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>100</width>
+ <height>16777215</height>
+ </size>
+ </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>
+ <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>
+ </layout>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout_2">
+ <item>
+ <layout class="QVBoxLayout" name="verticalLayout_2">
+ <item>
+ <widget class="QLabel" name="label_8">
+ <property name="text">
+ <string>Source Directory (Images):</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <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>100</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>Destination: </string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout_6">
+ <item>
+ <widget class="QComboBox" name="comboBoxTargetDir">
+ <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="QHBoxLayout" name="horizontalLayout_8">
+ <item>
+ <widget class="QCheckBox" name="checkBoxRecursive">
+ <property name="minimumSize">
+ <size>
+ <width>125</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="toolTip">
+ <string>Process the subdirectories too</string>
+ </property>
+ <property name="text">
+ <string>Recursive</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QCheckBox" name="checkBoxCopyOtherFiles">
+ <property name="minimumSize">
+ <size>
+ <width>125</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="toolTip">
+ <string>Files not matching the file pattern will be copied too (and not ignored)</string>
+ </property>
+ <property name="text">
+ <string>Copy other files</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <spacer name="horizontalSpacer_7">
+ <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="pushButtonShowOtherFiles">
+ <property name="minimumSize">
+ <size>
+ <width>150</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>Show other files</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout_7">
+ <item>
+ <widget class="QPushButton" name="pushButtonConvert">
+ <property name="minimumSize">
+ <size>
+ <width>150</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>150</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="toolTip">
+ <string>Converts the images</string>
+ </property>
+ <property name="text">
+ <string>&Convert</string>
+ </property>
+ <property name="icon">
+ <iconset resource="reimgconvert.qrc">
+ <normaloff>:/main/icons/action_go.png</normaloff>:/main/icons/action_go.png</iconset>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <spacer name="horizontalSpacer">
+ <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="pushButtonClear">
+ <property name="minimumSize">
+ <size>
+ <width>150</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="toolTip">
+ <string>Clears the list</string>
+ </property>
+ <property name="text">
+ <string>C&lear</string>
+ </property>
+ <property name="shortcut">
+ <string notr="true">Ctrl+L</string>
+ </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>true</bool>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>150</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>150</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="toolTip">
+ <string>Stops the conversion</string>
+ </property>
+ <property name="text">
+ <string>&Stop</string>
+ </property>
+ <property name="icon">
+ <iconset resource="reimgconvert.qrc">
+ <normaloff>:/main/icons/cancel.png</normaloff>:/main/icons/cancel.png</iconset>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <widget class="QListWidget" name="listWidget"/>
+ </item>
</layout>
</widget>
<widget class="QMenuBar" name="menuBar">
<rect>
<x>0</x>
<y>0</y>
- <width>823</width>
+ <width>958</width>
<height>26</height>
</rect>
</property>