PictureCrypt
1.4.1
An image-steganography project
|
The ViewPC class View layer of the app. Controls EncryptDialog and ProgressDialog. More...
#include <viewpc.h>
Public Slots | |
void | alert (QString message, bool isWarning=false) |
ViewPC::alert Slot to create QMessageBox with message. More... | |
void | saveData (QByteArray Edata) |
ViewPC::saveData Slot to be called to save data using QFileDialog. More... | |
void | saveImage (QImage *image) |
ViewPC::saveImage Slot to be called to save image using QFileDialog. More... | |
void | setProgress (int val) |
ViewPC::setProgress Slot to set the value of the ProgressDialog (ViewPC::dialog). More... | |
void | abortCircuit () |
ViewPC::abortCircuit Slot to close ProgressDialog (ViewPC::dialog) More... | |
void | setEncryptMode (bool encr) |
ViewPC::setEncryptMode Set the encrpt mode (ViewPC::isEncrypt) More... | |
void | setVersion (QString version) |
ViewPC::setVersion Set the version of the app from ControllerPC. More... | |
Signals | |
void | encrypt (QByteArray data, QImage *image, int mode, QString key, int bitsUsed) |
encrypt Signal calling ModelPC::encrypt More... | |
void | inject (QByteArray data, QImage *image, int mode, int bitsUsed) |
inject Signal calling ModelPC::inject More... | |
void | decrypt (QImage *_image, QString key, int mode) |
decrypt Signal calling ModelPC::decrypt More... | |
void | abortModel () |
abortModel Signal calling to stop ModelPC::circuit More... | |
void | setJPHSDir (QString dir) |
setJPHSPath Sets the default JPHS directory More... | |
Public Member Functions | |
ViewPC (QWidget *parent=nullptr) | |
~ViewPC () | |
ViewPC::~ViewPC Simple destructor for this layer. More... | |
Public Attributes | |
QProgressDialog * | dialog |
dialog ProgressDialog used. More... | |
bool | progressDialogClosed |
progressDialogClosed Flag, if dialog is closed. More... | |
QMap< QString, QString > | errorsDict |
errorsDict QMap - Errors dictionary More... | |
Protected Slots | |
void | on_fileButton_clicked () |
ViewPC::on_fileButton_clicked Slot to be called, when according button is pressed. More... | |
void | on_startButton_clicked () |
ViewPC::on_startButton_clicked Slot to be called, when Start Button is pressed. More... | |
void | on_actionAbout_triggered () |
ViewPC::on_actionAbout_triggered Opens about page. More... | |
void | on_actionHelp_triggered () |
ViewPC::on_actionHelp_triggered Opens online documentation. More... | |
void | setupErrorsDict () |
ViewPC::setupErrorsDict Setups errorsDict from strings.xml. More... | |
Protected Member Functions | |
QString | requestKey () |
ViewPC::requestKey Request keyphrase from user using InputDialog. More... | |
The ViewPC class View layer of the app. Controls EncryptDialog and ProgressDialog.
|
explicit |
ViewPC::~ViewPC | ( | ) |
ViewPC::~ViewPC Simple destructor for this layer.
Definition at line 19 of file viewpc.cpp.
|
slot |
ViewPC::abortCircuit Slot to close ProgressDialog (ViewPC::dialog)
Definition at line 211 of file viewpc.cpp.
|
signal |
|
slot |
ViewPC::alert Slot to create QMessageBox with message.
message | Message to be shown |
isWarning | Flag, if message is critical. |
Definition at line 125 of file viewpc.cpp.
|
signal |
decrypt Signal calling ModelPC::decrypt
_image | Image for decryption |
key | encryption key |
mode | Mode of decryption |
|
signal |
encrypt Signal calling ModelPC::encrypt
data | Data to write |
image | Image to be encrypted into |
mode | Mode of encryption |
key | Key of encryption |
bitsUsed | Bits used per byte |
|
signal |
inject Signal calling ModelPC::inject
data | Data to write |
image | Image to be encrypted into. |
mode | Mode of encryption |
bitsUsed | Bits used per byte |
|
protectedslot |
ViewPC::on_actionAbout_triggered Opens about page.
Definition at line 268 of file viewpc.cpp.
|
protectedslot |
ViewPC::on_actionHelp_triggered Opens online documentation.
Definition at line 278 of file viewpc.cpp.
|
protectedslot |
ViewPC::on_fileButton_clicked Slot to be called, when according button is pressed.
Definition at line 38 of file viewpc.cpp.
|
protectedslot |
ViewPC::on_startButton_clicked Slot to be called, when Start Button is pressed.
If Encrypting mode is active the data from text browser or from file from file selector will be opened and checked in size.
Then the EncryptDialog opens and image and key is selected. Then the ViewPC::encrypt signal is called to start ModelPC::encrypt
Else, the image from file selector is transmitted to ModelPC::decrypt
Definition at line 60 of file viewpc.cpp.
|
protected |
ViewPC::requestKey Request keyphrase from user using InputDialog.
Definition at line 248 of file viewpc.cpp.
|
slot |
ViewPC::saveData Slot to be called to save data using QFileDialog.
Edata | Encrypted data to be saved. |
Definition at line 146 of file viewpc.cpp.
|
slot |
ViewPC::saveImage Slot to be called to save image using QFileDialog.
image | Image to be saved. |
Definition at line 167 of file viewpc.cpp.
|
slot |
ViewPC::setEncryptMode Set the encrpt mode (ViewPC::isEncrypt)
encr | = isEncrypt, true if encrypting, false if decrypting |
Definition at line 224 of file viewpc.cpp.
|
signal |
setJPHSPath Sets the default JPHS directory
dir | Directory |
|
slot |
ViewPC::setProgress Slot to set the value of the ProgressDialog (ViewPC::dialog).
val | New value of the dialog. If -1, creates ProgressDialog, if 101 closes the dialog. |
Definition at line 185 of file viewpc.cpp.
|
protectedslot |
ViewPC::setupErrorsDict Setups errorsDict from strings.xml.
Definition at line 286 of file viewpc.cpp.
|
slot |
ViewPC::setVersion Set the version of the app from ControllerPC.
version | Version as QString |
Definition at line 239 of file viewpc.cpp.
QProgressDialog* ViewPC::dialog |
dialog ProgressDialog used.
QMap<QString, QString> ViewPC::errorsDict |
bool ViewPC::progressDialogClosed |
progressDialogClosed Flag, if dialog is closed.