Restyled project for uncrustify

This commit is contained in:
2019-12-19 18:27:46 +01:00
parent c415a53c83
commit a838e3869f
30 changed files with 1649 additions and 1650 deletions

View File

@@ -195,7 +195,7 @@ void IntelliPhotoGui::slotSetActiveLayer(){
if (ok1)
{
paintingArea->setLayerToActive(layer);
}
}
}
void IntelliPhotoGui::slotSetFirstColor(){
@@ -203,7 +203,7 @@ void IntelliPhotoGui::slotSetFirstColor(){
}
void IntelliPhotoGui::slotSetSecondColor(){
paintingArea->colorPickerSetSecondColor();
paintingArea->colorPickerSetSecondColor();
}
void IntelliPhotoGui::slotSwitchColor(){
@@ -223,19 +223,19 @@ void IntelliPhotoGui::slotCreateLineTool(){
}
void IntelliPhotoGui::slotCreateRectangleTool(){
paintingArea->createRectangleTool();
paintingArea->createRectangleTool();
}
void IntelliPhotoGui::slotCreateCircleTool(){
paintingArea->createCircleTool();
paintingArea->createCircleTool();
}
void IntelliPhotoGui::slotCreatePolygonTool(){
paintingArea->createPolygonTool();
paintingArea->createPolygonTool();
}
void IntelliPhotoGui::slotCreateFloodFillTool(){
paintingArea->createFloodFillTool();
paintingArea->createFloodFillTool();
}
// Open an about dialog
@@ -342,17 +342,17 @@ void IntelliPhotoGui::createActions(){
actionCreateLineTool = new QAction(tr("&Line"), this);
connect(actionCreateLineTool, SIGNAL(triggered()), this, SLOT(slotCreateLineTool()));
actionCreateCircleTool = new QAction(tr("&Circle"), this);
connect(actionCreateCircleTool, SIGNAL(triggered()), this, SLOT(slotCreateCircleTool()));
actionCreateCircleTool = new QAction(tr("&Circle"), this);
connect(actionCreateCircleTool, SIGNAL(triggered()), this, SLOT(slotCreateCircleTool()));
actionCreateRectangleTool = new QAction(tr("&Rectangle"), this);
connect(actionCreateRectangleTool, SIGNAL(triggered()), this, SLOT(slotCreateRectangleTool()));
actionCreateRectangleTool = new QAction(tr("&Rectangle"), this);
connect(actionCreateRectangleTool, SIGNAL(triggered()), this, SLOT(slotCreateRectangleTool()));
actionCreatePolygonTool = new QAction(tr("&Polygon"), this);
connect(actionCreatePolygonTool, SIGNAL(triggered()), this, SLOT(slotCreatePolygonTool()));
actionCreatePolygonTool = new QAction(tr("&Polygon"), this);
connect(actionCreatePolygonTool, SIGNAL(triggered()), this, SLOT(slotCreatePolygonTool()));
actionCreateFloodFillTool = new QAction(tr("&FloodFill"), this);
connect(actionCreateFloodFillTool, SIGNAL(triggered()), this, SLOT(slotCreateFloodFillTool()));
actionCreateFloodFillTool = new QAction(tr("&FloodFill"), this);
connect(actionCreateFloodFillTool, SIGNAL(triggered()), this, SLOT(slotCreateFloodFillTool()));
// Create about action and tie to IntelliPhotoGui::about()
actionAboutDialog = new QAction(tr("&About"), this);
@@ -405,10 +405,10 @@ void IntelliPhotoGui::createMenus(){
toolMenu->addAction(actionCreatePenTool);
toolMenu->addAction(actionCreatePlainTool);
toolMenu->addAction(actionCreateLineTool);
toolMenu->addAction(actionCreateRectangleTool);
toolMenu->addAction(actionCreateCircleTool);
toolMenu->addAction(actionCreatePolygonTool);
toolMenu->addAction(actionCreateFloodFillTool);
toolMenu->addAction(actionCreateRectangleTool);
toolMenu->addAction(actionCreateCircleTool);
toolMenu->addAction(actionCreatePolygonTool);
toolMenu->addAction(actionCreateFloodFillTool);
toolMenu->addSeparator();
toolMenu->addMenu(colorMenu);

View File

@@ -19,123 +19,123 @@ class IntelliColorPicker;
/*!
* \brief The IntelliPhotoGui class handles the graphical user interface for the intelliPhoto program
*/
class IntelliPhotoGui : public QMainWindow{
// Declares our class as a QObject which is the base class
// for all Qt objects
// QObjects handle events
Q_OBJECT
class IntelliPhotoGui : public QMainWindow {
// Declares our class as a QObject which is the base class
// for all Qt objects
// QObjects handle events
Q_OBJECT
public:
/*!
* \brief The IntelliPhotoGui method is the constructor and is used to create a new instance of the main program window
*/
IntelliPhotoGui();
/*!
* \brief The IntelliPhotoGui method is the constructor and is used to create a new instance of the main program window
*/
IntelliPhotoGui();
protected:
// Function used to close an event
void closeEvent(QCloseEvent *event) override;
// Function used to close an event
void closeEvent(QCloseEvent*event) override;
private slots:
// meta slots here (need further )
void slotOpen();
void slotSave();
// meta slots here (need further )
void slotOpen();
void slotSave();
// layer slots here
void slotCreateNewLayer();
void slotDeleteLayer();
void slotClearActiveLayer();
void slotSetActiveLayer();
void slotSetActiveAlpha();
void slotPositionMoveUp();
void slotPositionMoveDown();
void slotPositionMoveLeft();
void slotPositionMoveRight();
void slotMoveLayerUp();
void slotMoveLayerDown();
// layer slots here
void slotCreateNewLayer();
void slotDeleteLayer();
void slotClearActiveLayer();
void slotSetActiveLayer();
void slotSetActiveAlpha();
void slotPositionMoveUp();
void slotPositionMoveDown();
void slotPositionMoveLeft();
void slotPositionMoveRight();
void slotMoveLayerUp();
void slotMoveLayerDown();
// color Picker slots here
void slotSetFirstColor();
void slotSetSecondColor();
void slotSwitchColor();
// color Picker slots here
void slotSetFirstColor();
void slotSetSecondColor();
void slotSwitchColor();
// tool slots here
void slotCreatePenTool();
void slotCreatePlainTool();
void slotCreateLineTool();
void slotCreateRectangleTool();
void slotCreateCircleTool();
void slotCreatePolygonTool();
void slotCreateFloodFillTool();
// tool slots here
void slotCreatePenTool();
void slotCreatePlainTool();
void slotCreateLineTool();
void slotCreateRectangleTool();
void slotCreateCircleTool();
void slotCreatePolygonTool();
void slotCreateFloodFillTool();
// slots for dialogs
void slotAboutDialog();
// slots for dialogs
void slotAboutDialog();
private:
// Will tie user actions to functions
void createActions();
void createMenus();
// setup GUI elements
void createGui();
// set style of the GUI
void setIntelliStyle();
// Will tie user actions to functions
void createActions();
void createMenus();
// setup GUI elements
void createGui();
// set style of the GUI
void setIntelliStyle();
// Will check if changes have occurred since last save
bool maybeSave();
// Opens the Save dialog and saves
bool saveFile(const QByteArray &fileFormat);
// Will check if changes have occurred since last save
bool maybeSave();
// Opens the Save dialog and saves
bool saveFile(const QByteArray &fileFormat);
// What we'll draw on
PaintingArea* paintingArea;
// What we'll draw on
PaintingArea* paintingArea;
// The menu widgets
QMenu *saveAsMenu;
QMenu *fileMenu;
QMenu *optionMenu;
QMenu *layerMenu;
QMenu *colorMenu;
QMenu *toolMenu;
QMenu *helpMenu;
// The menu widgets
QMenu*saveAsMenu;
QMenu*fileMenu;
QMenu*optionMenu;
QMenu*layerMenu;
QMenu*colorMenu;
QMenu*toolMenu;
QMenu*helpMenu;
// All the actions that can occur
// meta image actions (need further modularisation)
QAction *actionOpen;
QAction *actionExit;
// All the actions that can occur
// meta image actions (need further modularisation)
QAction*actionOpen;
QAction*actionExit;
// color Picker actions
QAction *actionColorPickerFirstColor;
QAction *actionColorPickerSecondColor;
QAction *actionColorSwitch;
// color Picker actions
QAction*actionColorPickerFirstColor;
QAction*actionColorPickerSecondColor;
QAction*actionColorSwitch;
// tool actions
QAction *actionCreatePenTool;
QAction *actionCreatePlainTool;
QAction *actionCreateLineTool;
QAction *actionCreateRectangleTool;
QAction *actionCreateCircleTool;
QAction *actionCreatePolygonTool;
QAction *actionCreateFloodFillTool;
// tool actions
QAction*actionCreatePenTool;
QAction*actionCreatePlainTool;
QAction*actionCreateLineTool;
QAction*actionCreateRectangleTool;
QAction*actionCreateCircleTool;
QAction*actionCreatePolygonTool;
QAction*actionCreateFloodFillTool;
// dialog actions
QAction *actionAboutDialog;
QAction *actionAboutQtDialog;
// dialog actions
QAction*actionAboutDialog;
QAction*actionAboutQtDialog;
// layer change actions
QAction *actionCreateNewLayer;
QAction *actionDeleteLayer;
QAction* actionSetActiveLayer;
QAction* actionSetActiveAlpha;
QAction* actionMovePositionUp;
QAction* actionMovePositionDown;
QAction* actionMovePositionLeft;
QAction* actionMovePositionRight;
QAction* actionMoveLayerUp;
QAction* actionMoveLayerDown;
// layer change actions
QAction*actionCreateNewLayer;
QAction*actionDeleteLayer;
QAction* actionSetActiveLayer;
QAction* actionSetActiveAlpha;
QAction* actionMovePositionUp;
QAction* actionMovePositionDown;
QAction* actionMovePositionLeft;
QAction* actionMovePositionRight;
QAction* actionMoveLayerUp;
QAction* actionMoveLayerDown;
// Actions tied to specific file formats
QList<QAction *> actionSaveAs;
// Actions tied to specific file formats
QList<QAction*> actionSaveAs;
// main GUI elements
QWidget* centralGuiWidget;
QGridLayout *mainLayout;
// main GUI elements
QWidget* centralGuiWidget;
QGridLayout*mainLayout;
};
#endif