Merge branch 'dev' into dev_PolygonTool

This commit is contained in:
2019-12-19 11:31:34 +01:00
12 changed files with 179 additions and 56 deletions

View File

@@ -17,7 +17,6 @@ IntelliPhotoGui::IntelliPhotoGui(){
createMenus();
//set style of the gui
setIntelliStyle();
// Size the app
resize(600,600);
showMaximized();
@@ -31,7 +30,6 @@ void IntelliPhotoGui::closeEvent(QCloseEvent *event){
if (maybeSave()) {
event->accept();
} else {
// If there have been changes ignore the event
event->ignore();
}
@@ -48,7 +46,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
@@ -229,7 +227,7 @@ void IntelliPhotoGui::slotCreateLineTool(){
void IntelliPhotoGui::slotAboutDialog(){
// Window title and text to display
QMessageBox::about(this, tr("About Painting"),
tr("<p><b>IntelliPhoto</b> Some nice ass looking software</p>"));
tr("<p><b>IntelliPhoto</b>Pretty basic editor.</p>"));
}
// Define menu actions that call functions
@@ -271,6 +269,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()
@@ -457,7 +456,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()) {