IntelliPhotoGui.h
Go to the documentation of this file.
#ifndef IntelliPhotoGui_H
#define IntelliPhotoGui_H
#include <QAction>
#include <QFileDialog>
#include <QMessageBox>
#include <QImageWriter>
#include <QMenu>
#include <QMenuBar>
#include <QList>
#include <QMainWindow>
#include <QGridLayout>
#include <QPushButton>
#include <QTextEdit>
#include <QLabel>
#include <QLineEdit>
#include <QScrollArea>
#include "IntelliInputDialog.h"
#include "IntelliHelper/IntelliDatamanager.h"
//for unit testing
class UnitTest;
// PaintingArea used to paint the image
class PaintingArea;
class IntelliTool;
class IntelliColorPicker;
class IntelliPhotoGui : public QMainWindow {
friend UnitTest;
// Declares our class as a QObject which is the base class
// for all Qt objects
// QObjects handle events
Q_OBJECT
public:
IntelliPhotoGui();
void UpdateGui();
void setToolWidth(int value);
protected:
void closeEvent(QCloseEvent*event) override;
private slots:
void slotOpen();
void slotSave();
void slotCreateNewRasterLayer();
void slotCreateNewShapedLayer();
void slotDeleteLayer();
void slotSetActiveLayer();
void slotSetActiveAlpha();
void slotSetPolygon();
void slotPositionMoveUp();
void slotPositionMoveDown();
void slotPositionMoveLeft();
void slotPositionMoveRight();
void slotMoveLayerUp();
void slotMoveLayerDown();
void slotUpdateFastRenderSettingsOn();
void slotUpdateFastRenderSettingsOff();
void slotSetFirstColor();
void slotSetSecondColor();
void slotSwapColor();
void slotCreatePenTool();
void slotCreatePlainTool();
void slotCreateLineTool();
void slotCreateRectangleTool();
void slotCreateCircleTool();
void slotCreatePolygonTool();
void slotCreateFloodFillTool();
void slotCreateGradientTool();
void slotAboutDialog();
void slotChangeDim();
void slotEnterPressed();
void slotSetWidth();
void slotSetInnerAlpha();
void slotResetToolButtons();
void slotGoBack();
void slotGoForward();
private:
void createActions();
void createMenus();
void createGui();
void setIntelliStyle();
bool maybeSave();
bool saveFile(const QByteArray &fileFormat);
void setDefaultValues();
PaintingArea* paintingArea;
QPixmap preview;
QSize Buttonsize;
QPushButton* CircleButton;
QPushButton* FloodFillButton;
QPushButton* GradientButton;
QPushButton* LineButton;
QPushButton* PenButton;
QPushButton* PlainButton;
QPushButton* PolygonButton;
QPushButton* RectangleButton;
QPushButton* FirstColorButton;
QPushButton* SecondColorButton;
QPushButton* SwitchColorButton;
QPushButton* dimActive;
QPushButton* dimCanvas;
QLabel* WidthLine;
QLabel* innerAlphaLine;
QLabel* ActiveLayerLabel;
QLabel* ActiveLayerImageLabel;
QLabel* FastRendererLabel;
QScrollArea* ScrollArea;
QLineEdit* EditLineWidth;
QLineEdit* EditLineInnerAlpha;
QIntValidator* ValidatorLineWidth;
QIntValidator* ValidatorInnerAlpha;
QMenu* saveAsMenu;
QMenu* fileMenu;
QMenu* renderMenu;
QMenu* optionMenu;
QMenu* layerCreationMenu;
QMenu* layerMenu;
QMenu* colorMenu;
QMenu* toolCreationMenu;
QMenu* toolSettingsMenu;
QMenu* toolMenu;
QMenu* helpMenu;
QAction* actionOpen;
QAction* actionExit;
QAction* actionUpdateFastRenderSettingsOn;
QAction* actionUpdateFastRenderSettingsOff;
QAction* actionColorPickerFirstColor;
QAction* actionColorPickerSecondColor;
QAction* actionColorSwap;
QAction* actionCreatePenTool;
QAction* actionCreatePlainTool;
QAction* actionCreateLineTool;
QAction* actionCreateRectangleTool;
QAction* actionCreateCircleTool;
QAction* actionCreatePolygonTool;
QAction* actionCreateFloodFillTool;
QAction* actionCreateGradientTool;
QAction* actionChangeDim;
QAction* actionSetWidth;
QAction* actionSetInnerAlpha;
QAction* actionAboutDialog;
QAction* actionAboutQtDialog;
QAction* actionCreateNewRasterLayer;
QAction* actionCreateNewShapedLayer;
QAction* actionDeleteLayer;
QAction* actionSetActiveLayer;
QAction* actionSetActiveAlpha;
QAction* actionSetPolygon;
QAction* actionMovePositionUp;
QAction* actionMovePositionDown;
QAction* actionMovePositionLeft;
QAction* actionMovePositionRight;
QAction* actionMoveLayerUp;
QAction* actionMoveLayerDown;
QList<QAction*> actionSaveAs;
QAction* actionGoBack;
QAction* actionGoForward;
QWidget* centralGuiWidget;
QGridLayout* mainLayout;
};
#endif
IntelliInputDialog.h
IntelliPhotoGui
The IntelliPhotoGui base class handles the graphical user interface and events for the intelliPhoto p...
Definition: IntelliPhotoGui.h:34
IntelliPhotoGui::IntelliPhotoGui
IntelliPhotoGui()
The IntelliPhotoGui method is the constructor and is used to create a new instance of the main progra...
Definition: IntelliPhotoGui.cpp:14
PaintingArea
The PaintingArea class manages the methods and stores information about the current painting area,...
Definition: PaintingArea.h:57
IntelliTool
An abstract class that manages the basic events, like mouse clicks or scrolls events.
Definition: IntelliTool.h:17
IntelliPhotoGui::closeEvent
void closeEvent(QCloseEvent *event) override
The closeEvent function handles closing events.
Definition: IntelliPhotoGui.cpp:30
IntelliPhotoGui::setToolWidth
void setToolWidth(int value)
setToolWidth stes a width to the tool
Definition: IntelliPhotoGui.cpp:923
IntelliColorPicker
The IntelliColorPicker manages the selected colors for one whole project.
Definition: IntelliColorPicker.h:14
IntelliPhotoGui::UpdateGui
void UpdateGui()
UpdateGui a function to update all gui elements.
Definition: IntelliPhotoGui.cpp:932
UnitTest
Definition: mainUnitTest.cpp:8
IntelliDatamanager.h