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

tdeui

Public Member Functions | Protected Slots | Protected Member Functions | List of all members
KProgressBoxDialog Class Reference

#include <kprogressbox.h>

Inheritance diagram for KProgressBoxDialog:
KDialogBase KDialog

Public Member Functions

 KProgressBoxDialog (TQWidget *parent=0, const char *name=0, const TQString &caption=TQString::null, const TQString &text=TQString::null, bool modal=false)
 
 ~KProgressBoxDialog ()
 
KProgress * progressBar ()
 
KTextEdit * textEdit ()
 
const KProgress * progressBar () const
 
const KTextEdit * textEdit () const
 
void setLabel (const TQString &text)
 
TQString labelText () TDE_DEPRECATED
 
TQString labelText () const
 
void setAllowCancel (bool allowCancel)
 
void setAllowTextEdit (bool allowTextEdit)
 
bool allowCancel () TDE_DEPRECATED
 
bool allowCancel () const
 
void showCancelButton (bool show)
 
void setAutoClose (bool close)
 
bool autoClose ()
 
bool autoClose () const
 
void setAutoReset (bool autoReset)
 
bool autoReset ()
 
bool autoReset () const
 
bool wasCancelled ()
 
bool wasCancelled () const
 
void ignoreCancel ()
 
void setButtonText (const TQString &)
 
TQString buttonText () TDE_DEPRECATED
 
TQString buttonText () const
 
void setMinimumDuration (int ms)
 
int minimumDuration () TDE_DEPRECATED
 
int minimumDuration () const
 
virtual void show ()
 
- Public Member Functions inherited from 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())
 
 KDialogBase (int dialogFace, const TQString &caption, int buttonMask, ButtonCode defaultButton, TQWidget *parent=0, const char *name=0, bool modal=true, bool separator=false, const KGuiItem &user1=KGuiItem(), const KGuiItem &user2=KGuiItem(), const KGuiItem &user3=KGuiItem())
 
 KDialogBase (KDialogBase::DialogType dialogFace, WFlags f, 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())
 
 KDialogBase (const TQString &caption, int buttonMask=Yes|No|Cancel, ButtonCode defaultButton=Yes, ButtonCode escapeButton=Cancel, TQWidget *parent=0, const char *name=0, bool modal=true, bool separator=false, const KGuiItem &yes=KStdGuiItem::yes(), const KGuiItem &no=KStdGuiItem::no(), const KGuiItem &cancel=KStdGuiItem::cancel())
 
 ~KDialogBase ()
 
void setButtonBoxOrientation (int orientation)
 
void setEscapeButton (ButtonCode id)
 
virtual void adjustSize ()
 
virtual TQSize sizeHint () const
 
virtual TQSize minimumSizeHint () const
 
TQFrame * plainPage ()
 
TQFrame * addPage (const TQString &itemName, const TQString &header=TQString::null, const TQPixmap &pixmap=TQPixmap())
 
TQFrame * addPage (const TQStringList &items, const TQString &header=TQString::null, const TQPixmap &pixmap=TQPixmap())
 
TQVBox * addVBoxPage (const TQString &itemName, const TQString &header=TQString::null, const TQPixmap &pixmap=TQPixmap())
 
TQVBox * addVBoxPage (const TQStringList &items, const TQString &header=TQString::null, const TQPixmap &pixmap=TQPixmap())
 
TQHBox * addHBoxPage (const TQString &itemName, const TQString &header=TQString::null, const TQPixmap &pixmap=TQPixmap())
 
TQHBox * addHBoxPage (const TQStringList &items, const TQString &header=TQString::null, const TQPixmap &pixmap=TQPixmap())
 
TQGrid * addGridPage (int n, Orientation dir, const TQString &itemName, const TQString &header=TQString::null, const TQPixmap &pixmap=TQPixmap())
 
TQGrid * addGridPage (int n, Orientation dir, const TQStringList &items, const TQString &header=TQString::null, const TQPixmap &pixmap=TQPixmap())
 
void setFolderIcon (const TQStringList &path, const TQPixmap &pixmap)
 
TQFrame * makeMainWidget ()
 
TQVBox * makeVBoxMainWidget ()
 
TQHBox * makeHBoxMainWidget ()
 
TQGrid * makeGridMainWidget (int n, Orientation dir)
 
void enableButtonSeparator (bool state)
 
void showButton (ButtonCode id, bool state)
 
void showButtonOK (bool state)
 
void showButtonApply (bool state)
 
void showButtonCancel (bool state)
 
bool showPage (int index)
 
int activePageIndex () const
 
int pageIndex (TQWidget *widget) const
 
void setMainWidget (TQWidget *widget)
 
TQWidget * mainWidget ()
 
void disableResize ()
 
void setInitialSize (const TQSize &s, bool noResize=false)
 
void incInitialSize (const TQSize &s, bool noResize=false)
 
TQSize configDialogSize (const TQString &groupName) const
 
TQSize configDialogSize (TDEConfig &config, const TQString &groupName) const
 
void saveDialogSize (const TQString &groupName, bool global=false)
 
void saveDialogSize (TDEConfig &config, const TQString &groupName, bool global=false) const
 
void setButtonOK (const KGuiItem &item=KStdGuiItem::ok())
 
void setButtonOKText (const TQString &text=TQString::null, const TQString &tooltip=TQString::null, const TQString &quickhelp=TQString::null) TDE_DEPRECATED
 
void setButtonApply (const KGuiItem &item=KStdGuiItem::apply())
 
void setButtonApplyText (const TQString &text=TQString::null, const TQString &tooltip=TQString::null, const TQString &quickhelp=TQString::null) TDE_DEPRECATED
 
void setButtonCancel (const KGuiItem &item=KStdGuiItem::cancel())
 
void setButtonCancelText (const TQString &text=TQString::null, const TQString &tooltip=TQString::null, const TQString &quickhelp=TQString::null) TDE_DEPRECATED
 
void setButtonText (ButtonCode id, const TQString &text)
 
void setButtonTip (ButtonCode id, const TQString &text)
 
void setButtonWhatsThis (ButtonCode id, const TQString &text)
 
void setButtonGuiItem (ButtonCode id, const KGuiItem &item)
 
void setTreeListAutoResize (bool state)
 
void setShowIconsInTreeList (bool state)
 
void setRootIsDecorated (bool state)
 
void unfoldTreeList (bool persist=false)
 
void addWidgetBelowList (TQWidget *widget)
 
void addButtonBelowList (const TQString &text, TQObject *recv, const char *slot)
 
void addButtonBelowList (const KGuiItem &guiitem, TQObject *recv, const char *slot)
 
void setIconListAllVisible (bool state)
 
void showTile (bool state)
 
void getBorderWidths (int &ulx, int &uly, int &lrx, int &lry) const TDE_DEPRECATED
 
TQRect getContentsRect () const TDE_DEPRECATED
 
TQSize calculateSize (int w, int h) const
 
TQString helpLinkText () const
 
TQPushButton * actionButton (ButtonCode id)
 
- Public Member Functions inherited from KDialog
 KDialog (TQWidget *parent=0, const char *name=0, bool modal=false, WFlags f=0)
 

Protected Slots

void slotAutoShow ()
 
void slotAutoActions (int percentage)
 
void slotCancel ()
 
- Protected Slots inherited from KDialogBase
virtual void slotHelp ()
 
virtual void slotDefault ()
 
virtual void slotDetails ()
 
virtual void slotUser3 ()
 
virtual void slotUser2 ()
 
virtual void slotUser1 ()
 
virtual void slotOk ()
 
virtual void slotApply ()
 
virtual void slotTry ()
 
virtual void slotYes ()
 
virtual void slotNo ()
 
virtual void slotCancel ()
 
virtual void slotClose ()
 
virtual void applyPressed ()
 
void updateGeometry ()
 
void slotDelayedDestruct ()
 

Protected Member Functions

virtual void virtual_hook (int id, void *data)
 
- Protected Member Functions inherited from KDialogBase
virtual void keyPressEvent (TQKeyEvent *e)
 
virtual void hideEvent (TQHideEvent *)
 
virtual void closeEvent (TQCloseEvent *e)
 
virtual void virtual_hook (int id, void *data)
 
virtual void keyPressEvent (TQKeyEvent *)
 
virtual void virtual_hook (int id, void *data)
 

Additional Inherited Members

- Public Types inherited from KDialogBase
enum  ButtonCode {
  Help = 0x00000001 , Default = 0x00000002 , Ok = 0x00000004 , Apply = 0x00000008 ,
  Try = 0x00000010 , Cancel = 0x00000020 , Close = 0x00000040 , User1 = 0x00000080 ,
  User2 = 0x00000100 , User3 = 0x00000200 , No = 0x00000080 , Yes = 0x00000100 ,
  Details = 0x00000400 , Filler = 0x40000000 , Stretch = 0x80000000 , NoDefault
}
 
enum  ActionButtonStyle {
  ActionStyle0 =0 , ActionStyle1 , ActionStyle2 , ActionStyle3 ,
  ActionStyle4 , ActionStyleMAX
}
 
enum  DialogType {
  TreeList = KJanusWidget::TreeList , Tabbed = KJanusWidget::Tabbed , Plain = KJanusWidget::Plain , Swallow = KJanusWidget::Swallow ,
  IconList = KJanusWidget::IconList
}
 
- Public Slots inherited from KDialogBase
void enableButton (ButtonCode id, bool state)
 
void enableButtonOK (bool state)
 
void enableButtonApply (bool state)
 
void enableButtonCancel (bool state)
 
void enableLinkedHelp (bool state)
 
void delayedDestruct ()
 
void setHelpLinkText (const TQString &text)
 
void setHelp (const TQString &anchor, const TQString &appname=TQString::null)
 
void helpClickedSlot (const TQString &)
 
void setDetails (bool showDetails)
 
void setDetailsWidget (TQWidget *detailsWidget)
 
void updateBackground ()
 
void cancel ()
 
- Public Slots inherited from KDialog
virtual void polish ()
 
virtual void setCaption (const TQString &caption)
 
virtual void setPlainCaption (const TQString &caption)
 
- Signals inherited from KDialogBase
void helpClicked ()
 
void defaultClicked ()
 
void user3Clicked ()
 
void user2Clicked ()
 
void user1Clicked ()
 
void applyClicked ()
 
void tryClicked ()
 
void okClicked ()
 
void yesClicked ()
 
void noClicked ()
 
void cancelClicked ()
 
void closeClicked ()
 
void apply ()
 
void backgroundChanged ()
 
void hidden ()
 
void finished ()
 
void aboutToShowDetails ()
 
void aboutToShowPage (TQWidget *page)
 
- Signals inherited from KDialog
void layoutHintChanged ()
 
- Static Public Member Functions inherited from KDialogBase
static bool haveBackgroundTile ()
 
static const TQPixmap * backgroundTile ()
 
static const TQPixmap * getBackgroundTile () TDE_DEPRECATED
 
static void setBackgroundTile (const TQPixmap *pix)
 
- Static Public Member Functions inherited from KDialog
static int marginHint ()
 
static int spacingHint ()
 
static void resizeLayout (TQWidget *widget, int margin, int spacing)
 
static void resizeLayout (TQLayoutItem *lay, int margin, int spacing)
 
static void centerOnScreen (TQWidget *widget, int screen=-1)
 
static bool avoidArea (TQWidget *widget, const TQRect &area, int screen=-1)
 

Detailed Description

KProgressBoxDialog provides a dialog with a text label, a progress bar and an optional cancel button with a KDE look 'n feel.

Since knowing how long it can take to complete an action and it is undesirable to show a dialog for a split second before hiding it, there are a few ways to control the timing behavior of KProgressBoxDialog. There is a time out that can be set before showing the dialog as well as an option to autohide or keep displaying the dialog once complete.

All the functionality of KProgressBox is available through direct access to the progress bar widget via progressBar();

Also, an expandable textbox provided below the progress bar.

A dialog with a progress bar and text box.

Author
Timothy Pearson

Definition at line 54 of file kprogressbox.h.

Constructor & Destructor Documentation

◆ KProgressBoxDialog()

KProgressBoxDialog::KProgressBoxDialog ( TQWidget *  parent = 0,
const char *  name = 0,
const TQString &  caption = TQString::null,
const TQString &  text = TQString::null,
bool  modal = false 
)

Constructs a KProgressBoxDialog.

Parameters
parentParent of the widget
nameWidget name
captionText to display in window title bar
textText to display in the dialog
modalSet to true to make the dialog modal

Definition at line 56 of file kprogressbox.cpp.

◆ ~KProgressBoxDialog()

KProgressBoxDialog::~KProgressBoxDialog ( )

Destructor.

Definition at line 95 of file kprogressbox.cpp.

Member Function Documentation

◆ allowCancel() [1/2]

bool KProgressBoxDialog::allowCancel ( ) const

Returns true if the dialog can be canceled, false otherwise.

Definition at line 174 of file kprogressbox.cpp.

◆ allowCancel() [2/2]

bool KProgressBoxDialog::allowCancel ( )

Returns true if the dialog can be canceled, false otherwise.

Deprecated:

Definition at line 169 of file kprogressbox.cpp.

◆ autoClose() [1/2]

bool KProgressBoxDialog::autoClose ( )

Returns true if the dialog will close upon completion, or false otherwise.

Definition at line 221 of file kprogressbox.cpp.

◆ autoClose() [2/2]

bool KProgressBoxDialog::autoClose ( ) const

Returns true if the dialog will close upon completion, or false otherwise.

Definition at line 226 of file kprogressbox.cpp.

◆ autoReset() [1/2]

bool KProgressBoxDialog::autoReset ( )

Returns true if the KProgressBox widget will be reset upon completion, or false otherwise.

Definition at line 237 of file kprogressbox.cpp.

◆ autoReset() [2/2]

bool KProgressBoxDialog::autoReset ( ) const

Returns true if the KProgressBox widget will be reset upon completion, or false otherwise.

Definition at line 242 of file kprogressbox.cpp.

◆ buttonText() [1/2]

TQString KProgressBoxDialog::buttonText ( ) const

Returns the text on the cancel button.

Definition at line 264 of file kprogressbox.cpp.

◆ buttonText() [2/2]

TQString KProgressBoxDialog::buttonText ( )

Returns the text on the cancel button.

Deprecated:

Definition at line 259 of file kprogressbox.cpp.

◆ ignoreCancel()

void KProgressBoxDialog::ignoreCancel ( )
Ignores the last cancel action if the cancel button was 
pressed. Useful for kdialog when combined with a KMessageBox
to display a message like "Are you sure you want to cancel?" 
Since
3.5.5

Definition at line 126 of file kprogressbox.cpp.

◆ labelText() [1/2]

TQString KProgressBoxDialog::labelText ( ) const

Returns the current dialog text.

Definition at line 210 of file kprogressbox.cpp.

◆ labelText() [2/2]

TQString KProgressBoxDialog::labelText ( )

Returns the current dialog text.

Deprecated:

Definition at line 205 of file kprogressbox.cpp.

◆ minimumDuration() [1/2]

int KProgressBoxDialog::minimumDuration ( ) const

Returns the wait duration in milliseconds.

Definition at line 151 of file kprogressbox.cpp.

◆ minimumDuration() [2/2]

int KProgressBoxDialog::minimumDuration ( )

Returns the wait duration in milliseconds.

Deprecated:

Definition at line 146 of file kprogressbox.cpp.

◆ progressBar() [1/2]

KProgress * KProgressBoxDialog::progressBar ( )

Returns the KProgressBox used in this dialog.

To set the number of steps or other progress bar related settings, access the KProgressBox object directly via this method.

Definition at line 179 of file kprogressbox.cpp.

◆ progressBar() [2/2]

const KProgress * KProgressBoxDialog::progressBar ( ) const

Returns the KProgressBox used in this dialog.

To set the number of steps or other progress bar related settings, access the KProgressBox object directly via this method.

Definition at line 189 of file kprogressbox.cpp.

◆ setAllowCancel()

void KProgressBoxDialog::setAllowCancel ( bool  allowCancel)

Sets whether or not the user can cancel the process.

If the dialog is cancellable, the Cancel button will be shown and the user can close the window using the window decorations. If the process is not (or should not be) interuptable, set the dialog to be modal and not cancellable.

Parameters
allowCancelSet to true to make the dialog non-closable

Definition at line 156 of file kprogressbox.cpp.

◆ setAllowTextEdit()

void KProgressBoxDialog::setAllowTextEdit ( bool  allowTextEdit)

Sets whether or not the user can edit the text shown in the textbox.

Parameters
allowTextEditSet to true to make the text editable

Definition at line 162 of file kprogressbox.cpp.

◆ setAutoClose()

void KProgressBoxDialog::setAutoClose ( bool  close)

Sets whether the dialog should close automagically when all the steps in the KProgressBox have been completed.

Definition at line 231 of file kprogressbox.cpp.

◆ setAutoReset()

void KProgressBoxDialog::setAutoReset ( bool  autoReset)

Sets whether the dialog should reset the KProgressBox dialog back to 0 steps compelete when all steps have been completed.

This is useful for KProgressBoxDialogs that will be reused.

Definition at line 247 of file kprogressbox.cpp.

◆ setButtonText()

void KProgressBoxDialog::setButtonText ( const TQString &  text)

Sets the text to appear on the cancel button.

Definition at line 252 of file kprogressbox.cpp.

◆ setLabel()

void KProgressBoxDialog::setLabel ( const TQString &  text)

Sets the text in the dialog.

Parameters
textthe text to display

Definition at line 199 of file kprogressbox.cpp.

◆ setMinimumDuration()

void KProgressBoxDialog::setMinimumDuration ( int  ms)

Set the minimum number of milliseconds to wait before actually showing the dialog.

Definition at line 136 of file kprogressbox.cpp.

◆ show()

void KProgressBoxDialog::show ( void  )
virtual

Reimplemented for internal reasons, the API is not affected.

Definition at line 307 of file kprogressbox.cpp.

◆ showCancelButton()

void KProgressBoxDialog::showCancelButton ( bool  show)

Sets whether the cancel button is visible.

setAllowCancel(false) implies showCancelButton(false)

Parameters
showWhether or not the cancel button should be shown

Definition at line 215 of file kprogressbox.cpp.

◆ slotAutoActions

void KProgressBoxDialog::slotAutoActions ( int  percentage)
protectedslot

Definition at line 269 of file kprogressbox.cpp.

◆ slotAutoShow

void KProgressBoxDialog::slotAutoShow ( )
protectedslot

Definition at line 100 of file kprogressbox.cpp.

◆ slotCancel

void KProgressBoxDialog::slotCancel ( void  )
protectedslot

Definition at line 111 of file kprogressbox.cpp.

◆ textEdit() [1/2]

KTextEdit * KProgressBoxDialog::textEdit ( )

Returns the KTextEdit used in this dialog.

To set the number of lines or other text box related settings, access the KTextEdit object directly via this method.

Definition at line 184 of file kprogressbox.cpp.

◆ textEdit() [2/2]

const KTextEdit * KProgressBoxDialog::textEdit ( ) const

Returns the KTextEdit used in this dialog.

To set the number of lines or other text box related settings, access the KTextEdit object directly via this method.

Definition at line 194 of file kprogressbox.cpp.

◆ virtual_hook()

void KProgressBoxDialog::virtual_hook ( int  id,
void *  data 
)
protectedvirtual

Reimplemented from KDialogBase.

Definition at line 313 of file kprogressbox.cpp.

◆ wasCancelled() [1/2]

bool KProgressBoxDialog::wasCancelled ( )

Returns true if the dialog was closed or canceled before completion.

If the dialog is not cancellable it will always return false.

Definition at line 121 of file kprogressbox.cpp.

◆ wasCancelled() [2/2]

bool KProgressBoxDialog::wasCancelled ( ) const

Returns true if the dialog was closed or canceled before completion.

If the dialog is not cancellable it will always return false.

Definition at line 131 of file kprogressbox.cpp.


The documentation for this class was generated from the following files:
  • kprogressbox.h
  • kprogressbox.cpp

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.