mirror of
https://github.com/creyD/intelliphoto.git
synced 2026-04-14 12:20:32 +02:00
Merge branch 'dev' into 'hotfix-history'
# Conflicts: # src/Layer/PaintingArea.h
This commit is contained in:
@@ -9,35 +9,119 @@
|
||||
#include <QPushButton>
|
||||
#include <QSpinBox>
|
||||
|
||||
/*!
|
||||
* \brief The IntelliInputDialog class is a customized Input Dialog to get Integers
|
||||
*/
|
||||
class IntelliInputDialog : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
/*!
|
||||
* \brief IntelliInputDialog is the baisc constructor to for the InputDialog
|
||||
* \param Title - Title of the Input Dialog.
|
||||
* \param Label - A Label for the Iput Dialog, to show further information.
|
||||
* \param value - The standart value in the Input Box.
|
||||
* \param minValue - The minimal value to read.
|
||||
* \param maxValue - The maximal value to read.
|
||||
* \param step - The step size of Values.
|
||||
* \param ok - A check if the input was okay
|
||||
*/
|
||||
IntelliInputDialog(QString Title = nullptr, QString Label = nullptr, int value = 5, int minValue = -2147483647, int maxValue = 2147483647, int step = 1, bool* ok = nullptr);
|
||||
|
||||
|
||||
/*!
|
||||
* \brief getInt is a static funktion ´, which creates an Input Dialog and gets an Integer.
|
||||
* \param Title - Title of the Input Dialog.
|
||||
* \param Label - A Label for the Iput Dialog, to show further information.
|
||||
* \param value - The standart value in the Input Box.
|
||||
* \param minValue - The minimal value to read.
|
||||
* \param maxValue - The maximal value to read.
|
||||
* \param step - The step size of Values.
|
||||
* \param ok - A check if the input was okay
|
||||
* \return
|
||||
*/
|
||||
static int getInt(QString Title = nullptr, QString Label = nullptr, int value = 5, int minValue = -2147483647, int maxValue = 2147483647, int step = 1, bool* ok = nullptr);
|
||||
|
||||
public slots:
|
||||
/*!
|
||||
* \brief slotCloseEvent is a slot for catching the close Event.
|
||||
*/
|
||||
void slotCloseEvent();
|
||||
|
||||
/*!
|
||||
* \brief slotEingabe is a slot for catching the Input Event.
|
||||
*/
|
||||
void slotEingabe();
|
||||
|
||||
private:
|
||||
/*!
|
||||
* \brief createInputBox creates an Input Box for reading values.
|
||||
* \param Title - Title of the Input Dialog.
|
||||
* \param Label - A Label for the Iput Dialog, to show further information.
|
||||
* \param value - The standart value in the Input Box.
|
||||
* \param minValue - The minimal value to read.
|
||||
* \param maxValue - The maximal value to read.
|
||||
* \param step - The step size of Values.
|
||||
*/
|
||||
void createInputBox(QString Title = nullptr, QString Label = nullptr, int value = 5, int minValue = -2147483647, int maxValue = 2147483647, int step = 1);
|
||||
|
||||
/*!
|
||||
* \brief createConnections connects the close and Eingabe slot.
|
||||
*/
|
||||
void createConnections();
|
||||
|
||||
/*!
|
||||
* \brief setInputBoxStyle
|
||||
*/
|
||||
void setInputBoxStyle();
|
||||
|
||||
/*!
|
||||
* \brief valueInt the variable where the input is saved.
|
||||
*/
|
||||
int valueInt;
|
||||
|
||||
/*!
|
||||
* \brief Layout to place als gui event onto.
|
||||
*/
|
||||
QGridLayout* Layout;
|
||||
|
||||
/*!
|
||||
* \brief ButtonBox is a gui elment for the button.
|
||||
*/
|
||||
QDialogButtonBox* ButtonBox;
|
||||
|
||||
/*!
|
||||
* \brief notClosed saves the value, if the InputDialog is closed.
|
||||
*/
|
||||
bool* notClosed;
|
||||
|
||||
/*!
|
||||
* \brief Linesize to standarize the line size.
|
||||
*/
|
||||
const QSize Linesize = QSize(150,20);
|
||||
|
||||
/*!
|
||||
* \brief Buttonsize to standarize the button size.
|
||||
*/
|
||||
const QSize Buttonsize = QSize(72,20);
|
||||
|
||||
/*!
|
||||
* \brief InputLabel a gui element for a label.
|
||||
*/
|
||||
QLabel* InputLabel;
|
||||
|
||||
/*!
|
||||
* \brief Input a gui element for a SpinBox.
|
||||
*/
|
||||
QSpinBox* Input;
|
||||
|
||||
/*!
|
||||
* \brief okButton a gui element for the ok Button.
|
||||
*/
|
||||
QPushButton* okButton;
|
||||
|
||||
/*!
|
||||
* \brief cancelButton a gui element for the cancel button.
|
||||
*/
|
||||
QPushButton* cancelButton;
|
||||
};
|
||||
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
#include <QCloseEvent>
|
||||
#include <QDebug>
|
||||
#include <string>
|
||||
#include <QScreen>
|
||||
#include <QGuiApplication>
|
||||
|
||||
// IntelliPhotoGui constructor
|
||||
IntelliPhotoGui::IntelliPhotoGui(){
|
||||
@@ -20,7 +22,7 @@ IntelliPhotoGui::IntelliPhotoGui(){
|
||||
setIntelliStyle();
|
||||
// Size the app
|
||||
resize(600,600);
|
||||
showMaximized();
|
||||
showMaximized();
|
||||
setDefaultValues();
|
||||
}
|
||||
|
||||
@@ -143,7 +145,7 @@ void IntelliPhotoGui::slotChangeDim(){
|
||||
|
||||
// Change dimension
|
||||
if (ok1&&ok2) {
|
||||
paintingArea->setLayerDimensions(width,height);
|
||||
paintingArea->setCanvasDimensions(width,height);
|
||||
UpdateGui();
|
||||
}
|
||||
}
|
||||
@@ -155,7 +157,7 @@ void IntelliPhotoGui::slotDeleteLayer(){
|
||||
// "delete Layer" is the title of the window
|
||||
// the next tr is the text to display
|
||||
// Define the standard Value, min, max, step and ok button
|
||||
int layerNumber = IntelliInputDialog::getInt("Delete Layer", "Number:", paintingArea->getNumberOfActiveLayer() + 1, 1, static_cast<int>(paintingArea->layerBundle.size()), 1, &ok1);
|
||||
int layerNumber = IntelliInputDialog::getInt("Delete Layer", "Number:", paintingArea->getIndexOfActiveLayer() + 1, 1, static_cast<int>(paintingArea->layerBundle.size()), 1, &ok1);
|
||||
|
||||
// Create New Layer
|
||||
if(ok1) {
|
||||
@@ -172,7 +174,7 @@ void IntelliPhotoGui::slotSetActiveAlpha(){
|
||||
// the next tr is the text to display
|
||||
// Define the standard Value, min, max, step and ok button
|
||||
|
||||
int layer = IntelliInputDialog::getInt("Layer to set on", "Layer:", paintingArea->getNumberOfActiveLayer() + 1, 1, static_cast<int>(paintingArea->layerBundle.size()), 1, &ok1);
|
||||
int layer = IntelliInputDialog::getInt("Layer to set on", "Layer:", paintingArea->getIndexOfActiveLayer() + 1, 1, static_cast<int>(paintingArea->layerBundle.size()), 1, &ok1);
|
||||
|
||||
// "New Alpha" is the title of the window
|
||||
int alpha = IntelliInputDialog::getInt("Layer to set on", "Alpha:", 255, 0, 255, 1, &ok2);
|
||||
@@ -191,7 +193,7 @@ void IntelliPhotoGui::slotSetPolygon(){
|
||||
// "Layer to set on" is the title of the window
|
||||
// the next tr is the text to display
|
||||
// Define the standard Value, min, max, step and ok button
|
||||
int layer = IntelliInputDialog::getInt("Layer to set on", "Layer:", paintingArea->getNumberOfActiveLayer() + 1, 1, static_cast<int>(paintingArea->layerBundle.size()), 1, &ok1);
|
||||
int layer = IntelliInputDialog::getInt("Layer to set on", "Layer:", paintingArea->getIndexOfActiveLayer() + 1, 1, static_cast<int>(paintingArea->layerBundle.size()), 1, &ok1);
|
||||
|
||||
if (ok1)
|
||||
{
|
||||
@@ -243,15 +245,15 @@ void IntelliPhotoGui::slotSetActiveLayer(){
|
||||
}
|
||||
}
|
||||
|
||||
void IntelliPhotoGui::slotUpdateRenderSettingsOn(){
|
||||
void IntelliPhotoGui::slotUpdateFastRenderSettingsOn(){
|
||||
paintingArea->setRenderSettings(true);
|
||||
FastRendererLabel->setText("Fast Render: On");
|
||||
FastRendererLabel->setText("Fast Render: On");
|
||||
UpdateGui();
|
||||
}
|
||||
|
||||
void IntelliPhotoGui::slotUpdateRenderSettingsOff(){
|
||||
void IntelliPhotoGui::slotUpdateFastRenderSettingsOff(){
|
||||
paintingArea->setRenderSettings(false);
|
||||
FastRendererLabel->setText("Fast Render: Off");
|
||||
FastRendererLabel->setText("Fast Render: Off");
|
||||
UpdateGui();
|
||||
}
|
||||
|
||||
@@ -306,8 +308,8 @@ void IntelliPhotoGui::slotCreateFloodFillTool(){
|
||||
}
|
||||
|
||||
void IntelliPhotoGui::slotCreateGradientTool(){
|
||||
GradientButton->setChecked(true);
|
||||
paintingArea->createGradientTool();
|
||||
GradientButton->setChecked(true);
|
||||
paintingArea->createGradientTool();
|
||||
}
|
||||
|
||||
// Open an about dialog
|
||||
@@ -330,9 +332,10 @@ void IntelliPhotoGui::slotEnterPressed(){
|
||||
paintingArea->Toolsettings.setInnerAlpha(string.toInt());
|
||||
}
|
||||
|
||||
void IntelliPhotoGui::slotResetTools(){
|
||||
void IntelliPhotoGui::slotResetToolButtons(){
|
||||
CircleButton->setChecked(false);
|
||||
FloodFillButton->setChecked(false);
|
||||
GradientButton->setChecked(false);
|
||||
LineButton->setChecked(false);
|
||||
PenButton->setChecked(false);
|
||||
PlainButton->setChecked(false);
|
||||
@@ -424,7 +427,7 @@ void IntelliPhotoGui::createActions(){
|
||||
connect(actionCreateNewShapedLayer, SIGNAL(triggered()), this, SLOT(slotCreateNewShapedLayer()));
|
||||
|
||||
// Delete New Layer action and tie to IntelliPhotoGui::deleteLayer()
|
||||
actionDeleteLayer = new QAction(tr("&Delete Layer..."), this);
|
||||
actionDeleteLayer = new QAction(tr("&Delete Layer"), this);
|
||||
actionDeleteLayer->setShortcut(QKeySequence(Qt::CTRL + Qt::ALT + Qt::Key_D));
|
||||
connect(actionDeleteLayer, SIGNAL(triggered()), this, SLOT(slotDeleteLayer()));
|
||||
|
||||
@@ -433,50 +436,50 @@ void IntelliPhotoGui::createActions(){
|
||||
connect(actionChangeDim, SIGNAL(triggered()), this, SLOT(slotChangeDim()));
|
||||
connect(dimCanvas, SIGNAL(clicked()), this, SLOT(slotChangeDim()));
|
||||
|
||||
actionSetActiveLayer = new QAction(tr("&set Active"), this);
|
||||
actionSetActiveLayer = new QAction(tr("&Set Active"), this);
|
||||
actionSetActiveLayer->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_A));
|
||||
connect(actionSetActiveLayer, SIGNAL(triggered()), this, SLOT(slotSetActiveLayer()));
|
||||
|
||||
actionSetActiveAlpha = new QAction(tr("&set Alpha"), this);
|
||||
actionSetActiveAlpha = new QAction(tr("&Set Alpha"), this);
|
||||
actionSetActiveAlpha->setShortcut(QKeySequence(Qt::CTRL + Qt::ALT + Qt::Key_A));
|
||||
connect(actionSetActiveAlpha, SIGNAL(triggered()), this, SLOT(slotSetActiveAlpha()));
|
||||
|
||||
actionSetPolygon = new QAction(tr("&set new Polygondata"), this);
|
||||
actionSetPolygon = new QAction(tr("&Set Polygon Data"), this);
|
||||
actionSetPolygon->setShortcut(QKeySequence(Qt::CTRL + Qt::ALT + Qt::Key_P));
|
||||
connect(actionSetPolygon, SIGNAL(triggered()), this, SLOT(slotSetPolygon()));
|
||||
|
||||
actionMovePositionUp = new QAction(tr("&move Up"), this);
|
||||
actionMovePositionUp = new QAction(tr("&Move Up"), this);
|
||||
actionMovePositionUp->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_Up));
|
||||
connect(actionMovePositionUp, SIGNAL(triggered()), this, SLOT(slotPositionMoveUp()));
|
||||
|
||||
actionMovePositionDown = new QAction(tr("&move Down"), this);
|
||||
actionMovePositionDown = new QAction(tr("&Move Down"), this);
|
||||
actionMovePositionDown->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_Down));
|
||||
connect(actionMovePositionDown, SIGNAL(triggered()), this, SLOT(slotPositionMoveDown()));
|
||||
|
||||
actionMovePositionLeft = new QAction(tr("&move Left"), this);
|
||||
actionMovePositionLeft = new QAction(tr("&Move Left"), this);
|
||||
actionMovePositionLeft->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_Left));
|
||||
connect(actionMovePositionLeft, SIGNAL(triggered()), this, SLOT(slotPositionMoveLeft()));
|
||||
|
||||
actionMovePositionRight = new QAction(tr("&move Right"), this);
|
||||
actionMovePositionRight = new QAction(tr("&Move Right"), this);
|
||||
actionMovePositionRight->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_Right));
|
||||
connect(actionMovePositionRight, SIGNAL(triggered()), this, SLOT(slotPositionMoveRight()));
|
||||
|
||||
actionMoveLayerUp = new QAction(tr("&move Layer Up"), this);
|
||||
actionMoveLayerUp = new QAction(tr("&Move Forth"), this);
|
||||
actionMoveLayerUp->setShortcut(QKeySequence(Qt::CTRL + Qt::ALT + Qt::Key_Up));
|
||||
connect(actionMoveLayerUp, SIGNAL(triggered()), this, SLOT(slotMoveLayerUp()));
|
||||
|
||||
actionMoveLayerDown = new QAction(tr("&move Layer Down"), this);
|
||||
actionMoveLayerDown = new QAction(tr("&Move Back"), this);
|
||||
actionMoveLayerDown->setShortcut(QKeySequence(Qt::CTRL + Qt::ALT + Qt::Key_Down));
|
||||
connect(actionMoveLayerDown, SIGNAL(triggered()), this, SLOT(slotMoveLayerDown()));
|
||||
|
||||
//Create Update RenderSettings Actions here
|
||||
actionUpdateRenderSettingsOn = new QAction(tr("&On"), this);
|
||||
actionUpdateRenderSettingsOn->setShortcut(QKeySequence(Qt::ALT + Qt::SHIFT + +Qt::Key_A));
|
||||
connect(actionUpdateRenderSettingsOn, SIGNAL(triggered()),this, SLOT(slotUpdateRenderSettingsOn()));
|
||||
actionUpdateFastRenderSettingsOn = new QAction(tr("&On"), this);
|
||||
actionUpdateFastRenderSettingsOn->setShortcut(QKeySequence(Qt::ALT + Qt::SHIFT + +Qt::Key_A));
|
||||
connect(actionUpdateFastRenderSettingsOn, SIGNAL(triggered()),this, SLOT(slotUpdateFastRenderSettingsOn()));
|
||||
|
||||
actionUpdateRenderSettingsOff = new QAction(tr("&Off"), this);
|
||||
actionUpdateRenderSettingsOff->setShortcut(QKeySequence(Qt::ALT + Qt::SHIFT + +Qt::Key_D));
|
||||
connect(actionUpdateRenderSettingsOff, SIGNAL(triggered()),this, SLOT(slotUpdateRenderSettingsOff()));
|
||||
actionUpdateFastRenderSettingsOff = new QAction(tr("&Off"), this);
|
||||
actionUpdateFastRenderSettingsOff->setShortcut(QKeySequence(Qt::ALT + Qt::SHIFT + +Qt::Key_D));
|
||||
connect(actionUpdateFastRenderSettingsOff, SIGNAL(triggered()),this, SLOT(slotUpdateFastRenderSettingsOff()));
|
||||
|
||||
//Create Color Actions here
|
||||
actionColorPickerFirstColor = new QAction(tr("&Main"), this);
|
||||
@@ -497,79 +500,78 @@ void IntelliPhotoGui::createActions(){
|
||||
//Create Tool actions down here
|
||||
actionCreatePlainTool = new QAction(tr("&Plain"), this);
|
||||
actionCreatePlainTool->setShortcut(QKeySequence(Qt::CTRL + Qt::ALT + Qt::SHIFT + Qt::Key_P));
|
||||
connect(actionCreatePlainTool, SIGNAL(triggered()), this, SLOT(slotResetTools()));
|
||||
connect(actionCreatePlainTool, SIGNAL(triggered()), this, SLOT(slotResetToolButtons()));
|
||||
connect(actionCreatePlainTool, SIGNAL(triggered()), this, SLOT(slotCreatePlainTool()));
|
||||
|
||||
|
||||
actionCreatePenTool = new QAction(tr("&Pen"),this);
|
||||
actionCreatePenTool->setShortcut(QKeySequence(Qt::CTRL + Qt::ALT + Qt::SHIFT + Qt::Key_S));
|
||||
connect(actionCreatePenTool, SIGNAL(triggered()), this, SLOT(slotResetTools()));
|
||||
connect(actionCreatePenTool, SIGNAL(triggered()), this, SLOT(slotResetToolButtons()));
|
||||
connect(actionCreatePenTool, SIGNAL(triggered()), this, SLOT(slotCreatePenTool()));
|
||||
|
||||
actionCreateLineTool = new QAction(tr("&Line"), this);
|
||||
actionCreateLineTool->setShortcut(QKeySequence(Qt::CTRL + Qt::ALT + Qt::SHIFT + Qt::Key_L));
|
||||
connect(actionCreateLineTool, SIGNAL(triggered()), this, SLOT(slotResetTools()));
|
||||
connect(actionCreateLineTool, SIGNAL(triggered()), this, SLOT(slotResetToolButtons()));
|
||||
connect(actionCreateLineTool, SIGNAL(triggered()), this, SLOT(slotCreateLineTool()));
|
||||
|
||||
actionCreateCircleTool = new QAction(tr("&Circle"), this);
|
||||
actionCreateCircleTool->setShortcut(QKeySequence(Qt::CTRL + Qt::ALT + Qt::SHIFT + Qt::Key_C));
|
||||
connect(actionCreateCircleTool, SIGNAL(triggered()), this, SLOT(slotResetTools()));
|
||||
connect(actionCreateCircleTool, SIGNAL(triggered()), this, SLOT(slotResetToolButtons()));
|
||||
connect(actionCreateCircleTool, SIGNAL(triggered()), this, SLOT(slotCreateCircleTool()));
|
||||
|
||||
actionCreateRectangleTool = new QAction(tr("&Rectangle"), this);
|
||||
actionCreateRectangleTool->setShortcut(QKeySequence(Qt::CTRL + Qt::ALT + Qt::SHIFT + Qt::Key_R));
|
||||
connect(actionCreateRectangleTool, SIGNAL(triggered()), this, SLOT(slotResetTools()));
|
||||
connect(actionCreateRectangleTool, SIGNAL(triggered()), this, SLOT(slotResetToolButtons()));
|
||||
connect(actionCreateRectangleTool, SIGNAL(triggered()), this, SLOT(slotCreateRectangleTool()));
|
||||
|
||||
actionCreatePolygonTool = new QAction(tr("&Polygon"), this);
|
||||
actionCreatePolygonTool->setShortcut(QKeySequence(Qt::CTRL + Qt::ALT + Qt::SHIFT + Qt::Key_V));
|
||||
connect(actionCreatePolygonTool, SIGNAL(triggered()), this, SLOT(slotResetTools()));
|
||||
connect(actionCreatePolygonTool, SIGNAL(triggered()), this, SLOT(slotResetToolButtons()));
|
||||
connect(actionCreatePolygonTool, SIGNAL(triggered()), this, SLOT(slotCreatePolygonTool()));
|
||||
|
||||
actionCreateFloodFillTool = new QAction(tr("&FloodFill"), this);
|
||||
actionCreateFloodFillTool->setShortcut(QKeySequence(Qt::CTRL + Qt::ALT + Qt::SHIFT + Qt::Key_F));
|
||||
connect(actionCreateFloodFillTool, SIGNAL(triggered()), this, SLOT(slotResetTools()));
|
||||
connect(actionCreateFloodFillTool, SIGNAL(triggered()), this, SLOT(slotResetToolButtons()));
|
||||
connect(actionCreateFloodFillTool, SIGNAL(triggered()), this, SLOT(slotCreateFloodFillTool()));
|
||||
|
||||
actionCreateGradientTool = new QAction(tr("&Gradient"),this);
|
||||
connect(actionCreateGradientTool, SIGNAL(triggered()), this, SLOT(slotResetTools()));
|
||||
connect(actionCreateGradientTool, SIGNAL(triggered()), this, SLOT(slotCreateGradientTool()));
|
||||
actionCreateGradientTool = new QAction(tr("&Gradient"),this);
|
||||
actionCreateGradientTool->setShortcut(QKeySequence(Qt::CTRL + Qt::ALT + Qt::SHIFT + Qt::Key_G));
|
||||
connect(actionCreateGradientTool, SIGNAL(triggered()), this, SLOT(slotResetToolButtons()));
|
||||
connect(actionCreateGradientTool, SIGNAL(triggered()), this, SLOT(slotCreateGradientTool()));
|
||||
|
||||
// Create about action and tie to IntelliPhotoGui::about()
|
||||
actionAboutDialog = new QAction(tr("&About"), this);
|
||||
actionAboutDialog->setShortcut(Qt::Key_F2);
|
||||
actionAboutDialog = new QAction(tr("&About"), this);
|
||||
connect(actionAboutDialog, SIGNAL(triggered()), this, SLOT(slotAboutDialog()));
|
||||
|
||||
// Create about Qt action and tie to IntelliPhotoGui::aboutQt()
|
||||
actionAboutQtDialog = new QAction(tr("About &Qt"), this);
|
||||
actionAboutQtDialog->setShortcut(Qt::Key_F3);
|
||||
actionAboutQtDialog = new QAction(tr("About &Qt"), this);
|
||||
connect(actionAboutQtDialog, SIGNAL(triggered()), qApp, SLOT(aboutQt()));
|
||||
|
||||
connect(EditLineWidth, SIGNAL(returnPressed()), this, SLOT(slotEnterPressed()));
|
||||
connect(EditLineInnerAlpha, SIGNAL(returnPressed()), this, SLOT(slotEnterPressed()));
|
||||
|
||||
connect(CircleButton,SIGNAL(pressed()), this, SLOT(slotResetTools()));
|
||||
connect(CircleButton,SIGNAL(pressed()), this, SLOT(slotResetToolButtons()));
|
||||
connect(CircleButton, SIGNAL(clicked()), this, SLOT(slotCreateCircleTool()));
|
||||
|
||||
connect(FloodFillButton,SIGNAL(pressed()), this, SLOT(slotResetTools()));
|
||||
connect(FloodFillButton,SIGNAL(pressed()), this, SLOT(slotResetToolButtons()));
|
||||
connect(FloodFillButton, SIGNAL(clicked()), this, SLOT(slotCreateFloodFillTool()));
|
||||
|
||||
connect(GradientButton, SIGNAL(pressed()), this, SLOT(slotResetTools()));
|
||||
connect(GradientButton, SIGNAL(clicked()), this, SLOT(slotCreateGradientTool()));
|
||||
connect(GradientButton, SIGNAL(pressed()), this, SLOT(slotResetToolButtons()));
|
||||
connect(GradientButton, SIGNAL(clicked()), this, SLOT(slotCreateGradientTool()));
|
||||
|
||||
connect(LineButton,SIGNAL(pressed()), this, SLOT(slotResetTools()));
|
||||
connect(LineButton,SIGNAL(pressed()), this, SLOT(slotResetToolButtons()));
|
||||
connect(LineButton, SIGNAL(clicked()), this, SLOT(slotCreateLineTool()));
|
||||
|
||||
connect(PenButton,SIGNAL(pressed()), this, SLOT(slotResetTools()));
|
||||
connect(PenButton,SIGNAL(pressed()), this, SLOT(slotResetToolButtons()));
|
||||
connect(PenButton, SIGNAL(clicked()), this, SLOT(slotCreatePenTool()));
|
||||
|
||||
connect(PlainButton,SIGNAL(pressed()), this, SLOT(slotResetTools()));
|
||||
connect(PlainButton,SIGNAL(pressed()), this, SLOT(slotResetToolButtons()));
|
||||
connect(PlainButton, SIGNAL(clicked()), this, SLOT(slotCreatePlainTool()));
|
||||
|
||||
connect(PolygonButton,SIGNAL(pressed()), this, SLOT(slotResetTools()));
|
||||
connect(PolygonButton,SIGNAL(pressed()), this, SLOT(slotResetToolButtons()));
|
||||
connect(PolygonButton, SIGNAL(clicked()), this, SLOT(slotCreatePolygonTool()));
|
||||
|
||||
connect(RectangleButton,SIGNAL(pressed()), this, SLOT(slotResetTools()));
|
||||
connect(RectangleButton,SIGNAL(pressed()), this, SLOT(slotResetToolButtons()));
|
||||
connect(RectangleButton, SIGNAL(clicked()), this, SLOT(slotCreateRectangleTool()));
|
||||
|
||||
actionSetWidth = new QAction(tr("&Set Width"),this);
|
||||
@@ -580,11 +582,11 @@ void IntelliPhotoGui::createActions(){
|
||||
actionSetInnerAlpha->setShortcut(QKeySequence(Qt::ALT + Qt::Key_A));
|
||||
connect(actionSetInnerAlpha, SIGNAL(triggered()), this, SLOT(slotSetInnerAlpha()));
|
||||
|
||||
actionGoBack = new QAction(tr("&Go back"),this);
|
||||
actionGoBack = new QAction(tr("&Undo"),this);
|
||||
actionGoBack->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_Z));
|
||||
connect(actionGoBack, SIGNAL(triggered()), this, SLOT(slotGoBack()));
|
||||
|
||||
actionGoForward = new QAction(tr("&Go forward"),this);
|
||||
actionGoForward = new QAction(tr("&Redo"),this);
|
||||
actionGoForward->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_Y));
|
||||
connect(actionGoForward, SIGNAL(triggered()), this, SLOT(slotGoForward()));
|
||||
}
|
||||
@@ -603,13 +605,13 @@ void IntelliPhotoGui::createMenus(){
|
||||
fileMenu->addSeparator();
|
||||
fileMenu->addAction(actionExit);
|
||||
|
||||
//Attach all actions to Render Settings
|
||||
// Attach all actions to Render Settings
|
||||
renderMenu = new QMenu(tr("&Fast Renderer"), this);
|
||||
renderMenu->addAction(actionUpdateRenderSettingsOn);
|
||||
renderMenu->addAction(actionUpdateRenderSettingsOff);
|
||||
renderMenu->addAction(actionUpdateFastRenderSettingsOn);
|
||||
renderMenu->addAction(actionUpdateFastRenderSettingsOff);
|
||||
|
||||
//Attach all Layer Creations to Menu
|
||||
layerCreationMenu = new QMenu(tr("&Create new Layer"), this);
|
||||
// Attach all Layer Creations to Menu
|
||||
layerCreationMenu = new QMenu(tr("&Create Layer"), this);
|
||||
layerCreationMenu->addAction(actionCreateNewRasterLayer);
|
||||
layerCreationMenu->addAction(actionCreateNewShapedLayer);
|
||||
|
||||
@@ -630,41 +632,37 @@ void IntelliPhotoGui::createMenus(){
|
||||
layerMenu->addSeparator();
|
||||
layerMenu->addAction(actionDeleteLayer);
|
||||
|
||||
//Attach all Color Options
|
||||
// Attach all Color Options
|
||||
colorMenu = new QMenu(tr("&Color"), this);
|
||||
colorMenu->addAction(actionColorPickerFirstColor);
|
||||
colorMenu->addAction(actionColorPickerSecondColor);
|
||||
colorMenu->addAction(actionColorSwap);
|
||||
|
||||
//Attach all Tool Creation Actions
|
||||
toolCreationMenu = new QMenu(tr("&Drawingtools"), this);
|
||||
// Attach all Tool Creation Actions
|
||||
toolCreationMenu = new QMenu(tr("&Tool Selection"), this);
|
||||
toolCreationMenu->addAction(actionCreateCircleTool);
|
||||
toolCreationMenu->addAction(actionCreateFloodFillTool);
|
||||
toolCreationMenu->addAction(actionCreateGradientTool);
|
||||
toolCreationMenu->addAction(actionCreateFloodFillTool);
|
||||
toolCreationMenu->addAction(actionCreateGradientTool);
|
||||
toolCreationMenu->addAction(actionCreateLineTool);
|
||||
toolCreationMenu->addAction(actionCreatePenTool);
|
||||
toolCreationMenu->addAction(actionCreatePlainTool);
|
||||
toolCreationMenu->addAction(actionCreatePolygonTool);
|
||||
toolCreationMenu->addAction(actionCreateRectangleTool);
|
||||
|
||||
//Attach all Tool Setting Actions
|
||||
toolSettingsMenu = new QMenu(tr("&Toolsettings"), this);
|
||||
// Attach all Tool Setting Actions
|
||||
toolSettingsMenu = new QMenu(tr("&Tool Settings"), this);
|
||||
toolSettingsMenu->addAction(actionSetWidth);
|
||||
toolSettingsMenu->addAction(actionSetInnerAlpha);
|
||||
|
||||
//Attach all Tool Options
|
||||
// Attach all Tool Options
|
||||
toolMenu = new QMenu(tr("&Tools"), this);
|
||||
toolMenu->addMenu(toolCreationMenu);
|
||||
toolMenu->addMenu(toolSettingsMenu);
|
||||
toolMenu->addSeparator();
|
||||
toolMenu->addMenu(colorMenu);
|
||||
toolMenu->addMenu(toolSettingsMenu);
|
||||
|
||||
// Attach all actions to Options
|
||||
optionMenu = new QMenu(tr("&Options"), this);
|
||||
optionMenu->addAction(actionGoBack);
|
||||
optionMenu->addAction(actionGoForward);
|
||||
optionMenu->addMenu(layerMenu);
|
||||
optionMenu->addMenu(toolMenu);
|
||||
optionMenu->addAction(actionGoForward);
|
||||
optionMenu->addSeparator();
|
||||
optionMenu->addMenu(renderMenu);
|
||||
optionMenu->addAction(actionChangeDim);
|
||||
@@ -677,6 +675,9 @@ void IntelliPhotoGui::createMenus(){
|
||||
// Add menu items to the menubar
|
||||
menuBar()->addMenu(fileMenu);
|
||||
menuBar()->addMenu(optionMenu);
|
||||
menuBar()->addMenu(layerMenu);
|
||||
menuBar()->addMenu(toolMenu);
|
||||
menuBar()->addMenu(colorMenu);
|
||||
menuBar()->addMenu(helpMenu);
|
||||
}
|
||||
|
||||
@@ -694,6 +695,11 @@ void IntelliPhotoGui::createGui(){
|
||||
paintingArea = new PaintingArea(1280, 720);
|
||||
paintingArea->guiReference = this;
|
||||
|
||||
QScreen *screen = QGuiApplication::primaryScreen();
|
||||
QRect screenGeometry = screen->geometry();
|
||||
Buttonsize.setWidth(screenGeometry.width()/20);
|
||||
Buttonsize.setHeight(screenGeometry.height()/20);
|
||||
|
||||
preview = QPixmap(":/Icons/Buttons/icons/circle-tool.svg");
|
||||
CircleButton = new QPushButton();
|
||||
CircleButton->setFixedSize(Buttonsize);
|
||||
@@ -708,7 +714,7 @@ void IntelliPhotoGui::createGui(){
|
||||
FloodFillButton->setIconSize(Buttonsize);
|
||||
FloodFillButton->setCheckable(true);
|
||||
|
||||
preview = QPixmap(":/Icons/Buttons/icons/icon.png");
|
||||
preview = QPixmap(":/Icons/Buttons/icons/gradient-tool.svg");
|
||||
GradientButton = new QPushButton();
|
||||
GradientButton->setFixedSize(Buttonsize);
|
||||
GradientButton->setIcon(preview);
|
||||
@@ -786,10 +792,10 @@ void IntelliPhotoGui::createGui(){
|
||||
SwitchColorButton->setIcon(preview);
|
||||
SwitchColorButton->setIconSize(QSize(Buttonsize.width() * 2,Buttonsize.height()));
|
||||
|
||||
ActiveLayerLine = new QLabel();
|
||||
QString string = QString("Active Layer: %1").arg(paintingArea->getNumberOfActiveLayer() + 1);
|
||||
ActiveLayerLine->setText(string);
|
||||
ActiveLayerLine->setFixedSize(Buttonsize.width() * 2 + 10,(Buttonsize.height() * 2) / 3);
|
||||
ActiveLayerLabel = new QLabel();
|
||||
QString string = QString("Active Layer: %1").arg(paintingArea->getIndexOfActiveLayer() + 1);
|
||||
ActiveLayerLabel->setText(string);
|
||||
ActiveLayerLabel->setFixedSize(Buttonsize.width() * 2 + 10,(Buttonsize.height() * 2) / 3);
|
||||
|
||||
IntelliImage* activePicture = paintingArea->getImageOfActiveLayer();
|
||||
if(activePicture) {
|
||||
@@ -813,9 +819,9 @@ void IntelliPhotoGui::createGui(){
|
||||
QString String = QString("%1x%2").arg(paintingArea->Canvas->width()).arg(paintingArea->Canvas->height());
|
||||
dimCanvas->setText(String);
|
||||
|
||||
FastRendererLabel = new QLabel();
|
||||
FastRendererLabel->setFixedSize(Buttonsize.width() * 2 + 15,(Buttonsize.height() * 2) / 3);
|
||||
FastRendererLabel->setText("Fast Render: On");
|
||||
FastRendererLabel = new QLabel();
|
||||
FastRendererLabel->setFixedSize(Buttonsize.width() * 2 + 15,(Buttonsize.height() * 2) / 3);
|
||||
FastRendererLabel->setText("Fast Render: On");
|
||||
|
||||
ScrollArea = new QScrollArea(this);
|
||||
ScrollArea->setBackgroundRole(QPalette::Dark);
|
||||
@@ -832,7 +838,7 @@ void IntelliPhotoGui::createGui(){
|
||||
mainLayout->addWidget(PlainButton,3,2,1,1);
|
||||
mainLayout->addWidget(PolygonButton,3,3,1,1);
|
||||
mainLayout->addWidget(RectangleButton,4,2,1,1);
|
||||
mainLayout->addWidget(GradientButton,4,3,1,1);
|
||||
mainLayout->addWidget(GradientButton,4,3,1,1);
|
||||
mainLayout->addWidget(WidthLine,5,2,1,2);
|
||||
mainLayout->addWidget(EditLineWidth,6,2,1,2);
|
||||
mainLayout->addWidget(innerAlphaLine,7,2,1,2);
|
||||
@@ -840,11 +846,11 @@ void IntelliPhotoGui::createGui(){
|
||||
mainLayout->addWidget(FirstColorButton,9,2,1,1);
|
||||
mainLayout->addWidget(SecondColorButton,9,3,1,1);
|
||||
mainLayout->addWidget(SwitchColorButton,10,2,1,2);
|
||||
mainLayout->addWidget(ActiveLayerLine,11,2,1,2);
|
||||
mainLayout->addWidget(ActiveLayerLabel,11,2,1,2);
|
||||
mainLayout->addWidget(ActiveLayerImageLabel,12,2,1,2);
|
||||
mainLayout->addWidget(dimActive,13,2,1,2);
|
||||
mainLayout->addWidget(dimCanvas,14,2,1,2);
|
||||
mainLayout->addWidget(FastRendererLabel,15,2,1,2);
|
||||
mainLayout->addWidget(FastRendererLabel,15,2,1,2);
|
||||
mainLayout->setHorizontalSpacing(0);
|
||||
|
||||
}
|
||||
@@ -925,8 +931,8 @@ void IntelliPhotoGui::setToolWidth(int value){
|
||||
}
|
||||
|
||||
void IntelliPhotoGui::UpdateGui(){
|
||||
QString string = QString("Active Layer: %1").arg(paintingArea->getNumberOfActiveLayer() + 1);
|
||||
ActiveLayerLine->setText(string);
|
||||
QString string = QString("Active Layer: %1").arg(paintingArea->getIndexOfActiveLayer() + 1);
|
||||
ActiveLayerLabel->setText(string);
|
||||
|
||||
IntelliImage* activePicture = paintingArea->getImageOfActiveLayer();
|
||||
if(activePicture) {
|
||||
@@ -950,8 +956,8 @@ void IntelliPhotoGui::UpdateGui(){
|
||||
|
||||
if(paintingArea->layerBundle.size() != 0) {
|
||||
string = QString("%1x%2").arg(paintingArea->layerBundle[static_cast<size_t>
|
||||
(paintingArea->getNumberOfActiveLayer())].width).arg(paintingArea->layerBundle[static_cast<size_t>
|
||||
(paintingArea->getNumberOfActiveLayer())].height);
|
||||
(paintingArea->getIndexOfActiveLayer())].width).arg(paintingArea->layerBundle[static_cast<size_t>
|
||||
(paintingArea->getIndexOfActiveLayer())].height);
|
||||
dimActive->setText(string);
|
||||
}
|
||||
else{
|
||||
|
||||
@@ -43,8 +43,15 @@ public:
|
||||
*/
|
||||
IntelliPhotoGui();
|
||||
|
||||
/*!
|
||||
* \brief UpdateGui a function to update all gui elements.
|
||||
*/
|
||||
void UpdateGui();
|
||||
|
||||
/*!
|
||||
* \brief setToolWidth stes a width to the tool
|
||||
* \param value - the width of the tool
|
||||
*/
|
||||
void setToolWidth(int value);
|
||||
|
||||
protected:
|
||||
@@ -54,182 +61,591 @@ protected:
|
||||
void closeEvent(QCloseEvent*event) override;
|
||||
|
||||
private slots:
|
||||
|
||||
/*!
|
||||
* \brief slotOpen opens a new image
|
||||
*/
|
||||
void slotOpen();
|
||||
|
||||
/*!
|
||||
* \brief slotSave saves the current canvas
|
||||
*/
|
||||
void slotSave();
|
||||
|
||||
// layer slots here
|
||||
/*!
|
||||
* \brief slotCreateNewRasterLayer creates a new rasterImage
|
||||
*/
|
||||
void slotCreateNewRasterLayer();
|
||||
|
||||
/*!
|
||||
* \brief slotCreateNewShapedLayer creates a new shapedImage
|
||||
*/
|
||||
void slotCreateNewShapedLayer();
|
||||
|
||||
/*!
|
||||
* \brief slotDeleteLayer deletes a layer
|
||||
*/
|
||||
void slotDeleteLayer();
|
||||
|
||||
/*!
|
||||
* \brief slotSetActiveLayer sets a layer to be active
|
||||
*/
|
||||
void slotSetActiveLayer();
|
||||
|
||||
/*!
|
||||
* \brief slotSetActiveAlpha stes the alpha value of the active layer
|
||||
*/
|
||||
void slotSetActiveAlpha();
|
||||
|
||||
/*!
|
||||
* \brief slotSetPolygon sets a polygon to the active layer
|
||||
*/
|
||||
void slotSetPolygon();
|
||||
|
||||
/*!
|
||||
* \brief slotPositionMoveUp moves the current layer to the front
|
||||
*/
|
||||
void slotPositionMoveUp();
|
||||
|
||||
/*!
|
||||
* \brief slotPositionMoveDown moves the crrent layer to the back
|
||||
*/
|
||||
void slotPositionMoveDown();
|
||||
|
||||
/*!
|
||||
* \brief slotPositionMoveLeft moves the current layer left
|
||||
*/
|
||||
void slotPositionMoveLeft();
|
||||
|
||||
/*!
|
||||
* \brief slotPositionMoveRight moves the current layer right
|
||||
*/
|
||||
void slotPositionMoveRight();
|
||||
|
||||
/*!
|
||||
* \brief slotMoveLayerUp moves the current layer up
|
||||
*/
|
||||
void slotMoveLayerUp();
|
||||
|
||||
/*!
|
||||
* \brief slotMoveLayerDown moves the current layer down
|
||||
*/
|
||||
void slotMoveLayerDown();
|
||||
|
||||
void slotUpdateRenderSettingsOn();
|
||||
void slotUpdateRenderSettingsOff();
|
||||
/*!
|
||||
* \brief slotUpdateFastRenderSettingsOn activates the fast renderer
|
||||
*/
|
||||
void slotUpdateFastRenderSettingsOn();
|
||||
|
||||
/*!
|
||||
* \brief slotUpdateFastRenderSettingsOff deactivates the fast render
|
||||
*/
|
||||
void slotUpdateFastRenderSettingsOff();
|
||||
|
||||
/*!
|
||||
* \brief slotSetFirstColor sets the first color
|
||||
*/
|
||||
void slotSetFirstColor();
|
||||
|
||||
/*!
|
||||
* \brief slotSetSecondColor sets the second color
|
||||
*/
|
||||
void slotSetSecondColor();
|
||||
|
||||
/*!
|
||||
* \brief slotSwapColor swaps first and second color
|
||||
*/
|
||||
void slotSwapColor();
|
||||
|
||||
/*!
|
||||
* \brief slotCreatePenTool creates the pen tool
|
||||
*/
|
||||
void slotCreatePenTool();
|
||||
|
||||
/*!
|
||||
* \brief slotCreatePlainTool creates the plain tool
|
||||
*/
|
||||
void slotCreatePlainTool();
|
||||
|
||||
/*!
|
||||
* \brief slotCreateLineTool creates the line tool
|
||||
*/
|
||||
void slotCreateLineTool();
|
||||
|
||||
/*!
|
||||
* \brief slotCreateRectangleTool creates the rectangle tool
|
||||
*/
|
||||
void slotCreateRectangleTool();
|
||||
|
||||
/*!
|
||||
* \brief slotCreateCircleTool creates the cricle tool
|
||||
*/
|
||||
void slotCreateCircleTool();
|
||||
|
||||
/*!
|
||||
* \brief slotCreatePolygonTool creates the polygon tool
|
||||
*/
|
||||
void slotCreatePolygonTool();
|
||||
|
||||
/*!
|
||||
* \brief slotCreateFloodFillTool creates the floodfill tool
|
||||
*/
|
||||
void slotCreateFloodFillTool();
|
||||
|
||||
/*!
|
||||
* \brief slotCreateGradientTool creates the gradient tool
|
||||
*/
|
||||
void slotCreateGradientTool();
|
||||
|
||||
/*!
|
||||
* \brief slotAboutDialog displays the about dialog
|
||||
*/
|
||||
void slotAboutDialog();
|
||||
|
||||
/*!
|
||||
* \brief slotChangeDim changes the dimension of the canvas
|
||||
*/
|
||||
void slotChangeDim();
|
||||
|
||||
/*!
|
||||
* \brief slotEnterPressed read current input of input boxes, and adjusts settings
|
||||
*/
|
||||
void slotEnterPressed();
|
||||
|
||||
/*!
|
||||
* \brief slotSetWidth sets the width of the tool
|
||||
*/
|
||||
void slotSetWidth();
|
||||
|
||||
/*!
|
||||
* \brief slotSetInnerAlpha sets the inner alpha of the tool
|
||||
*/
|
||||
void slotSetInnerAlpha();
|
||||
|
||||
void slotResetTools();
|
||||
/*!
|
||||
* \brief slotResetTools resets all tool Buttons to unclikced
|
||||
*/
|
||||
void slotResetToolButtons();
|
||||
|
||||
/*!
|
||||
* \brief slotGoBack undoes the last action
|
||||
*/
|
||||
void slotGoBack();
|
||||
|
||||
/*!
|
||||
* \brief slotGoForward redoes the last action
|
||||
*/
|
||||
void slotGoForward();
|
||||
|
||||
private:
|
||||
|
||||
//setup functions for gui
|
||||
/*!
|
||||
* \brief createActions creates all actions
|
||||
*/
|
||||
void createActions();
|
||||
|
||||
/*!
|
||||
* \brief createMenus creates all menus
|
||||
*/
|
||||
void createMenus();
|
||||
|
||||
/*!
|
||||
* \brief createGui sets up the gui
|
||||
*/
|
||||
void createGui();
|
||||
|
||||
/*!
|
||||
* \brief setIntelliStyle sets the stylesheet of the gui
|
||||
*/
|
||||
void setIntelliStyle();
|
||||
|
||||
// Will check if changes have occurred since last save
|
||||
/*!
|
||||
* \brief maybeSave chekcs if the canvas has unsaved work
|
||||
* \return return true if there is unsaved work, false otherwise
|
||||
*/
|
||||
bool maybeSave();
|
||||
// Opens the Save dialog and saves
|
||||
|
||||
/*!
|
||||
* \brief saveFile saves the canvas
|
||||
* \param fileFormat the ileformat to save into
|
||||
* \return true if saving worked, false otherwise
|
||||
*/
|
||||
bool saveFile(const QByteArray &fileFormat);
|
||||
|
||||
//basic to set tool values to begin
|
||||
/*!
|
||||
* \brief setDefaultValues sets basic tool values
|
||||
*/
|
||||
void setDefaultValues();
|
||||
|
||||
// What we'll draw on
|
||||
/*!
|
||||
* \brief paintingArea the logic manager of the backbone
|
||||
*/
|
||||
PaintingArea* paintingArea;
|
||||
|
||||
//used to display a preview of the active layer
|
||||
/*!
|
||||
* \brief preview a small pixmap to show the active layer
|
||||
*/
|
||||
QPixmap preview;
|
||||
|
||||
//size of all buttons
|
||||
const QSize Buttonsize = QSize(35,35);
|
||||
/*!
|
||||
* \brief Buttonsize the size of all standard buttons
|
||||
*/
|
||||
QSize Buttonsize;
|
||||
|
||||
//buttons used for gui
|
||||
/*!
|
||||
* \brief CircleButton for creating a circle Tool
|
||||
*/
|
||||
QPushButton* CircleButton;
|
||||
|
||||
/*!
|
||||
* \brief FloodFillButton for creating a floodfill Tool
|
||||
*/
|
||||
QPushButton* FloodFillButton;
|
||||
|
||||
/*!
|
||||
* \brief GradientButton for creating a gradient Tool
|
||||
*/
|
||||
QPushButton* GradientButton;
|
||||
|
||||
/*!
|
||||
* \brief LineButton for creating a line Tool.
|
||||
*/
|
||||
QPushButton* LineButton;
|
||||
|
||||
/*!
|
||||
* \brief PenButton for creating a pen tool.
|
||||
*/
|
||||
QPushButton* PenButton;
|
||||
|
||||
/*!
|
||||
* \brief PlainButton for creating a plain Tool.
|
||||
*/
|
||||
QPushButton* PlainButton;
|
||||
|
||||
/*!
|
||||
* \brief PolygonButton for creating a Polygon Tool.
|
||||
*/
|
||||
QPushButton* PolygonButton;
|
||||
|
||||
/*!
|
||||
* \brief RectangleButton for creating a Rectangle Tool.
|
||||
*/
|
||||
QPushButton* RectangleButton;
|
||||
|
||||
/*!
|
||||
* \brief FirstColorButton for setting the First color.
|
||||
*/
|
||||
QPushButton* FirstColorButton;
|
||||
|
||||
/*!
|
||||
* \brief SecondColorButton for setting the Second color.
|
||||
*/
|
||||
QPushButton* SecondColorButton;
|
||||
|
||||
/*!
|
||||
* \brief SwitchColorButton for switching second and first color
|
||||
*/
|
||||
QPushButton* SwitchColorButton;
|
||||
|
||||
/*!
|
||||
* \brief dimActive for displaying the dimesnion of the active layer
|
||||
*/
|
||||
QPushButton* dimActive;
|
||||
|
||||
/*!
|
||||
* \brief dimCanvas for displaying the dimension of the canvas
|
||||
*/
|
||||
QPushButton* dimCanvas;
|
||||
|
||||
//labels used for gui
|
||||
/*!
|
||||
* \brief WidthLine to indicate the line width
|
||||
*/
|
||||
QLabel* WidthLine;
|
||||
|
||||
/*!
|
||||
* \brief innerAlphaLine to indicate the inner alpha
|
||||
*/
|
||||
QLabel* innerAlphaLine;
|
||||
QLabel* ActiveLayerLine;
|
||||
|
||||
/*!
|
||||
* \brief ActiveLayerLine to indicate the active Layer
|
||||
*/
|
||||
QLabel* ActiveLayerLabel;
|
||||
|
||||
/*!
|
||||
* \brief ActiveLayerImageLabel to indicate the active Image
|
||||
*/
|
||||
QLabel* ActiveLayerImageLabel;
|
||||
|
||||
/*!
|
||||
* \brief FastRendererLabel to indicate render settings
|
||||
*/
|
||||
QLabel* FastRendererLabel;
|
||||
|
||||
//scroll area to display canvas
|
||||
/*!
|
||||
* \brief ScrollArea to scroll the painting area on
|
||||
*/
|
||||
QScrollArea* ScrollArea;
|
||||
|
||||
//line edits used for gui
|
||||
/*!
|
||||
* \brief EditLineWidth to get the input of the line width
|
||||
*/
|
||||
QLineEdit* EditLineWidth;
|
||||
|
||||
/*!
|
||||
* \brief EditLineInnerAlpha to get the input of the inner alpha
|
||||
*/
|
||||
QLineEdit* EditLineInnerAlpha;
|
||||
|
||||
//int validator used for gui
|
||||
/*!
|
||||
* \brief ValidatorLineWidth to limit input
|
||||
*/
|
||||
QIntValidator* ValidatorLineWidth;
|
||||
|
||||
/*!
|
||||
* \brief ValidatorInnerAlpha to limit input
|
||||
*/
|
||||
QIntValidator* ValidatorInnerAlpha;
|
||||
|
||||
|
||||
// The menu widgets
|
||||
/*!
|
||||
* \brief saveAsMenu to display save options
|
||||
*/
|
||||
QMenu* saveAsMenu;
|
||||
|
||||
/*!
|
||||
* \brief fileMenu to display file options
|
||||
*/
|
||||
QMenu* fileMenu;
|
||||
|
||||
/*!
|
||||
* \brief renderMenu to display render options
|
||||
*/
|
||||
QMenu* renderMenu;
|
||||
|
||||
/*!
|
||||
* \brief optionMenu to display general options
|
||||
*/
|
||||
QMenu* optionMenu;
|
||||
|
||||
/*!
|
||||
* \brief layerCreationMenu to display layer creation options
|
||||
*/
|
||||
QMenu* layerCreationMenu;
|
||||
|
||||
/*!
|
||||
* \brief layerMenu to display layer options
|
||||
*/
|
||||
QMenu* layerMenu;
|
||||
|
||||
/*!
|
||||
* \brief colorMenu to display color options
|
||||
*/
|
||||
QMenu* colorMenu;
|
||||
|
||||
/*!
|
||||
* \brief toolCreationMenu to display tool creation options
|
||||
*/
|
||||
QMenu* toolCreationMenu;
|
||||
|
||||
/*!
|
||||
* \brief toolSettingsMenu to display settings options
|
||||
*/
|
||||
QMenu* toolSettingsMenu;
|
||||
|
||||
/*!
|
||||
* \brief toolMenu to display tool options
|
||||
*/
|
||||
QMenu* toolMenu;
|
||||
|
||||
/*!
|
||||
* \brief helpMenu to display the help options
|
||||
*/
|
||||
QMenu* helpMenu;
|
||||
|
||||
// All the actions that can occur
|
||||
// meta image actions (need further modularisation)
|
||||
/*!
|
||||
* \brief actionOpen to open a project
|
||||
*/
|
||||
QAction* actionOpen;
|
||||
|
||||
/*!
|
||||
* \brief actionExit to exit the project
|
||||
*/
|
||||
QAction* actionExit;
|
||||
|
||||
//Rendersetting actions
|
||||
QAction*actionUpdateRenderSettingsOn;
|
||||
QAction*actionUpdateRenderSettingsOff;
|
||||
/*!
|
||||
* \brief actionUpdateFastRenderSettingsOn to set fast render settings to on
|
||||
*/
|
||||
QAction* actionUpdateFastRenderSettingsOn;
|
||||
|
||||
// color Picker actions
|
||||
/*!
|
||||
* \brief actionUpdateFastRenderSettingsOff to set fast render settings to false;
|
||||
*/
|
||||
QAction* actionUpdateFastRenderSettingsOff;
|
||||
|
||||
/*!
|
||||
* \brief actionColorPickerFirstColor to set the first color
|
||||
*/
|
||||
QAction* actionColorPickerFirstColor;
|
||||
|
||||
/*!
|
||||
* \brief actionColorPickerSecondColor to set the second color
|
||||
*/
|
||||
QAction* actionColorPickerSecondColor;
|
||||
|
||||
/*!
|
||||
* \brief actionColorSwap to swap first and second color
|
||||
*/
|
||||
QAction* actionColorSwap;
|
||||
|
||||
// tool actions
|
||||
/*!
|
||||
* \brief actionCreatePenTool to create a pen tool
|
||||
*/
|
||||
QAction* actionCreatePenTool;
|
||||
|
||||
/*!
|
||||
* \brief actionCreatePlainTool to create a plain tool
|
||||
*/
|
||||
QAction* actionCreatePlainTool;
|
||||
|
||||
/*!
|
||||
* \brief actionCreateLineTool to create a line tool
|
||||
*/
|
||||
QAction* actionCreateLineTool;
|
||||
|
||||
/*!
|
||||
* \brief actionCreateRectangleTool to create a rectangle tool
|
||||
*/
|
||||
QAction* actionCreateRectangleTool;
|
||||
|
||||
/*!
|
||||
* \brief actionCreateCircleTool to create a circle tool
|
||||
*/
|
||||
QAction* actionCreateCircleTool;
|
||||
|
||||
/*!
|
||||
* \brief actionCreatePolygonTool to create a polygon tool
|
||||
*/
|
||||
QAction* actionCreatePolygonTool;
|
||||
|
||||
/*!
|
||||
* \brief actionCreateFloodFillTool to create a floodfill tool
|
||||
*/
|
||||
QAction* actionCreateFloodFillTool;
|
||||
|
||||
/*!
|
||||
* \brief actionCreateGradientTool to create a gradient tool
|
||||
*/
|
||||
QAction* actionCreateGradientTool;
|
||||
|
||||
// dimension actions
|
||||
/*!
|
||||
* \brief actionChangeDim
|
||||
*/
|
||||
QAction* actionChangeDim;
|
||||
|
||||
/*!
|
||||
* \brief actionSetWidth to set the width
|
||||
*/
|
||||
QAction* actionSetWidth;
|
||||
|
||||
/*!
|
||||
* \brief actionSetInnerAlpha to set the inner alha
|
||||
*/
|
||||
QAction* actionSetInnerAlpha;
|
||||
|
||||
// dialog actions
|
||||
/*!
|
||||
* \brief actionAboutDialog to show the
|
||||
*/
|
||||
QAction* actionAboutDialog;
|
||||
|
||||
/*!
|
||||
* \brief actionAboutQtDialog to show the qt input dialog
|
||||
*/
|
||||
QAction* actionAboutQtDialog;
|
||||
|
||||
// layer change actions
|
||||
/*!
|
||||
* \brief actionCreateNewRasterLayer creates a raster image
|
||||
*/
|
||||
QAction* actionCreateNewRasterLayer;
|
||||
|
||||
/*!
|
||||
* \brief actionCreateNewShapedLayer creates a shaped image
|
||||
*/
|
||||
QAction* actionCreateNewShapedLayer;
|
||||
|
||||
/*!
|
||||
* \brief actionDeleteLayer deletes a layer
|
||||
*/
|
||||
QAction* actionDeleteLayer;
|
||||
|
||||
/*!
|
||||
* \brief actionSetActiveLayer sets a layer to active
|
||||
*/
|
||||
QAction* actionSetActiveLayer;
|
||||
|
||||
/*!
|
||||
* \brief actionSetActiveAlpha sets the alpha of the active layer
|
||||
*/
|
||||
QAction* actionSetActiveAlpha;
|
||||
|
||||
/*!
|
||||
* \brief actionSetPolygon sets the polygon data to the image
|
||||
*/
|
||||
QAction* actionSetPolygon;
|
||||
|
||||
/*!
|
||||
* \brief actionMovePositionUp moves the image up
|
||||
*/
|
||||
QAction* actionMovePositionUp;
|
||||
|
||||
/*!
|
||||
* \brief actionMovePositionDown moves the image down
|
||||
*/
|
||||
QAction* actionMovePositionDown;
|
||||
|
||||
/*!
|
||||
* \brief actionMovePositionLeft moves the image left
|
||||
*/
|
||||
QAction* actionMovePositionLeft;
|
||||
|
||||
/*!
|
||||
* \brief actionMovePositionRight moves the image right
|
||||
*/
|
||||
QAction* actionMovePositionRight;
|
||||
|
||||
/*!
|
||||
* \brief actionMoveLayerUp moves the layer to the front
|
||||
*/
|
||||
QAction* actionMoveLayerUp;
|
||||
|
||||
/*!
|
||||
* \brief actionMoveLayerDown moves the layer to the back
|
||||
*/
|
||||
QAction* actionMoveLayerDown;
|
||||
|
||||
// actions tied to specific file formats
|
||||
/*!
|
||||
* \brief actionSaveAs saves the project as
|
||||
*/
|
||||
QList<QAction*> actionSaveAs;
|
||||
|
||||
|
||||
// history actions
|
||||
/*!
|
||||
* \brief actionGoBack does a undo action
|
||||
*/
|
||||
QAction* actionGoBack;
|
||||
|
||||
/*!
|
||||
* \brief actionGoForward does a redo action
|
||||
*/
|
||||
QAction* actionGoForward;
|
||||
|
||||
// main GUI elements
|
||||
/*!
|
||||
* \brief centralGuiWidget the main gui widget to place all others on
|
||||
*/
|
||||
QWidget* centralGuiWidget;
|
||||
|
||||
/*!
|
||||
* \brief mainLayout the layout to order all gui elements
|
||||
*/
|
||||
QGridLayout* mainLayout;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user