|
|
Compatibility top level widget class
This class is intended to make porting of KDE-1.x applications easier. For new applications, use its base class KMainWindow.
|
Construct a main window.
KTMainWindows must be created on the heap with 'new', like:
KTMainWindow *ktmw = new KTMainWindow (...</pre>
Parameters:
name | The object name. For session management to work properly, all main windows in the application have to have a different name. When passing 0 (the default), KTMainWindow will create such a name for you. So simply never pass anything else ;-) |
f | Specify the widget flags. The default is WDestructiveClose. It indicates that a main window is automatically destroyed when its window is closed. Pass 0 if you do not want this behaviour. |
~ |
[virtual]
Destructor.
Will also destroy the toolbars, and menubar if needed.
void |
Set the main client widget.
This is the main widget for your application; it's geometry will be automatically managed by KTMainWindow to fit the client area, constrained by the positions of the menu, toolbars and status bar. It can be fixed-width or Y-fixed.
Only one client widget can be handled at a time. Multiple calls of setView() will cause only the last widget to be added to be properly handled. The layout management will not start before this function has been called. It increases the application start speed to call this function after all bars have been registered. The presence of the view widget is mandatory for the class to operate.
The widget must have been created with this instance of KTMainWindow as its parent.
QWidget * |
[const]
Retrieve the view widget.
void |
Enable or disable the status bar.
void |
Enable or disable the toolbar with the specified @id.
If no id is specified, the default id of 0 is used.
void |
Enable or disable the toolbar with the specified name (as determined by the XML UI framework).
int |
Add a toolbar to the widget.
A toolbar added to this widget will be automatically laid out by it.
The toolbar must have been created with this instance of KTMainWindow as its parent.
Usually you do not need this function. Just refer to a toolbar with toolBar(index) instead and the KTMainWindow will create it for you. Anyway addToolBar() is useful if you want to pass additional arguments to the toolbar's constructor.
void |
void |
void |
[protected virtual slot]