aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules/objects/class_widget.cpp
diff options
context:
space:
mode:
authorGravatar Noldor2009-08-26 15:32:22 +0000
committerGravatar Noldor2009-08-26 15:32:22 +0000
commit5cc6199846f7e797df52a9dad916f27bf3d6265d (patch)
treef60f116c7850408bb4eff0972e6ff0f103fdee79 /src/modules/objects/class_widget.cpp
parentRemoved old references to kvi_run_netscape.sh, we'll stick with freedesktop's... (diff)
downloadKVIrc-5cc6199846f7e797df52a9dad916f27bf3d6265d.tar.gz
KVIrc-5cc6199846f7e797df52a9dad916f27bf3d6265d.tar.bz2
KVIrc-5cc6199846f7e797df52a9dad916f27bf3d6265d.zip
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
Diffstat (limited to 'src/modules/objects/class_widget.cpp')
-rw-r--r--src/modules/objects/class_widget.cpp14
1 files changed, 6 insertions, 8 deletions
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 <QKeyEvent>
#include <QDesktopWidget>
@@ -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(<string>)[QT4 only]
+ !fn: $setStyleSheet(<string>)
!fn: $array(<red:integer,green:integer,blue:integer) $colorPalette(<color_role:string><color_group:string>)
Returns the color in color_group(disabled, active or inactive), used for color_role.
@@ -512,7 +514,7 @@ const Qt::WindowType widgettypes_cod[] = {
!fn: <short_cut_id:integer> $setKeyShortCut(<key:char>)
Adds a shortcut whith key. A [classfnc]$shortCutEvent[/classfnc] will be triggered when the user will press alt+key.
- !fn: $shortCutEvent(<shortcut_id:integer>)[QT4 only]
+ !fn: $shortCutEvent(<shortcut_id:integer>)
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;
}