forked from openscad/openscad
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Moved progress display to status bar. Disabled by default but can be …
…enabled in .pro file with CONFIG += progresswidget. Please test and enable as default if it looks good on all platforms. git-svn-id: http://svn.clifford.at/openscad/trunk@432 b57f626f-c46c-0410-a088-ec61d464b74c
- Loading branch information
kintel
committed
Feb 10, 2010
1 parent
c021720
commit 8038ee0
Showing
8 changed files
with
190 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
<!DOCTYPE RCC><RCC version="1.0"> | ||
<qresource prefix="/"> | ||
<file>icons/prefsAdvanced.png</file> | ||
<file>icons/prefs3DView.png</file> | ||
<file>icons/prefsEditor.png</file> | ||
</qresource> | ||
</RCC> | ||
<RCC> | ||
<qresource prefix="/"> | ||
<file>icons/stopbutton.png</file> | ||
<file>icons/prefsAdvanced.png</file> | ||
<file>icons/prefs3DView.png</file> | ||
<file>icons/prefsEditor.png</file> | ||
</qresource> | ||
</RCC> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#include "ProgressWidget.h" | ||
|
||
ProgressWidget::ProgressWidget(QWidget *parent) | ||
:QWidget(parent) | ||
{ | ||
setupUi(this); | ||
this->wascanceled = false; | ||
connect(this->stopButton, SIGNAL(clicked()), this, SLOT(cancel())); | ||
} | ||
|
||
bool ProgressWidget::wasCanceled() const | ||
{ | ||
return this->wascanceled; | ||
} | ||
|
||
void ProgressWidget::cancel() | ||
{ | ||
this->wascanceled = true; | ||
} | ||
|
||
void ProgressWidget::setRange(int minimum, int maximum) | ||
{ | ||
this->progressBar->setRange(minimum, maximum); | ||
} | ||
|
||
void ProgressWidget::setValue(int progress) | ||
{ | ||
this->progressBar->setValue(progress); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#ifndef PROGRESSWIDGET_H_ | ||
#define PROGRESSWIDGET_H_ | ||
|
||
#include "ui_ProgressWidget.h" | ||
|
||
class ProgressWidget : public QWidget, public Ui::ProgressWidget | ||
{ | ||
Q_OBJECT; | ||
Q_PROPERTY(bool wasCanceled READ wasCanceled); | ||
|
||
public: | ||
ProgressWidget(QWidget *parent = NULL); | ||
bool wasCanceled() const; | ||
|
||
public slots: | ||
void setRange(int minimum, int maximum); | ||
void setValue(int progress); | ||
void cancel(); | ||
|
||
private: | ||
bool wascanceled; | ||
|
||
}; | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<ui version="4.0"> | ||
<class>ProgressWidget</class> | ||
<widget class="QWidget" name="ProgressWidget"> | ||
<property name="geometry"> | ||
<rect> | ||
<x>0</x> | ||
<y>0</y> | ||
<width>121</width> | ||
<height>20</height> | ||
</rect> | ||
</property> | ||
<property name="windowTitle"> | ||
<string>Form</string> | ||
</property> | ||
<layout class="QHBoxLayout" name="horizontalLayout"> | ||
<property name="spacing"> | ||
<number>5</number> | ||
</property> | ||
<property name="margin"> | ||
<number>0</number> | ||
</property> | ||
<item> | ||
<widget class="QProgressBar" name="progressBar"> | ||
<property name="value"> | ||
<number>24</number> | ||
</property> | ||
<property name="format"> | ||
<string>%v / %m</string> | ||
</property> | ||
</widget> | ||
</item> | ||
<item> | ||
<widget class="QPushButton" name="stopButton"> | ||
<property name="sizePolicy"> | ||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed"> | ||
<horstretch>0</horstretch> | ||
<verstretch>0</verstretch> | ||
</sizepolicy> | ||
</property> | ||
<property name="maximumSize"> | ||
<size> | ||
<width>12</width> | ||
<height>12</height> | ||
</size> | ||
</property> | ||
<property name="baseSize"> | ||
<size> | ||
<width>12</width> | ||
<height>12</height> | ||
</size> | ||
</property> | ||
<property name="icon"> | ||
<iconset resource="../openscad.qrc"> | ||
<normaloff>:/icons/stopbutton.png</normaloff>:/icons/stopbutton.png</iconset> | ||
</property> | ||
<property name="iconSize"> | ||
<size> | ||
<width>12</width> | ||
<height>12</height> | ||
</size> | ||
</property> | ||
<property name="flat"> | ||
<bool>true</bool> | ||
</property> | ||
</widget> | ||
</item> | ||
</layout> | ||
</widget> | ||
<resources> | ||
<include location="../openscad.qrc"/> | ||
</resources> | ||
<connections/> | ||
</ui> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters