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

kdeui

kprogress.h
00001 /* This file is part of the KDE libraries
00002    Copyright (C) 1996 Martynas Kunigelis
00003 
00004    This library is free software; you can redistribute it and/or
00005    modify it under the terms of the GNU Library General Public
00006    License version 2 as published by the Free Software Foundation.
00007 
00008    This library is distributed in the hope that it will be useful,
00009    but WITHOUT ANY WARRANTY; without even the implied warranty of
00010    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00011    Library General Public License for more details.
00012 
00013    You should have received a copy of the GNU Library General Public License
00014    along with this library; see the file COPYING.LIB.  If not, write to
00015    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00016    Boston, MA 02110-1301, USA.
00017 */
00018 /*****************************************************************************
00019 *                                                                            *
00020 *  KProgress -- progress indicator widget for KDE                            *
00021 *  Original QRangeControl-based version written by Martynas Kunigelis        *
00022 *  Current TQProgressBar based version by Aaron Seigo                         *
00023 *                                                                            *
00024 *****************************************************************************/
00025 
00026 #ifndef _KPROGRESS_H
00027 #define _KPROGRESS_H "$Id$"
00028 
00029 #include <tqprogressbar.h>
00030 #include <kdialogbase.h>
00031 
00046 class KDEUI_EXPORT KProgress : public TQProgressBar
00047 {
00048   Q_OBJECT
00049 
00050 public:
00054   KProgress(TQWidget *parent=0, const char *name=0, WFlags f = 0);
00055 
00062   KProgress(int totalSteps, TQWidget *parent=0, const char *name=0, WFlags f = 0);
00063 
00067   ~KProgress();
00068 
00073   void setTextEnabled(bool);
00074 
00080   // ### Remove this KDE 4.0
00081   int value() const KDE_DEPRECATED;
00082 
00089   bool textEnabled() const;
00090 
00095   TQString format() const;
00096 
00101   // ### Remove this KDE 4.0
00102   void setRange(int min, int max) KDE_DEPRECATED;
00103 
00107   // ### Remove this KDE 4.0
00108   int maxValue() KDE_DEPRECATED;
00109 
00110 public slots:
00111 
00124   void setFormat(const TQString & format);
00125 
00130   void setTotalSteps(int totalSteps);
00131 
00135   virtual void setProgress(int progress);
00136 
00140   // ### Remove this KDE 4.0
00141   void setValue(int progress);
00142 
00150   virtual void advance(int offset);
00151 
00152 signals:
00156   void percentageChanged(int);
00157 
00158 protected:
00159   virtual bool setIndicator(TQString & indicator, int progress, int totalSteps);
00160 
00161 private:
00162   TQString   mFormat;
00163 
00164 protected:
00165   virtual void virtual_hook( int id, void* data );
00166 private:
00167   class KProgressPrivate;
00168   KProgressPrivate *d;
00169 };
00170 
00187 class KDEUI_EXPORT KProgressDialog : public KDialogBase
00188 {
00189     Q_OBJECT
00190 
00191     public:
00201         KProgressDialog(TQWidget* parent = 0, const char* name = 0,
00202                         const TQString& caption = TQString::null,
00203                         const TQString& text = TQString::null,
00204                         bool modal = false);
00205 
00209         ~KProgressDialog();
00210 
00216         KProgress* progressBar();
00217 
00223         const KProgress* progressBar() const;
00224 
00230         void    setLabel(const TQString & text);
00231 
00236         // ### Remove this KDE 4.0
00237         TQString labelText() KDE_DEPRECATED;
00238 
00242         TQString labelText() const;
00243 
00253         void setAllowCancel(bool allowCancel);
00254 
00259         // ### Remove this KDE 4.0
00260         bool allowCancel() KDE_DEPRECATED;
00261 
00265         bool allowCancel() const;
00266 
00273         void showCancelButton(bool show);
00274 
00279         void setAutoClose(bool close);
00280 
00285         // ### Remove this KDE 4.0
00286         bool autoClose();
00287 
00292         bool autoClose() const;
00293 
00299         void setAutoReset(bool autoReset);
00300 
00305         // ### Remove this KDE 4.0
00306         bool autoReset();
00307 
00312         bool autoReset() const;
00313 
00319         // ### Remove this KDE 4.0
00320         bool wasCancelled();
00321 
00327         bool wasCancelled() const;
00328 
00335         void ignoreCancel();
00336 
00340         void setButtonText(const TQString&);
00341 
00346         // ### Remove this KDE 4.0
00347         TQString buttonText() KDE_DEPRECATED;
00348 
00352         TQString buttonText() const;
00353 
00358         void setMinimumDuration(int ms);
00359 
00364         // ### Remove this KDE 4.0
00365         int  minimumDuration() KDE_DEPRECATED;
00366 
00370         int  minimumDuration() const;
00371 
00375         virtual void show();
00376 
00377     protected slots:
00378         void slotAutoShow();
00379         void slotAutoActions(int percentage);
00380         void slotCancel();
00381 
00382     private:
00383         // ### Move these member variables to d in KDE 4.0
00384         bool       mAutoClose;
00385         bool       mAutoReset;
00386         bool       mCancelled;
00387         bool       mAllowCancel;
00388         bool       mShown;
00389         TQString    mCancelText;
00390         TQLabel*    mLabel;
00391         KProgress* mProgressBar;
00392         TQTimer*    mShowTimer;
00393         int        mMinDuration;
00394     protected:
00395     virtual void virtual_hook( int id, void* data );
00396     private:
00397         struct KProgressDialogPrivate;
00398         KProgressDialogPrivate *d;
00399 };
00400 
00401 #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.7.6.1
This website is maintained by Timothy Pearson.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. |