diff --git a/.gitignore b/.gitignore index e431211..e8e6a7e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,5 @@ # Build folders -/build-*/ +build-*/ # QT Creator Files *.creator.user* diff --git a/src/GUI/IntelliPhotoGui.cpp b/src/GUI/IntelliPhotoGui.cpp index a25999b..16c8074 100644 --- a/src/GUI/IntelliPhotoGui.cpp +++ b/src/GUI/IntelliPhotoGui.cpp @@ -16,7 +16,6 @@ IntelliPhotoGui::IntelliPhotoGui(){ createMenus(); //set style of the gui setIntelliStyle(); - // Size the app showMaximized(); } @@ -28,7 +27,6 @@ void IntelliPhotoGui::closeEvent(QCloseEvent *event){ if (maybeSave()) { event->accept(); } else { - // If there have been changes ignore the event event->ignore(); } @@ -45,7 +43,7 @@ void IntelliPhotoGui::slotOpen(){ // tr sets the window title to Open File // QDir opens the current dirctory QString fileName = QFileDialog::getOpenFileName(this, - tr("Open File"), QDir::currentPath()); + tr("Open File"), QDir::currentPath(), nullptr, nullptr, QFileDialog::DontUseNativeDialog); // If we have a file name load the image and place // it in the paintingArea @@ -234,7 +232,7 @@ void IntelliPhotoGui::slotCreateLineTool(){ void IntelliPhotoGui::slotAboutDialog(){ // Window title and text to display QMessageBox::about(this, tr("About Painting"), - tr("

IntelliPhoto Some nice ass looking software

")); + tr("

IntelliPhotoPretty basic editor.

")); } // Define menu actions that call functions @@ -276,6 +274,7 @@ void IntelliPhotoGui::createActions(){ // Create New Layer action and tie to IntelliPhotoGui::newLayer() actionCreateNewLayer = new QAction(tr("&New Layer..."), this); + actionCreateNewLayer->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_N)); connect(actionCreateNewLayer, SIGNAL(triggered()), this, SLOT(slotCreateNewLayer())); // Delete New Layer action and tie to IntelliPhotoGui::deleteLayer() @@ -317,7 +316,7 @@ void IntelliPhotoGui::createActions(){ connect(actionColorPickerFirstColor, SIGNAL(triggered()), this, SLOT(slotSetFirstColor())); actionColorPickerSecondColor = new QAction(tr("&Secondary"), this); - connect(actionColorPickerSecondColor, SIGNAL(triggered()), this, SLOT(slotSetFirstColor())); + connect(actionColorPickerSecondColor, SIGNAL(triggered()), this, SLOT(slotSetSecondColor())); actionColorSwitch = new QAction(tr("&Switch"), this); actionColorSwitch->setShortcut(QKeySequence(Qt::CTRL + Qt::SHIFT + Qt::Key_S)); @@ -462,7 +461,7 @@ bool IntelliPhotoGui::saveFile(const QByteArray &fileFormat){ initialPath, tr("%1 Files (*.%2);;All Files (*)") .arg(QString::fromLatin1(fileFormat.toUpper())) - .arg(QString::fromLatin1(fileFormat))); + .arg(QString::fromLatin1(fileFormat)), nullptr, QFileDialog::DontUseNativeDialog); // If no file do nothing if (fileName.isEmpty()) { diff --git a/src/Layer/PaintingArea.cpp b/src/Layer/PaintingArea.cpp index 95ef554..af9be56 100644 --- a/src/Layer/PaintingArea.cpp +++ b/src/Layer/PaintingArea.cpp @@ -164,12 +164,12 @@ void PaintingArea::slotActivateLayer(int a){ } void PaintingArea::colorPickerSetFirstColor(){ - QColor clr = QColorDialog::getColor(colorPicker.getFirstColor(), nullptr, "Main Color"); + QColor clr = QColorDialog::getColor(colorPicker.getFirstColor(), nullptr, "Main Color", QColorDialog::DontUseNativeDialog); this->colorPicker.setFirstColor(clr); } void PaintingArea::colorPickerSetSecondColor(){ - QColor clr = QColorDialog::getColor(colorPicker.getSecondColor(), nullptr, "Secondary Color"); + QColor clr = QColorDialog::getColor(colorPicker.getSecondColor(), nullptr, "Secondary Color", QColorDialog::DontUseNativeDialog); this->colorPicker.setSecondColor(clr); } diff --git a/src/Layer/PaintingArea.h b/src/Layer/PaintingArea.h index fa85425..b6cebc1 100644 --- a/src/Layer/PaintingArea.h +++ b/src/Layer/PaintingArea.h @@ -21,8 +21,6 @@ struct LayerObject{ int widthOffset; int hightOffset; int alpha=255; - - }; class PaintingArea : public QWidget @@ -83,7 +81,6 @@ private: void activateUpperLayer(); void activateLowerLayer(); - QImage* Canvas; int maxWidth; int maxHeight; @@ -104,4 +101,3 @@ private: }; #endif -