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

tderandr

  • tderandr
ktimerdialog.h
1/*
2 * This file is part of the KDE Libraries
3 * Copyright (C) 2002 Hamish Rodda <rodda@kde.org>
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version.
9 *
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Library General Public License for more details.
14 *
15 * You should have received a copy of the GNU Library General Public License
16 * along with this library; see the file COPYING.LIB. If not, write to
17 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 * Boston, MA 02110-1301, USA.
19 *
20 */
21#ifndef _KTIMERDIALOG_H_
22#define _KTIMERDIALOG_H_
23
24#include <kdialogbase.h>
25
26class TQTimer;
27class TQHBox;
28class TQProgressBar;
29class TQLabel;
30
45class KTimerDialog : public KDialogBase
46{
47 TQ_OBJECT
48
49 public:
50
57 enum TimerStyle
58 {
59 CountDown,
60 CountUp,
61 Manual
62 };
63
70 KTimerDialog( int msec, TimerStyle style=CountDown, TQWidget *parent=0,
71 const char *name=0, bool modal=true,
72 const TQString &caption=TQString::null,
73 int buttonMask=Ok|Apply|Cancel, ButtonCode defaultButton=Ok,
74 bool separator=false,
75 const KGuiItem &user1=KGuiItem(),
76 const KGuiItem &user2=KGuiItem(),
77 const KGuiItem &user3=KGuiItem() );
78
82 ~KTimerDialog();
83
87 virtual void show();
88
92 void setRefreshInterval( int msec );
93
98 int timeoutButton() const;
99
104 void setTimeoutButton( ButtonCode newButton );
105
109 int timerStyle() const;
110
114 void setTimerStyle( TimerStyle newStyle );
115
120 void setMainWidget( TQWidget *widget );
121
122 signals:
126 void timerTimeout();
127
128 public slots:
132 int exec();
133
134 private slots:
138 void slotUpdateTime( bool update = true );
139
143 void slotInternalTimeout();
144
145 private:
149 void setupLayout();
150
151 TQTimer *totalTimer;
152 TQTimer *updateTimer;
153 int msecRemaining, updateInterval, msecTotal;
154
155 ButtonCode buttonOnTimeout;
156 TimerStyle tStyle;
157
158 TQHBox *timerWidget;
159 TQProgressBar *timerProgress;
160 TQLabel *timerLabel;
161 TQVBox *mainWidget;
162
163 class KTimerDialogPrivate;
164 KTimerDialogPrivate *d;
165};
166
167#endif
168
169
170
KTimerDialog
Provides a dialog that is only available for a specified amount of time, and reports the time remaini...
Definition: ktimerdialog.h:46
KTimerDialog::~KTimerDialog
~KTimerDialog()
Destructor.
Definition: ktimerdialog.cpp:75
KTimerDialog::exec
int exec()
Execute the dialog modally - see.
Definition: ktimerdialog.cpp:86
KTimerDialog::setTimeoutButton
void setTimeoutButton(ButtonCode newButton)
Sets the ButtonCode to determine which button will be activated once the timer times out.
Definition: ktimerdialog.cpp:123
KTimerDialog::TimerStyle
TimerStyle
Definition: ktimerdialog.h:58
KTimerDialog::KTimerDialog
KTimerDialog(int msec, TimerStyle style=CountDown, 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: ktimerdialog.cpp:38
KTimerDialog::show
virtual void show()
Execute the dialog modelessly - see.
Definition: ktimerdialog.cpp:79
KTimerDialog::setMainWidget
void setMainWidget(TQWidget *widget)
Overridden function which is used to set the main widget of the dialog.
Definition: ktimerdialog.cpp:93
KTimerDialog::timerStyle
int timerStyle() const
Retrieves the current TimerStyle.
Definition: ktimerdialog.cpp:128
KTimerDialog::timerTimeout
void timerTimeout()
Signal which is emitted once the timer has timed out.
KTimerDialog::setRefreshInterval
void setRefreshInterval(int msec)
Set the refresh interval for the timer progress.
Definition: ktimerdialog.cpp:111
KTimerDialog::setTimerStyle
void setTimerStyle(TimerStyle newStyle)
Sets the TimerStyle.
Definition: ktimerdialog.cpp:133
KTimerDialog::timeoutButton
int timeoutButton() const
Retrieves the ButtonCode which will be activated once the timer times out.
Definition: ktimerdialog.cpp:118

tderandr

Skip menu "tderandr"
  • Main Page
  • Alphabetical List
  • Class List
  • File List
  • Class Members
  • Related Pages

tderandr

Skip menu "tderandr"
  • 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 tderandr by doxygen 1.9.4
This website is maintained by Timothy Pearson.