Automated Release Preparation

This commit is contained in:
Conrad
2020-01-24 00:06:46 +01:00
parent d00fe17e46
commit b989fb357a
178 changed files with 7402 additions and 3979 deletions

View File

@@ -20,7 +20,7 @@ IntelliPhotoGui::IntelliPhotoGui(){
setIntelliStyle();
// Size the app
resize(600,600);
setDefaultValues();
setDefaultValues();
}
// User tried to close the app
@@ -51,28 +51,28 @@ void IntelliPhotoGui::slotOpen(){
// If we have a file name load the image and place
// it in the paintingArea
if (!fileName.isEmpty()) {
bool rightFileType =true;
if(fileName.size()>=4){
QString endung(".idf");
int length = fileName.size();
for(int i=0; i<4; i++){
if(endung[i]!=fileName[length-4+i]){
rightFileType = false;
break;
}
}
}
bool rightFileType = true;
if(fileName.size()>=4) {
QString endung(".idf");
int length = fileName.size();
for(int i = 0; i<4; i++) {
if(endung[i]!=fileName[length - 4 + i]) {
rightFileType = false;
break;
}
}
}
if(rightFileType){
IntelliDatamanager::loadProject(paintingArea,fileName);
UpdateGui();
if(rightFileType) {
IntelliDatamanager::loadProject(paintingArea,fileName);
UpdateGui();
}
else{
paintingArea->open(fileName);
}
}
}
}
else{
paintingArea->open(fileName);
}
}
}
}
// Called when the user clicks Save As in the menu
@@ -101,7 +101,7 @@ void IntelliPhotoGui::slotCreateNewRasterLayer(){
// Create New Layer
if (ok1&&ok2) {
paintingArea->addLayer(width,height,0,0,255,ImageType::RASTERIMAGE);
paintingArea->addLayer(width,height,0,0,255,ImageType::RASTERIMAGE);
UpdateGui();
}
}
@@ -120,7 +120,7 @@ void IntelliPhotoGui::slotCreateNewShapedLayer(){
// Create New Layer
if (ok1&&ok2) {
paintingArea->addLayer(width, height, 0, 0,255, ImageType::SHAPEDIMAGE);
paintingArea->addLayer(width, height, 0, 0,255, ImageType::SHAPEDIMAGE);
UpdateGui();
}
}
@@ -138,7 +138,6 @@ void IntelliPhotoGui::slotChangeDim(){
int height = IntelliInputDialog::getInt("New Canvas Size", "Height:", 600, 1, 50000, 1, &ok2);
// Change dimension
if (ok1&&ok2) {
paintingArea->setLayerDimensions(width,height);
@@ -349,11 +348,11 @@ void IntelliPhotoGui::slotSetInnerAlpha(){
}
void IntelliPhotoGui::slotGoBack(){
paintingArea->historyGoBack();
paintingArea->historyGoBack();
}
void IntelliPhotoGui::slotGoForward(){
paintingArea->historyGoForward();
paintingArea->historyGoForward();
}
// Define menu actions that call functions
@@ -385,13 +384,13 @@ void IntelliPhotoGui::createActions(){
actionSaveAs.append(pngSaveAction);
pngSaveAction->setShortcut(QKeySequence(Qt::CTRL + Qt::SHIFT + Qt::Key_S));
QAction*projectSaveAction = new QAction("Projekt", this);
projectSaveAction->setData("idf");
// When clicked call IntelliPhotoGui::save()
connect(projectSaveAction, SIGNAL(triggered()), this, SLOT(slotSave()));
// Attach each PNG in save Menu
actionSaveAs.append(projectSaveAction);
projectSaveAction->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_S));
QAction*projectSaveAction = new QAction("Projekt", this);
projectSaveAction->setData("idf");
// When clicked call IntelliPhotoGui::save()
connect(projectSaveAction, SIGNAL(triggered()), this, SLOT(slotSave()));
// Attach each PNG in save Menu
actionSaveAs.append(projectSaveAction);
projectSaveAction->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_S));
// Create exit action and tie to IntelliPhotoGui::close()
actionExit = new QAction(tr("&Exit"), this);
@@ -563,13 +562,13 @@ 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->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_Z));
connect(actionGoBack, SIGNAL(triggered()), this, SLOT(slotGoBack()));
actionGoBack = new QAction(tr("&Go back"),this);
actionGoBack->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_Z));
connect(actionGoBack, SIGNAL(triggered()), this, SLOT(slotGoBack()));
actionGoForward = new QAction(tr("&Go forward"),this);
actionGoForward->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_Y));
connect(actionGoForward, SIGNAL(triggered()), this, SLOT(slotGoForward()));
actionGoForward = new QAction(tr("&Go forward"),this);
actionGoForward->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_Y));
connect(actionGoForward, SIGNAL(triggered()), this, SLOT(slotGoForward()));
}
// Create the menubar
@@ -643,8 +642,8 @@ void IntelliPhotoGui::createMenus(){
// Attach all actions to Options
optionMenu = new QMenu(tr("&Options"), this);
optionMenu->addAction(actionGoBack);
optionMenu->addAction(actionGoForward);
optionMenu->addAction(actionGoBack);
optionMenu->addAction(actionGoForward);
optionMenu->addMenu(layerMenu);
optionMenu->addMenu(toolMenu);
optionMenu->addSeparator();
@@ -674,7 +673,7 @@ void IntelliPhotoGui::createGui(){
// create Gui elements
// get and set max width and height
paintingArea = new PaintingArea(1280, 720);
paintingArea->guiReference = this;
paintingArea->guiReference = this;
preview = QPixmap(":/Icons/Buttons/icons/circle-tool.svg");
CircleButton = new QPushButton();
@@ -788,14 +787,14 @@ void IntelliPhotoGui::createGui(){
QString String = QString("%1x%2").arg(paintingArea->Canvas->width()).arg(paintingArea->Canvas->height());
dimCanvas->setText(String);
ScrollArea = new QScrollArea(this);
ScrollArea->setBackgroundRole(QPalette::Dark);
ScrollArea->setWidget(paintingArea);
ScrollArea->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOn);
ScrollArea->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOn);
ScrollArea = new QScrollArea(this);
ScrollArea->setBackgroundRole(QPalette::Dark);
ScrollArea->setWidget(paintingArea);
ScrollArea->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOn);
ScrollArea->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOn);
// set gui elements
mainLayout->addWidget(ScrollArea,1,1,20,1);
mainLayout->addWidget(ScrollArea,1,1,20,1);
mainLayout->addWidget(CircleButton,1,2,1,1);
mainLayout->addWidget(FloodFillButton,1,3,1,1);
mainLayout->addWidget(LineButton,2,2,1,1);
@@ -872,10 +871,10 @@ bool IntelliPhotoGui::saveFile(const QByteArray &fileFormat){
return false;
} else {
// Call for the file to be saved
if(fileFormat == "idf"){
return IntelliDatamanager::saveProject(paintingArea, fileName);
if(fileFormat == "idf") {
return IntelliDatamanager::saveProject(paintingArea, fileName);
}
}
return paintingArea->save(fileName, fileFormat.constData());
}
}
@@ -907,7 +906,7 @@ void IntelliPhotoGui::UpdateGui(){
}
ActiveLayerImageLabel->setPixmap(preview.scaled(Buttonsize * 2));
ActiveLayerImageLabel->setPixmap(preview.scaled(Buttonsize * 2));
string = QString("background-color: %1").arg(paintingArea->colorPicker.getFirstColor().name());
FirstColorButton->setStyleSheet(string);
@@ -918,9 +917,9 @@ void IntelliPhotoGui::UpdateGui(){
dimCanvas->setText(string);
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);
string = QString("%1x%2").arg(paintingArea->layerBundle[static_cast<size_t>
(paintingArea->getNumberOfActiveLayer())].width).arg(paintingArea->layerBundle[static_cast<size_t>
(paintingArea->getNumberOfActiveLayer())].height);
dimActive->setText(string);
}
else{

View File

@@ -220,7 +220,6 @@ QAction* actionMoveLayerDown;
QList<QAction*> actionSaveAs;
// history actions
QAction* actionGoBack;
QAction* actionGoForward;