# HG changeset patch # User Teemu Piippo # Date 1521881480 -7200 # Node ID 845c340fe71b99ea11bbe7fa50ec84a7aa0f6472 # Parent 31f4293cec309d67fac47d2889cc78acfd0d8d53 removed the unused OpenProgressDialog diff -r 31f4293cec30 -r 845c340fe71b CMakeLists.txt --- a/CMakeLists.txt Fri Mar 23 22:00:34 2018 +0200 +++ b/CMakeLists.txt Sat Mar 24 10:51:20 2018 +0200 @@ -70,7 +70,6 @@ src/dialogs/ldrawpathdialog.cpp src/dialogs/subfilereferenceeditor.cpp src/dialogs/newpartdialog.cpp - src/dialogs/openprogressdialog.cpp src/editmodes/abstractEditMode.cpp src/editmodes/circleMode.cpp src/editmodes/curvemode.cpp @@ -144,7 +143,6 @@ src/dialogs/ldrawpathdialog.h src/dialogs/newpartdialog.h src/dialogs/subfilereferenceeditor.h - src/dialogs/openprogressdialog.h src/editmodes/abstractEditMode.h src/editmodes/circleMode.h src/editmodes/curvemode.h @@ -192,7 +190,6 @@ src/dialogs/isecalcdialog.ui src/dialogs/ldrawpathdialog.ui src/dialogs/newpartdialog.ui - src/dialogs/openprogressdialog.ui src/dialogs/rectifierdialog.ui src/dialogs/replacecoordinatesdialog.ui src/dialogs/rotationpointdialog.ui diff -r 31f4293cec30 -r 845c340fe71b src/dialogs/openprogressdialog.cpp --- a/src/dialogs/openprogressdialog.cpp Fri Mar 23 22:00:34 2018 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,55 +0,0 @@ -/* - * LDForge: LDraw parts authoring CAD - * Copyright (C) 2013 - 2017 Teemu Piippo - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#include "openprogressdialog.h" -#include "ui_openprogressdialog.h" -#include "../main.h" - -OpenProgressDialog::OpenProgressDialog (QWidget* parent, Qt::WindowFlags f) : - QDialog (parent, f), - ui (*new Ui_OpenProgressUI), - m_progress (0), - m_numLines (0) -{ - ui.setupUi (this); - ui.progressText->setText ("Parsing..."); -} - -OpenProgressDialog::~OpenProgressDialog() -{ - delete &ui; -} - -void OpenProgressDialog::setNumLines (int a) -{ - m_numLines = a; - ui.progressBar->setRange (0, numLines()); - updateValues(); -} - -void OpenProgressDialog::updateValues() -{ - ui.progressText->setText (format ("Parsing... %1 / %2", progress(), numLines())); - ui.progressBar->setValue (progress()); -} - -void OpenProgressDialog::setProgress (int progress) -{ - m_progress = progress; - updateValues(); -} \ No newline at end of file diff -r 31f4293cec30 -r 845c340fe71b src/dialogs/openprogressdialog.h --- a/src/dialogs/openprogressdialog.h Fri Mar 23 22:00:34 2018 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,43 +0,0 @@ -/* - * LDForge: LDraw parts authoring CAD - * Copyright (C) 2013 - 2017 Teemu Piippo - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#pragma once -#include - -class OpenProgressDialog : public QDialog -{ - Q_OBJECT - -public: - OpenProgressDialog (QWidget* parent = nullptr, Qt::WindowFlags f = 0); - virtual ~OpenProgressDialog(); - - int progress() const { return m_progress; } - int numLines() const { return m_numLines; } - void setNumLines (int value); - -public slots: - void setProgress (int progress); - -private: - class Ui_OpenProgressUI& ui; - int m_progress; - int m_numLines; - - void updateValues(); -}; \ No newline at end of file diff -r 31f4293cec30 -r 845c340fe71b src/dialogs/openprogressdialog.ui --- a/src/dialogs/openprogressdialog.ui Fri Mar 23 22:00:34 2018 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,78 +0,0 @@ - - - OpenProgressUI - - - - 0 - 0 - 400 - 89 - - - - Opening - - - - - - [[ Progress text ]] - - - - - - - 24 - - - - - - - Qt::Horizontal - - - QDialogButtonBox::Cancel - - - - - - - - - buttonBox - accepted() - OpenProgressUI - accept() - - - 248 - 254 - - - 157 - 274 - - - - - buttonBox - rejected() - OpenProgressUI - reject() - - - 316 - 260 - - - 286 - 274 - - - - - diff -r 31f4293cec30 -r 845c340fe71b src/lddocument.cpp --- a/src/lddocument.cpp Fri Mar 23 22:00:34 2018 +0200 +++ b/src/lddocument.cpp Sat Mar 24 10:51:20 2018 +0200 @@ -22,7 +22,6 @@ #include "miscallenous.h" #include "mainwindow.h" #include "canvas.h" -#include "dialogs/openprogressdialog.h" #include "documentmanager.h" #include "linetypes/comment.h" #include "parser.h"