QGIS API Documentation
4.3.0-Master (52aa6503bed)
Toggle main menu visibility
Loading...
Searching...
No Matches
src
gui
qgsbusyindicatordialog.cpp
Go to the documentation of this file.
1
/***************************************************************************
2
qgsbusyindicatordialog.cpp
3
--------------------------
4
begin : Mar 27, 2013
5
copyright : (C) 2013 by Larry Shaffer
6
email : larrys at dakcarto dot com
7
***************************************************************************/
8
9
/***************************************************************************
10
* *
11
* This program is free software; you can redistribute it and/or modify *
12
* it under the terms of the GNU General Public License as published by *
13
* the Free Software Foundation; either version 2 of the License, or *
14
* (at your option) any later version. *
15
* *
16
***************************************************************************/
17
18
#include "
qgsbusyindicatordialog.h
"
19
20
#include <QDialog>
21
#include <QLabel>
22
#include <QLayout>
23
#include <QProgressBar>
24
25
#include "moc_qgsbusyindicatordialog.cpp"
26
27
QgsBusyIndicatorDialog::QgsBusyIndicatorDialog
(
const
QString &
message
, QWidget *parent, Qt::WindowFlags fl )
28
: QDialog( parent, fl )
29
, mMessage( QString(
message
) )
30
31
{
32
setWindowTitle( tr(
"QGIS"
) );
33
setLayout(
new
QVBoxLayout() );
34
setWindowModality( Qt::WindowModal );
35
setMinimumWidth( 250 );
36
mMsgLabel =
new
QLabel( mMessage );
37
layout()->addWidget( mMsgLabel );
38
39
QProgressBar *pb =
new
QProgressBar();
40
pb->setMaximum( 0 );
// show as busy indicator
41
layout()->addWidget( pb );
42
43
if
( mMessage.isEmpty() )
44
{
45
mMsgLabel->hide();
46
}
47
}
48
49
void
QgsBusyIndicatorDialog::setMessage
(
const
QString &
message
)
50
{
51
if
( !
message
.isEmpty() )
52
{
53
mMessage = QString(
message
);
54
mMsgLabel->setText( mMessage );
55
mMsgLabel->show();
56
}
57
}
QgsBusyIndicatorDialog::message
QString message() const
Definition
qgsbusyindicatordialog.h:46
QgsBusyIndicatorDialog::setMessage
void setMessage(const QString &message)
Definition
qgsbusyindicatordialog.cpp:49
QgsBusyIndicatorDialog::QgsBusyIndicatorDialog
QgsBusyIndicatorDialog(const QString &message=QString(), QWidget *parent=nullptr, Qt::WindowFlags fl=QgsGuiUtils::ModalDialogFlags)
Constructor Modal busy indicator dialog with no buttons.
Definition
qgsbusyindicatordialog.cpp:27
qgsbusyindicatordialog.h
Generated on
for QGIS API Documentation by
1.17.0