summaryrefslogtreecommitdiffstats
path: root/src/dialogsave.h
diff options
context:
space:
mode:
authorStefan Suhren <suhren.stefan@fh-swf.de>2015-03-25 10:15:50 +0100
committerStefan Suhren <suhren.stefan@fh-swf.de>2015-03-25 10:33:32 +0100
commita1e3d36dca9c6abf235c7ddf47ab9185c4b748d5 (patch)
tree859befb5df101432b7388e1562f90a01c6d8e238 /src/dialogsave.h
downloadIT-Sicherheit-a1e3d36dca9c6abf235c7ddf47ab9185c4b748d5.tar.gz
IT-Sicherheit-a1e3d36dca9c6abf235c7ddf47ab9185c4b748d5.zip
First commit of IT-Sicherheit
Diffstat (limited to 'src/dialogsave.h')
-rw-r--r--src/dialogsave.h110
1 files changed, 110 insertions, 0 deletions
diff --git a/src/dialogsave.h b/src/dialogsave.h
new file mode 100644
index 0000000..edd977b
--- /dev/null
+++ b/src/dialogsave.h
@@ -0,0 +1,110 @@
+#ifndef DIALOGSAVE_H
+#define DIALOGSAVE_H
+
+#include <QDialog>
+#include <QFileDialog>
+#include <QDir>
+
+
+namespace Ui {
+class DialogSave;
+}
+
+
+
+/**
+* \class DialogSave
+* \brief Dialog-Widget for saving Files, providing some extra Options.
+*
+* This Class provides a Dialog-Widget used for saving a file.
+* Options are saving of encrypted or unencrypted data, and marking either as binary.
+* [The "marking-as-binary"-option should be automatized in future versions]
+* \author Uwe Gogolin [Gogolin.Uwe@FH-SWF.de]
+* \version 0.1
+* \date 28.02.2013
+*/
+class DialogSave : 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.
+ */
+ DialogSave(QWidget *parent = 0);
+
+
+ /**
+ * \brief Class Destructor.
+ *
+ * Class Destructor. Deletes the ui-Object containing the graphical Elements.
+ */
+ ~DialogSave();
+
+
+
+ /**
+ * \brief Method to decide whether encrypted or unencrypted data shall be saved.
+ *
+ * Returns true if encrypted data should be saved, false if unencrypted data should be saved.
+ * \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 save.
+ *
+ * Returns the name of the file to be saved.
+ * \returns QString containing the name of the file to be saved.
+ */
+ QString getFileName();
+
+
+
+private: //Attributes
+ /**
+ * \brief Pointer to GUI-Object.
+ */
+ Ui::DialogSave *ui;
+
+
+
+private slots:
+ /**
+ * \brief Slot for the Select File Button.
+ *
+ * Opens a Dialog for selection of the file to save.
+ */
+ void on_pushButtonSelectFile_clicked();
+
+
+ /**
+ * \brief Slot for the Save Button.
+ *
+ * Saves data from the currently selected file, with the currently selected Parameters (clear- or cryptData, binary data or Text)
+ */
+ void on_pushButtonSave_clicked();
+
+
+ /**
+ * \brief Slot for the Cancel Button.
+ *
+ * Closes the Dialog (calls QDialog::reject()).
+ */
+ void on_pushButtonCancel_clicked();
+};
+
+#endif // DIALOGSAVE_H