From 5cc6199846f7e797df52a9dad916f27bf3d6265d Mon Sep 17 00:00:00 2001 From: Noldor Date: Wed, 26 Aug 2009 15:32:22 +0000 Subject: Fixed kvs widgets on statusbar and some doc fixes git-svn-id: https://svn.kvirc.de/svn/trunk/kvirc@3428 17fca916-40b9-46aa-a4ea-0a15b648b75c --- src/modules/objects/class_widget.cpp | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'src/modules/objects/class_widget.cpp') diff --git a/src/modules/objects/class_widget.cpp b/src/modules/objects/class_widget.cpp index 459d44bdb..e3e842312 100644 --- a/src/modules/objects/class_widget.cpp +++ b/src/modules/objects/class_widget.cpp @@ -34,6 +34,8 @@ #include "kvi_window.h" #include "kvi_app.h" #include "kvi_frame.h" +#include "kvi_statusbar.h" + #include #include @@ -496,7 +498,7 @@ const Qt::WindowType widgettypes_cod[] = { NoSystemBackground - Indicates that the widget has no background, i.e. when the widget receives paint events, the background is not automatically repainted. PaintOnScreen - Indicates that the widget wants to draw directly onto the screen. NoMousePropagation - Prohibits mouse events from being propagated to the widget's parent. - !fn: $setStyleSheet()[QT4 only] + !fn: $setStyleSheet() !fn: $array() Returns the color in color_group(disabled, active or inactive), used for color_role. @@ -512,7 +514,7 @@ const Qt::WindowType widgettypes_cod[] = { !fn: $setKeyShortCut() Adds a shortcut whith key. A [classfnc]$shortCutEvent[/classfnc] will be triggered when the user will press alt+key. - !fn: $shortCutEvent()[QT4 only] + !fn: $shortCutEvent() This function will be called when a shortcut key has been triggered. You must reimplement this event to manage a shortcut system in a custom widget. The default implementation does nothing. @@ -718,7 +720,6 @@ KVSO_END_REGISTERCLASS(KviKvsObject_widget) KVSO_BEGIN_CONSTRUCTOR(KviKvsObject_widget,KviKvsObject) KVSO_END_CONSTRUCTOR(KviKvsObject_widget) KVSO_BEGIN_DESTRUCTOR(KviKvsObject_widget) - emit aboutToDie(); // if (webview) delete webview; KVSO_END_CONSTRUCTOR(KviKvsObject_widget) @@ -1956,11 +1957,8 @@ KVSO_CLASS_FUNCTION(widget,setKeyShortcut) KVSO_CLASS_FUNCTION(widget,insertIntoStatusBar) { CHECK_INTERNAL_POINTER(widget()) - kvs_int_t iIndex; - KVSO_PARAMETERS_BEGIN(c) - KVSO_PARAMETER("index",KVS_PT_UNSIGNEDINTEGER,0,iIndex) - KVSO_PARAMETERS_END(c) - g_pFrame->statusBar()->insertPermanentWidget(iIndex,widget()); + if (g_pFrame->mainStatusBar()) + g_pFrame->mainStatusBar()->insertPermanentWidgetAtTheEnd(widget(),0); return true; } -- cgit v1.3.1-10-gc9f91