Sat, 24 Mar 2018 10:51:20 +0200
removed the unused OpenProgressDialog
CMakeLists.txt | file | annotate | diff | comparison | revisions | |
src/dialogs/openprogressdialog.cpp | file | annotate | diff | comparison | revisions | |
src/dialogs/openprogressdialog.h | file | annotate | diff | comparison | revisions | |
src/dialogs/openprogressdialog.ui | file | annotate | diff | comparison | revisions | |
src/lddocument.cpp | file | annotate | diff | comparison | revisions |
--- 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
--- 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 <http://www.gnu.org/licenses/>. - */ - -#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
--- 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 <http://www.gnu.org/licenses/>. - */ - -#pragma once -#include <QDialog> - -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
--- 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 @@ -<?xml version="1.0" encoding="UTF-8"?> -<ui version="4.0"> - <class>OpenProgressUI</class> - <widget class="QDialog" name="OpenProgressUI"> - <property name="geometry"> - <rect> - <x>0</x> - <y>0</y> - <width>400</width> - <height>89</height> - </rect> - </property> - <property name="windowTitle"> - <string>Opening</string> - </property> - <layout class="QVBoxLayout" name="verticalLayout"> - <item> - <widget class="QLabel" name="progressText"> - <property name="text"> - <string>[[ Progress text ]]</string> - </property> - </widget> - </item> - <item> - <widget class="QProgressBar" name="progressBar"> - <property name="value"> - <number>24</number> - </property> - </widget> - </item> - <item> - <widget class="QDialogButtonBox" name="buttonBox"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="standardButtons"> - <set>QDialogButtonBox::Cancel</set> - </property> - </widget> - </item> - </layout> - </widget> - <resources/> - <connections> - <connection> - <sender>buttonBox</sender> - <signal>accepted()</signal> - <receiver>OpenProgressUI</receiver> - <slot>accept()</slot> - <hints> - <hint type="sourcelabel"> - <x>248</x> - <y>254</y> - </hint> - <hint type="destinationlabel"> - <x>157</x> - <y>274</y> - </hint> - </hints> - </connection> - <connection> - <sender>buttonBox</sender> - <signal>rejected()</signal> - <receiver>OpenProgressUI</receiver> - <slot>reject()</slot> - <hints> - <hint type="sourcelabel"> - <x>316</x> - <y>260</y> - </hint> - <hint type="destinationlabel"> - <x>286</x> - <y>274</y> - </hint> - </hints> - </connection> - </connections> -</ui>
--- 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"