-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #572 from Tarsnap/tprogresswidget
TProgressWidget
- Loading branch information
Showing
14 changed files
with
370 additions
and
86 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
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 |
---|---|---|
@@ -0,0 +1,111 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<ui version="4.0"> | ||
<class>TProgressWidget</class> | ||
<widget class="QWidget" name="TProgressWidget"> | ||
<property name="geometry"> | ||
<rect> | ||
<x>0</x> | ||
<y>0</y> | ||
<width>200</width> | ||
<height>64</height> | ||
</rect> | ||
</property> | ||
<property name="minimumSize"> | ||
<size> | ||
<width>200</width> | ||
<height>64</height> | ||
</size> | ||
</property> | ||
<property name="windowTitle"> | ||
<string>Form</string> | ||
</property> | ||
<layout class="QVBoxLayout" name="verticalLayout"> | ||
<property name="leftMargin"> | ||
<number>3</number> | ||
</property> | ||
<property name="topMargin"> | ||
<number>3</number> | ||
</property> | ||
<property name="rightMargin"> | ||
<number>3</number> | ||
</property> | ||
<property name="bottomMargin"> | ||
<number>3</number> | ||
</property> | ||
<item> | ||
<layout class="QHBoxLayout" name="horizontalLayout"> | ||
<item> | ||
<spacer name="leftStatusSpacer"> | ||
<property name="orientation"> | ||
<enum>Qt::Horizontal</enum> | ||
</property> | ||
<property name="sizeType"> | ||
<enum>QSizePolicy::Fixed</enum> | ||
</property> | ||
<property name="sizeHint" stdset="0"> | ||
<size> | ||
<width>16</width> | ||
<height>16</height> | ||
</size> | ||
</property> | ||
</spacer> | ||
</item> | ||
<item> | ||
<widget class="TElidedLabel" name="statusLabel"> | ||
<property name="font"> | ||
<font> | ||
<italic>true</italic> | ||
</font> | ||
</property> | ||
<property name="alignment"> | ||
<set>Qt::AlignCenter</set> | ||
</property> | ||
<property name="wordWrap"> | ||
<bool>true</bool> | ||
</property> | ||
<property name="openExternalLinks"> | ||
<bool>true</bool> | ||
</property> | ||
<property name="textInteractionFlags"> | ||
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set> | ||
</property> | ||
<property name="text"> | ||
<string>status</string> | ||
</property> | ||
<property name="elide"> | ||
<enum>Qt::ElideRight</enum> | ||
</property> | ||
</widget> | ||
</item> | ||
<item> | ||
<widget class="TBusyLabel" name="busyLabel"> | ||
<property name="sizePolicy"> | ||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed"> | ||
<horstretch>0</horstretch> | ||
<verstretch>0</verstretch> | ||
</sizepolicy> | ||
</property> | ||
</widget> | ||
</item> | ||
</layout> | ||
</item> | ||
<item> | ||
<widget class="QProgressBar" name="progressBar"/> | ||
</item> | ||
</layout> | ||
</widget> | ||
<customwidgets> | ||
<customwidget> | ||
<class>TBusyLabel</class> | ||
<extends>QLabel</extends> | ||
<header>TBusyLabel.h</header> | ||
</customwidget> | ||
<customwidget> | ||
<class>TElidedLabel</class> | ||
<extends>QLabel</extends> | ||
<header>TElidedLabel.h</header> | ||
</customwidget> | ||
</customwidgets> | ||
<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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
#include "TProgressWidgetPlugin.h" | ||
|
||
WARNINGS_DISABLE | ||
#include <QStringLiteral> | ||
WARNINGS_ENABLE | ||
|
||
class QWidget; | ||
|
||
#include "TProgressWidget.h" | ||
|
||
TProgressWidgetPlugin::TProgressWidgetPlugin(QObject *parent) : QObject(parent) | ||
{ | ||
} | ||
|
||
QIcon TProgressWidgetPlugin::icon() const | ||
{ | ||
return (QIcon()); | ||
} | ||
|
||
QString TProgressWidgetPlugin::group() const | ||
{ | ||
return (QStringLiteral("Display Widgets")); | ||
} | ||
|
||
QString TProgressWidgetPlugin::includeFile() const | ||
{ | ||
return (QStringLiteral("TProgressWidget.h")); | ||
} | ||
|
||
QString TProgressWidgetPlugin::name() const | ||
{ | ||
return (QStringLiteral("TProgressWidget")); | ||
} | ||
|
||
QString TProgressWidgetPlugin::toolTip() const | ||
{ | ||
return (QString()); | ||
} | ||
|
||
QString TProgressWidgetPlugin::whatsThis() const | ||
{ | ||
return (QString()); | ||
} | ||
|
||
QWidget *TProgressWidgetPlugin::createWidget(QWidget *parent) | ||
{ | ||
return (new TProgressWidget(parent)); | ||
} | ||
|
||
bool TProgressWidgetPlugin::isContainer() const | ||
{ | ||
return (false); | ||
} |
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,35 @@ | ||
#ifndef TPROGRESSWIDGETPLUGIN_H | ||
#define TPROGRESSWIDGETPLUGIN_H | ||
|
||
#include "warnings-disable.h" | ||
|
||
WARNINGS_DISABLE | ||
#include <QDesignerCustomWidgetInterface> | ||
#include <QIcon> | ||
#include <QObject> | ||
#include <QString> | ||
WARNINGS_ENABLE | ||
|
||
/* Forward declaration(s). */ | ||
class QWidget; | ||
|
||
class TProgressWidgetPlugin : public QObject, | ||
public QDesignerCustomWidgetInterface | ||
{ | ||
Q_OBJECT | ||
Q_INTERFACES(QDesignerCustomWidgetInterface) | ||
|
||
public: | ||
explicit TProgressWidgetPlugin(QObject *parent = nullptr); | ||
|
||
QIcon icon() const override; | ||
QString group() const override; | ||
QString includeFile() const override; | ||
QString name() const override; | ||
QString toolTip() const override; | ||
QString whatsThis() const override; | ||
QWidget *createWidget(QWidget *parent) override; | ||
bool isContainer() const override; | ||
}; | ||
|
||
#endif /* !TPROGRESSWIDGETPLUGIN_H */ |
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
Oops, something went wrong.