• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdelibs-4.14.38 API Reference
  • KDE Home
  • Contact Us
 

KDEUI

  • kdeui
  • dialogs
kprogressdialog.h
Go to the documentation of this file.
1/* This file is part of the KDE libraries
2 Copyright (C) 1996 Martynas Kunigelis // krazy:exclude=copyright (email unknown)
3 Copyright (C) 2006-2007 Urs Wolfer <uwolfer at kde.org>
4
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public
7 License version 2 as published by the Free Software Foundation.
8
9 This library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Library General Public License for more details.
13
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to
16 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 Boston, MA 02110-1301, USA.
18*/
19
20#ifndef KPROGRESSDIALOG_H
21#define KPROGRESSDIALOG_H
22
23#include <QtGui/QProgressBar>
24
25#include <kdialog.h>
26
47class KDEUI_EXPORT KProgressDialog : public KDialog
48{
49 Q_OBJECT
50
51 public:
60 explicit KProgressDialog(QWidget* parent = 0, const QString& caption = QString(),
61 const QString& text = QString(), Qt::WindowFlags flags = 0);
62
66 ~KProgressDialog();
67
73 QProgressBar *progressBar();
74
80 const QProgressBar *progressBar() const;
81
87 void setLabelText(const QString &text);
88
92 QString labelText() const;
93
105 void setAllowCancel(bool allowCancel);
106
110 bool allowCancel() const;
111
120 void showCancelButton(bool show);
121
128 void setAutoClose(bool close);
129
134 bool autoClose() const;
135
143 void setAutoReset(bool autoReset);
144
149 bool autoReset() const;
150
156 bool wasCancelled() const;
157
163 void ignoreCancel();
164
168 void setButtonText(const QString &text);
169
173 QString buttonText() const;
174
186 void setMinimumDuration(int ms);
187
192 int minimumDuration() const;
193
194 virtual void reject();
195
196 protected:
197 virtual void showEvent(QShowEvent *event);
198
199 private:
200 Q_PRIVATE_SLOT(d, void slotAutoShow())
201 Q_PRIVATE_SLOT(d, void slotAutoActions(int percentage))
202
203 private:
204 class KProgressDialogPrivate;
205 friend class KProgressDialogPrivate;
206 KProgressDialogPrivate *const d;
207
208 Q_DISABLE_COPY(KProgressDialog)
209};
210
211#endif
KDialog::buttonText
QString buttonText(ButtonCode id) const
Returns the text of any button.
Definition kdialog.cpp:733
KDialog::KDialog
KDialog(QWidget *parent=0, Qt::WindowFlags flags=0)
Creates a dialog.
Definition kdialog.cpp:189
KDialog::setButtonText
void setButtonText(ButtonCode id, const QString &text)
Sets the text of any button.
Definition kdialog.cpp:719
KProgressDialog::setAutoReset
void setAutoReset(bool autoReset)
Sets whether the dialog should reset the QProgressBar dialog back to 0 steps compelete when all steps...
Definition kprogressdialog.cpp:201
KProgressDialog::ignoreCancel
void ignoreCancel()
Ignores the last cancel action if the cancel button was pressed.
Definition kprogressdialog.cpp:129
KProgressDialog::progressBar
QProgressBar * progressBar()
Returns the QProgressBar used in this dialog.
Definition kprogressdialog.cpp:161
KProgressDialog::reject
virtual void reject()
Definition kprogressdialog.cpp:114
KProgressDialog::allowCancel
bool allowCancel() const
Returns true if the dialog can be canceled, false otherwise.
Definition kprogressdialog.cpp:156
KProgressDialog::autoClose
bool autoClose() const
Returns true if the dialog will close upon completion, or false otherwise.
Definition kprogressdialog.cpp:186
KProgressDialog::KProgressDialog
KProgressDialog(QWidget *parent=0, const QString &caption=QString(), const QString &text=QString(), Qt::WindowFlags flags=0)
Constructs a KProgressDialog.
Definition kprogressdialog.cpp:62
KProgressDialog::showEvent
virtual void showEvent(QShowEvent *event)
Definition kprogressdialog.cpp:108
KProgressDialog::setMinimumDuration
void setMinimumDuration(int ms)
Set the minimum number of milliseconds to wait before actually showing the dialog.
Definition kprogressdialog.cpp:134
KProgressDialog::setAllowCancel
void setAllowCancel(bool allowCancel)
Sets whether or not the user can cancel the process.
Definition kprogressdialog.cpp:150
KProgressDialog::wasCancelled
bool wasCancelled() const
Returns true if the dialog was closed or canceled before completion.
Definition kprogressdialog.cpp:124
KProgressDialog::labelText
QString labelText() const
Returns the current dialog text.
Definition kprogressdialog.cpp:176
KProgressDialog::minimumDuration
int minimumDuration() const
Returns the time that must pass before the dialog appears.
Definition kprogressdialog.cpp:145
KProgressDialog::showCancelButton
void showCancelButton(bool show)
Sets whether the cancel button is visible.
Definition kprogressdialog.cpp:181
KProgressDialog::setAutoClose
void setAutoClose(bool close)
Sets whether the dialog should close automagically when all the steps in the QProgressBar have been c...
Definition kprogressdialog.cpp:191
KProgressDialog::autoReset
bool autoReset() const
Returns true if the QProgressBar widget will be reset upon completion, or false otherwise.
Definition kprogressdialog.cpp:196
KProgressDialog::setLabelText
void setLabelText(const QString &text)
Sets the text in the dialog.
Definition kprogressdialog.cpp:171
QWidget
kdialog.h
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 17 2025 00:00:00 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KDEUI

Skip menu "KDEUI"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdelibs-4.14.38 API Reference

Skip menu "kdelibs-4.14.38 API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal