MCPcopy Create free account
hub / github.com/baldurk/renderdoc / RDProgressDialog

Method RDProgressDialog

qrenderdoc/Code/QRDUtils.cpp:2936–2955  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2934{
2935public:
2936 RDProgressDialog(const QString &labelText, QWidget *parent)
2937 // we add 1 so that the progress value never hits maximum until we are actually finished
2938 : QProgressDialog(labelText, QString(), 0, maxProgress + 1, parent), m_Label(this)
2939 {
2940 setWindowTitle(tr("Please Wait"));
2941 setWindowFlags(Qt::CustomizeWindowHint | Qt::Dialog | Qt::WindowTitleHint);
2942 setWindowIcon(QIcon());
2943 setMinimumSize(QSize(250, 0));
2944 setMaximumSize(QSize(500, 200));
2945 setCancelButton(NULL);
2946 setMinimumDuration(0);
2947 setWindowModality(Qt::ApplicationModal);
2948 setValue(0);
2949
2950 m_Label.setText(labelText);
2951 m_Label.setAlignment(Qt::AlignCenter);
2952 m_Label.setWordWrap(true);
2953
2954 setLabel(&m_Label);
2955 }
2956
2957 void enableCancel() { setCancelButtonText(tr("Cancel")); }
2958 void setPercentage(float percent) { setValue(int(maxProgress * percent)); }

Callers

nothing calls this directly

Calls 7

trFunction · 0.70
QStringFunction · 0.50
QIconFunction · 0.50
QSizeClass · 0.50
setValueFunction · 0.50
setTextMethod · 0.45
setAlignmentMethod · 0.45

Tested by

no test coverage detected