From 47d4b25bd0583b1fd65ae885950efd34c9df256b Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Thu, 28 Mar 2019 13:40:33 +0100 Subject: cmake: move around variant directories --- variant/default/new_file_dialog.cpp | 37 ------------------------------------- 1 file changed, 37 deletions(-) delete mode 100644 variant/default/new_file_dialog.cpp (limited to 'variant/default/new_file_dialog.cpp') diff --git a/variant/default/new_file_dialog.cpp b/variant/default/new_file_dialog.cpp deleted file mode 100644 index 70816c5d..00000000 --- a/variant/default/new_file_dialog.cpp +++ /dev/null @@ -1,37 +0,0 @@ -#include "new_file_dialog.h" - -new_file_dialog::new_file_dialog(QWidget* parent) : QDialog(parent) -{ - ui.setupUi(this); - connect(ui.buttonBox, SIGNAL(accepted()), this, SLOT(ok_clicked())); - connect(ui.buttonBox, SIGNAL(rejected()), this, SLOT(cancel_clicked())); - setFixedSize(size()); -} - -bool new_file_dialog::is_ok(QString& name_) -{ - name_ = name; - return ok; -} - -void new_file_dialog::cancel_clicked() { close(); } - -void new_file_dialog::ok_clicked() -{ - QString text = ui.lineEdit->text(); - text = text.replace('/', ""); - text = text.replace('\\', ""); - if (text != "" && !text.endsWith(".ini")) - text += ".ini"; - if (text == "" || text == ".ini" || QFile(options::globals::ini_directory() + "/" + text).exists()) - { - QMessageBox::warning(this, - tr("File exists"), - tr("This file already exists. Pick another name."), - QMessageBox::Ok, QMessageBox::NoButton); - return; - } - ok = true; - close(); - name = text; -} -- cgit v1.2.3