• 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
A dialog base class with standard buttons and predefined layouts.
Definition: kdialogbase.h:192
KProgressDialog
KProgressDialog provides a dialog with a text label, a progress bar and an optional cancel button wit...
Definition: kprogress.h:188
KProgress
A progress indicator widget.
Definition: kprogress.h:47
KProgress::percentageChanged
void percentageChanged(int)
Emitted when the state of the progress bar changes.

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.9.4
This website is maintained by Timothy Pearson.