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

kdeui

  • kdeui
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 
46 class KDEUI_EXPORT KProgress : public TQProgressBar
47 {
48  Q_OBJECT
49 
50 public:
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 KDE_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) KDE_DEPRECATED;
103 
107  // ### Remove this KDE 4.0
108  int maxValue() KDE_DEPRECATED;
109 
110 public 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 
152 signals:
156  void percentageChanged(int);
157 
158 protected:
159  virtual bool setIndicator(TQString & indicator, int progress, int totalSteps);
160 
161 private:
162  TQString mFormat;
163 
164 protected:
165  virtual void virtual_hook( int id, void* data );
166 private:
167  class KProgressPrivate;
168  KProgressPrivate *d;
169 };
170 
187 class KDEUI_EXPORT KProgressDialog : public KDialogBase
188 {
189  Q_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() KDE_DEPRECATED;
238 
242  TQString labelText() const;
243 
253  void setAllowCancel(bool allowCancel);
254 
259  // ### Remove this KDE 4.0
260  bool allowCancel() KDE_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() KDE_DEPRECATED;
348 
352  TQString buttonText() const;
353 
358  void setMinimumDuration(int ms);
359 
364  // ### Remove this KDE 4.0
365  int minimumDuration() KDE_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

kdeui

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

kdeui

Skip menu "kdeui"
  • arts
  • dcop
  • dnssd
  • interfaces
  •     interface
  •     library
  •   kspeech
  •   ktexteditor
  • kabc
  • kate
  • kcmshell
  • kdecore
  • kded
  • kdefx
  • kdeprint
  • kdesu
  • kdeui
  • kdoctools
  • khtml
  • kimgio
  • kinit
  • kio
  •   bookmarks
  •   httpfilter
  •   kfile
  •   kio
  •   kioexec
  •   kpasswdserver
  •   kssl
  • kioslave
  •   http
  • kjs
  • kmdi
  •   kmdi
  • knewstuff
  • kparts
  • krandr
  • kresources
  • kspell2
  • kunittest
  • kutils
  • kwallet
  • libkmid
  • libkscreensaver
Generated for kdeui by doxygen 1.8.3.1
This website is maintained by Timothy Pearson.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. |