Commit [a2ea3b] Maximize Restore History

Start creation of new form based export widget

Guido Seifert Guido Seifert 2014-06-20

added src/ControlCenter/ExportPlate/ExportForm.cpp
added src/ui_forms/ExportForm.ui
removed src/FileManipulator/ImageOpener.h
changed src/ControlCenter/ExportPlate/ExportPlate.cpp
changed src/ControlCenter/ExportPlate/ExportPlate.h
changed src/ControlCenter/PageListModifier/PageListModifierActions/AbstractPageListModifierAction.h
changed src/ControlCenter/PageListModifier/PageListModifierActions/PageListModifierCreateAction.cpp
changed src/ControlCenter/PageListModifier/PageListModifierActions/PageListModifierCreateAction.h
changed src/ControlCenter/PageListModifier/PageListModifierActions/PageListModifierExportAction.cpp
changed src/ControlCenter/PageListModifier/PageListModifierActions/PageListModifierExportAction.h
changed src/ControlCenter/PageListModifier/PageListModifierActions/PageListModifierOpenAction.cpp
changed src/ControlCenter/SearchPlate/SearchResultFrame.cpp
changed src/ControlCenter/ControlButtons.cpp
changed src/ControlCenter/PageListStack.cpp
changed src/DisplayCode/DisplayMenu.cpp
changed src/DisplayCode/DisplayMenu.h
changed src/FileManipulator/FileSelectorDialog/FileSelectorButtons/FileSelectorWriteAction.cpp
changed src/FileManipulator/FileSelectorDialog/FileSelectorButtons/FileSelectorWriteAction.h
changed src/FileManipulator/FileSelectorDialog/FileSelectorButtons/FileSelectorWritePDFAction.cpp
changed src/FileManipulator/FileSelectorDialog/FileSelectorButtons/FileSelectorWritePDFAction.h
changed src/ComicMaster.cpp
changed CMakeLists.txt
copied src/FileManipulator/ImageOpener.cpp -> src/ControlCenter/ExportPlate/ExportForm.h
src/ControlCenter/ExportPlate/ExportForm.cpp Diff Switch to side-by-side view
Loading...
src/ui_forms/ExportForm.ui Diff Switch to side-by-side view
Loading...
src/ControlCenter/ExportPlate/ExportPlate.cpp Diff Switch to side-by-side view
Loading...
src/ControlCenter/ExportPlate/ExportPlate.h Diff Switch to side-by-side view
Loading...
src/ControlCenter/PageListModifier/PageListModifierActions/AbstractPageListModifierAction.h Diff Switch to side-by-side view
Loading...
src/ControlCenter/PageListModifier/PageListModifierActions/PageListModifierCreateAction.cpp Diff Switch to side-by-side view
Loading...
src/ControlCenter/PageListModifier/PageListModifierActions/PageListModifierCreateAction.h Diff Switch to side-by-side view
Loading...
src/ControlCenter/PageListModifier/PageListModifierActions/PageListModifierExportAction.cpp Diff Switch to side-by-side view
Loading...
src/ControlCenter/PageListModifier/PageListModifierActions/PageListModifierExportAction.h Diff Switch to side-by-side view
Loading...
src/ControlCenter/PageListModifier/PageListModifierActions/PageListModifierOpenAction.cpp Diff Switch to side-by-side view
Loading...
src/ControlCenter/SearchPlate/SearchResultFrame.cpp Diff Switch to side-by-side view
Loading...
src/ControlCenter/ControlButtons.cpp Diff Switch to side-by-side view
Loading...
src/ControlCenter/PageListStack.cpp Diff Switch to side-by-side view
Loading...
src/DisplayCode/DisplayMenu.cpp Diff Switch to side-by-side view
Loading...
src/DisplayCode/DisplayMenu.h Diff Switch to side-by-side view
Loading...
src/FileManipulator/FileSelectorDialog/FileSelectorButtons/FileSelectorWriteAction.cpp Diff Switch to side-by-side view
Loading...
src/FileManipulator/FileSelectorDialog/FileSelectorButtons/FileSelectorWriteAction.h Diff Switch to side-by-side view
Loading...
src/FileManipulator/FileSelectorDialog/FileSelectorButtons/FileSelectorWritePDFAction.cpp Diff Switch to side-by-side view
Loading...
src/FileManipulator/FileSelectorDialog/FileSelectorButtons/FileSelectorWritePDFAction.h Diff Switch to side-by-side view
Loading...
src/ComicMaster.cpp Diff Switch to side-by-side view
Loading...
CMakeLists.txt Diff Switch to side-by-side view
Loading...
src/FileManipulator/ImageOpener.cpp to src/ControlCenter/ExportPlate/ExportForm.h
--- a/src/FileManipulator/ImageOpener.cpp
+++ b/src/ControlCenter/ExportPlate/ExportForm.h
@@ -1,54 +1,51 @@
-/*
-  This file is part of ComicMaster
-  copyright   : (C) 2005 by Guido Seifert
-  email       : Dr.Guido_Seifert@gmx.de
+#ifndef EXPORTFORM_H
+#define EXPORTFORM_H
 
-  ComicMaster is free software; you can redistribute it and/or modify
-  it under the terms of the GNU General Public License as published by
-  the Free Software Foundation; either version 2 of the License, or
-  (at your option) any later version.
+#include <QWidget>
+class QCheckBox;
+class QComboBox;
+class QLineEdit;
+class QPushButton;
 
-  ComicMaster is distributed in the hope that it will be useful,
-  but WITHOUT ANY WARRANTY; without even the implied warranty of
-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
-
-  You should have received a copy of the GNU General Public License
-  along with this program; if not, write to the Free Software
-  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-*/  
-#include "./ImageOpener.h"
-#include "./FileManager.h"
-#include "./TemporaryDirs.h"
-#include "../XML/CMLHandlerSingleton.h"
-#include "../COMICMASTERCONSTANTS.h"
-
-#include <QDebug>
-//-------------------------- Qt 5.x classes -----------------------------------
-#include <QMessageBox>
-//-----------------------------------------------------------------------------
-
-bool FileHandling::openImages(const QString &filename, bool closeOnCancel) {
-	bool result = false;
-	try {
-		result = FileHandling::openComic(filename, closeOnCancel);
-	} catch(const ErrorObject &err) {
-		QString errorString = err.errorMessage();
-		if (!errorString.isEmpty()) {
-			QMessageBox::warning(0, programName, errorString,
-			QMessageBox::Ok, QMessageBox::NoButton,
-			QMessageBox::NoButton);
-			result = false;
-		}
-	}
-	return result;
+namespace Ui {
+class ExportForm;
 }
 
-bool 
-FileHandling::openFileSelector(const QString &filename, bool closeOnCancel){
-	if(openImages(filename, closeOnCancel)){
-		CMLHandlerSingleton::instance()->newDocument();
-		return true;
-	}
-	return false;
-}
+class ExportForm : public QWidget
+{
+	Q_OBJECT
+
+public:
+
+	explicit ExportForm(QWidget *parent = 0, Qt::WindowFlags f = 0);
+	~ExportForm();
+
+private:
+
+	Ui::ExportForm *ui;
+	QCheckBox   * _createDestinationCheckBox;
+	QCheckBox   * _originalSizeCheckBox;
+	QCheckBox   * _formatCheckBox;
+	QComboBox   * _formatComboBox;
+	QLineEdit   * _destinationLineEdit;
+	QPushButton *_destinationSelectorButton;
+
+	QString filename(int index) const;
+
+private slots:
+
+	void cancelClicked(void);
+
+	void originaSizeCheckBoxChanged(int state);
+
+	void formatCheckBoxChanged(int state);
+
+	void destinationClicked(void);
+
+	void exportClicked(void);
+
+	void textChangedSlt(const QString &text);
+
+};
+
+#endif // EXPORTFORM_H