summaryrefslogtreecommitdiffstats
path: root/src/dialogload.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/dialogload.h')
-rw-r--r--src/dialogload.h108
1 files changed, 108 insertions, 0 deletions
diff --git a/src/dialogload.h b/src/dialogload.h
new file mode 100644
index 0000000..f9e6af3
--- /dev/null
+++ b/src/dialogload.h
@@ -0,0 +1,108 @@
+#ifndef DIALOGLOAD_H
+#define DIALOGLOAD_H
+
+#include <QDialog>
+#include <QFileDialog>
+#include <QDir>
+#include <QString>
+
+namespace Ui {
+class DialogLoad;
+}
+
+
+
+/**
+* \class DialogLoad
+* \brief Dialog-Widget for opening Files, providing some extra Options.
+*
+* This Class provides a Dialog-Widget used for loading a file.
+* Options are loading of encrypted or unencrypted data, and marking either as binary.
+* \author Uwe Gogolin [Gogolin.Uwe@FH-SWF.de]
+* \version 0.1
+* \date 28.02.2013
+*/
+class DialogLoad : public QDialog
+{
+ Q_OBJECT
+
+public: //Methods
+ /**
+ * \brief Class Constructor.
+ *
+ * Class Constructor. Initializes Graphical Elements of the Widget and sets the Window's Title.
+ * \param QWidget* parent The QWidget the used instance of this class is subordinated to.
+ */
+ DialogLoad(QWidget* parent = 0);
+
+
+ /**
+ * \brief Class Destructor.
+ *
+ * Class Destructor. Deletes the ui-Object containing the graphical Elements.
+ */
+ ~DialogLoad();
+
+
+ /**
+ * \brief Method to decide whether encrypted or unencrypted data shall be loaded.
+ *
+ * Returns true if encrypted data should be loaded, false if unencrypted data should be loaded.
+ * \returns true for encrypted, false for unencrypted data
+ */
+ bool getEncrypted();
+
+
+ /**
+ * \brief Method to decide if the file should be opened in binary mode.
+ *
+ * Returns true if the file should be opened in binary mode.
+ * \returns true if the file should be opened in binary mode.
+ */
+ bool getBinary();
+
+
+ /**
+ * \brief Method to get the name of the file to open.
+ *
+ * Returns the name of the file to be opened.
+ * \returns QString containing the name of the file to be opened.
+ */
+ QString getFileName();
+
+
+
+private: //Attributes
+ /**
+ * \brief Pointer to GUI-Object.
+ */
+ Ui::DialogLoad *ui;
+
+
+
+private slots:
+ /**
+ * \brief Slot for the Select File Button.
+ *
+ * Opens a Dialog for selection of the file to open.
+ */
+ void on_pushButtonSelectFile_clicked();
+
+
+ /**
+ * \brief Slot for the Load Button.
+ *
+ * Loads data from the currently selected file, with the currently selected Parameters (clear- or cryptData, binary data or Text)
+ */
+ void on_pushButtonLoad_clicked();
+
+
+ /**
+ * \brief Slot for the Cancel Button.
+ *
+ * Closes the Dialog (calls QDialog::reject()).
+ */
+ void on_pushButtonCancel_clicked();
+};
+
+#endif // DIALOGLOAD_H