class KTMainWindow

KDE top level main window. More...

Deprecated! use with care
Definition#include <ktmainwindow.h>
InheritsKMainWindow
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Methods

Protected Slots


Detailed Description

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.

 KTMainWindow ( const char *name = 0, WFlags f = WDestructiveClose )

Construct a main window.

KTMainWindows must be created on the heap with 'new', like:

 KTMainWindow *ktmw = new KTMainWindow (...

Parameters:

KTMainWindow ()

[virtual]

Destructor.

Will also destroy the toolbars, and menubar if needed.

void  setView ( QWidget *w, bool = FALSE )

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.

QWidgetview ()

[const]

Retrieve the view widget.

void  enableStatusBar ( KStatusBar::BarStatus stat = KStatusBar::Toggle )

Enable or disable the status bar.

void  enableToolBar ( KToolBar::BarStatus stat = KToolBar::Toggle, int id = 0 )

Enable or disable the toolbar with the specified @id.

If no id is specified, the default id of 0 is used.

void  setEnableToolBar ( KToolBar::BarStatus stat = KToolBar::Toggle, const char * name = "mainToolBar" )

Enable or disable the toolbar with the specified name (as determined by the XML UI framework).

int  addToolBar ( KToolBar *toolbar, int index = -1 )

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.

KToolBartoolBar ( int id = 0 )

Retrieve a pointer to the toolbar with the specified id.

If there is no such tool bar yet, it will be generated.

Reimplemented from KMainWindow.

void  setMenu (KMenuBar * )

void  setStatusBar ( KStatusBar * )

bool  hasMenuBar ()

Returns: true if the menubar exists.

bool  hasStatusBar ()

Returns: true if the statusbar exists.

bool  hasToolBar ( int id = 0 )

Returns: true if the specified toolbar exists.

void  updateRects ()

[protected virtual slot]