26
class QAbstractButton;
28
#include "Enumeration.h"
32
class HistorySizeDialog;
33
* A dialog which allows the user to select the number of lines of output
34
* which are remembered for a session.
36
37
class HistorySizeDialog : public KDialog
42
* Construct a new history size dialog.
44
HistorySizeDialog( QWidget* parent );
46
/** Specifies the type of history scroll */
50
* No history. Lines of output are lost
51
* as soon as they are scrolled off-screen.
55
* A history which stores up to a fixed number of lines
60
* An 'unlimited' history which stores lines of output in
67
/** Specifies the history mode. */
68
void setMode( HistoryMode mode );
69
/** Returns the history mode chosen by the user. */
70
HistoryMode mode() const;
72
* Returns the number of lines of history to remember.
73
* This is only valid when mode() == FixedSizeHistory,
74
* and returns 0 otherwise.
42
explicit HistorySizeDialog(QWidget* parent = 0);
45
/** See HistorySizeWidget::setMode. */
46
void setMode(Enum::HistoryModeEnum aMode);
48
/** See HistorySizeWidget::mode. */
49
Enum::HistoryModeEnum mode() const;
51
/** See HistorySizeWidget::setLineCount. */
52
void setLineCount(int lines);
54
/** See HistorySizeWidget::lineCount. */
76
55
int lineCount() const;
77
/** Sets the number of lines for the fixed size history mode. */
78
void setLineCount(int lines);
82
* Emitted when the user changes the scroll-back mode or line count and
83
* accepts the change by pressing the OK button
85
* @param mode The current history mode. This is a value from the HistoryMode enum.
86
* @param lineCount The current line count. This is only applicable if mode is
89
void optionsChanged(int mode , int lineCount);
93
// fires the optionsChanged() signal with the current mode
94
// and line count as arguments
95
void emitOptionsChanged();
98
QAbstractButton* _noHistoryButton;
99
QAbstractButton* _fixedHistoryButton;
100
QAbstractButton* _unlimitedHistoryButton;
101
KIntSpinBox* _lineCountBox;
103
// 1000 lines was the default in the KDE 3 series
104
static const int defaultLineCount = 1000;
58
Ui::HistorySizeDialog* _ui;
109
62
#endif // HISTORYSIZEDIALOG_H