• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • tdeui
 

tdeui

  • tdeui
kprogress.h
1/* This file is part of the KDE libraries
2 Copyright (C) 1996 Martynas Kunigelis
3
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public
6 License version 2 as published by the Free Software Foundation.
7
8 This library is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 Library General Public License for more details.
12
13 You should have received a copy of the GNU Library General Public License
14 along with this library; see the file COPYING.LIB. If not, write to
15 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
16 Boston, MA 02110-1301, USA.
17*/
18/*****************************************************************************
19* *
20* KProgress -- progress indicator widget for KDE *
21* Original QRangeControl-based version written by Martynas Kunigelis *
22* Current TQProgressBar based version by Aaron Seigo *
23* *
24*****************************************************************************/
25
26#ifndef _KPROGRESS_H
27#define _KPROGRESS_H "$Id$"
28
29#include <tqprogressbar.h>
30#include <kdialogbase.h>
31
46class TDEUI_EXPORT KProgress : public TQProgressBar
47{
48 TQ_OBJECT
49
50public:
54 KProgress(TQWidget *parent=0, const char *name=0, WFlags f = 0);
55
62 KProgress(int totalSteps, TQWidget *parent=0, const char *name=0, WFlags f = 0);
63
67 ~KProgress();
68
73 void setTextEnabled(bool);
74
80 // ### Remove this KDE 4.0
81 int value() const TDE_DEPRECATED;
82
89 bool textEnabled() const;
90
95 TQString format() const;
96
101 // ### Remove this KDE 4.0
102 void setRange(int min, int max) TDE_DEPRECATED;
103
107 // ### Remove this KDE 4.0
108 int maxValue() TDE_DEPRECATED;
109
110public slots:
111
124 void setFormat(const TQString & format);
125
130 void setTotalSteps(int totalSteps);
131
135 virtual void setProgress(int progress);
136
140 // ### Remove this KDE 4.0
141 void setValue(int progress);
142
150 virtual void advance(int offset);
151
152signals:
156 void percentageChanged(int);
157
158protected:
159 virtual bool setIndicator(TQString & indicator, int progress, int totalSteps);
160
161private:
162 TQString mFormat;
163
164protected:
165 virtual void virtual_hook( int id, void* data );
166private:
167 class KProgressPrivate;
168 KProgressPrivate *d;
169};
170
187class TDEUI_EXPORT KProgressDialog : public KDialogBase
188{
189 TQ_OBJECT
190
191 public:
201 KProgressDialog(TQWidget* parent = 0, const char* name = 0,
202 const TQString& caption = TQString::null,
203 const TQString& text = TQString::null,
204 bool modal = false);
205
209 ~KProgressDialog();
210
216 KProgress* progressBar();
217
223 const KProgress* progressBar() const;
224
230 void setLabel(const TQString & text);
231
236 // ### Remove this KDE 4.0
237 TQString labelText() TDE_DEPRECATED;
238
242 TQString labelText() const;
243
253 void setAllowCancel(bool allowCancel);
254
259 // ### Remove this KDE 4.0
260 bool allowCancel() TDE_DEPRECATED;
261
265 bool allowCancel() const;
266
273 void showCancelButton(bool show);
274
279 void setAutoClose(bool close);
280
285 // ### Remove this KDE 4.0
286 bool autoClose();
287
292 bool autoClose() const;
293
299 void setAutoReset(bool autoReset);
300
305 // ### Remove this KDE 4.0
306 bool autoReset();
307
312 bool autoReset() const;
313
319 // ### Remove this KDE 4.0
320 bool wasCancelled();
321
327 bool wasCancelled() const;
328
335 void ignoreCancel();
336
340 void setButtonText(const TQString&);
341
346 // ### Remove this KDE 4.0
347 TQString buttonText() TDE_DEPRECATED;
348
352 TQString buttonText() const;
353
358 void setMinimumDuration(int ms);
359
364 // ### Remove this KDE 4.0
365 int minimumDuration() TDE_DEPRECATED;
366
370 int minimumDuration() const;
371
375 virtual void show();
376
377 protected slots:
378 void slotAutoShow();
379 void slotAutoActions(int percentage);
380 void slotCancel();
381
382 private:
383 // ### Move these member variables to d in KDE 4.0
384 bool mAutoClose;
385 bool mAutoReset;
386 bool mCancelled;
387 bool mAllowCancel;
388 bool mShown;
389 TQString mCancelText;
390 TQLabel* mLabel;
391 KProgress* mProgressBar;
392 TQTimer* mShowTimer;
393 int mMinDuration;
394 protected:
395 virtual void virtual_hook( int id, void* data );
396 private:
397 struct KProgressDialogPrivate;
398 KProgressDialogPrivate *d;
399};
400
401#endif
KDialogBase::KDialogBase
KDialogBase(TQWidget *parent=0, const char *name=0, bool modal=true, const TQString &caption=TQString::null, int buttonMask=Ok|Apply|Cancel, ButtonCode defaultButton=Ok, bool separator=false, const KGuiItem &user1=KGuiItem(), const KGuiItem &user2=KGuiItem(), const KGuiItem &user3=KGuiItem())
Constructor for the standard mode where you must specify the main widget with setMainWidget() .
Definition kdialogbase.cpp:99
KProgressDialog::autoClose
bool autoClose()
Returns true if the dialog will close upon completion, or false otherwise.
Definition kprogress.cpp:315
KProgressDialog::labelText
TQString labelText() TDE_DEPRECATED
Returns the current dialog text.
Definition kprogress.cpp:299
KProgressDialog::setAutoReset
void setAutoReset(bool autoReset)
Sets whether the dialog should reset the KProgress dialog back to 0 steps compelete when all steps ha...
Definition kprogress.cpp:341
KProgressDialog::allowCancel
bool allowCancel() TDE_DEPRECATED
Returns true if the dialog can be canceled, false otherwise.
Definition kprogress.cpp:273
KProgressDialog::KProgressDialog
KProgressDialog(TQWidget *parent=0, const char *name=0, const TQString &caption=TQString::null, const TQString &text=TQString::null, bool modal=false)
Constructs a KProgressDialog.
Definition kprogress.cpp:169
KProgressDialog::ignoreCancel
void ignoreCancel()
Definition kprogress.cpp:236
KProgressDialog::show
virtual void show()
Reimplemented for internal reasons, the API is not affected.
Definition kprogress.cpp:401
KProgressDialog::setMinimumDuration
void setMinimumDuration(int ms)
Set the minimum number of milliseconds to wait before actually showing the dialog.
Definition kprogress.cpp:246
KProgressDialog::buttonText
TQString buttonText() TDE_DEPRECATED
Returns the text on the cancel button.
Definition kprogress.cpp:353
KProgressDialog::setAllowCancel
void setAllowCancel(bool allowCancel)
Sets whether or not the user can cancel the process.
Definition kprogress.cpp:266
KProgressDialog::wasCancelled
bool wasCancelled()
Returns true if the dialog was closed or canceled before completion.
Definition kprogress.cpp:231
KProgressDialog::autoReset
bool autoReset()
Returns true if the KProgress widget will be reset upon completion, or false otherwise.
Definition kprogress.cpp:331
KProgressDialog::progressBar
KProgress * progressBar()
Returns the KProgress used in this dialog.
Definition kprogress.cpp:283
KProgressDialog::showCancelButton
void showCancelButton(bool show)
Sets whether the cancel button is visible.
Definition kprogress.cpp:309
KProgressDialog::setAutoClose
void setAutoClose(bool close)
Sets whether the dialog should close automagically when all the steps in the KProgress have been comp...
Definition kprogress.cpp:325
KProgressDialog::setButtonText
void setButtonText(const TQString &)
Sets the text to appear on the cancel button.
Definition kprogress.cpp:346
KProgressDialog::minimumDuration
int minimumDuration() TDE_DEPRECATED
Returns the wait duration in milliseconds.
Definition kprogress.cpp:256
KProgressDialog::setLabel
void setLabel(const TQString &text)
Sets the text in the dialog.
Definition kprogress.cpp:293
KProgress
A progress indicator widget.
Definition kprogress.h:47
KProgress::setRange
void setRange(int min, int max) TDE_DEPRECATED
Definition kprogress.cpp:91
KProgress::textEnabled
bool textEnabled() const
Returns true if progress text will be displayed, false otherwise.
Definition kprogress.cpp:107
KProgress::setTextEnabled
void setTextEnabled(bool)
If this is set to true, the progress text will be displayed.
Definition kprogress.cpp:102
KProgress::setFormat
void setFormat(const TQString &format)
Set the format of the text to use to display status.
Definition kprogress.cpp:112
KProgress::KProgress
KProgress(TQWidget *parent=0, const char *name=0, WFlags f=0)
Construct a progress bar.
Definition kprogress.cpp:41
KProgress::value
int value() const TDE_DEPRECATED
Definition kprogress.cpp:125
KProgress::setProgress
virtual void setProgress(int progress)
Set the current value of the progress bar to progress.
Definition kprogress.cpp:74
KProgress::setValue
void setValue(int progress)
Definition kprogress.cpp:85
KProgress::setTotalSteps
void setTotalSteps(int totalSteps)
Set the current total number of steps in the action that the progress bar is representing.
Definition kprogress.cpp:64
KProgress::percentageChanged
void percentageChanged(int)
Emitted when the state of the progress bar changes.
KProgress::advance
virtual void advance(int offset)
Advance the progress bar by offset.
Definition kprogress.cpp:59
KProgress::format
TQString format() const
Retrieve the current format for printing status text.
Definition kprogress.cpp:119
KProgress::maxValue
int maxValue() TDE_DEPRECATED
Definition kprogress.cpp:97

tdeui

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

tdeui

Skip menu "tdeui"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdeui by doxygen 1.15.0
This website is maintained by Timothy Pearson.