From 0a4cd04d6bbc1b97c41892a29eb02665f6d174c8 Mon Sep 17 00:00:00 2001 From: Noldor Date: Fri, 18 Apr 2008 21:04:11 +0000 Subject: more qt4 port (renamed QT3 stuff)) git-svn-id: https://svn.kvirc.de/svn/trunk/kvirc@1507 17fca916-40b9-46aa-a4ea-0a15b648b75c --- src/modules/about/aboutdialog.cpp | 2 +- src/modules/addon/managementdialog.cpp | 2 +- src/modules/avatar/libkviavatar.cpp | 2 +- src/modules/channelsjoin/channelsjoinwindow.cpp | 2 +- src/modules/dcc/dialogs.cpp | 4 +- src/modules/dcc/send.cpp | 2 +- src/modules/dialog/libkvidialog.cpp | 4 +- src/modules/editor/scripteditor.cpp | 2 +- src/modules/mircimport/libkvimircimport.cpp | 2 +- src/modules/objects/class_painter.cpp | 2 +- src/modules/objects/class_popupmenu.cpp | 770 ++++++++++----------- src/modules/objects/class_widget.cpp | 80 ++- src/modules/objects/class_widget.h | 6 +- src/modules/objects/class_window.cpp | 6 +- src/modules/objects/class_window.h | 4 +- src/modules/objects/class_workspace.cpp | 2 +- src/modules/options/container.cpp | 2 +- src/modules/options/dialog.cpp | 2 +- src/modules/options/optw_identity.cpp | 6 +- src/modules/options/optw_nickserv.cpp | 2 +- src/modules/options/optw_servers.cpp | 4 +- src/modules/reguser/dialog.cpp | 2 +- src/modules/reguser/edituser.cpp | 6 +- src/modules/reguser/wizard.cpp | 2 +- src/modules/setup/setupwizard.cpp | 2 +- .../sharedfileswindow/sharedfileswindow.cpp | 2 +- src/modules/theme/managementdialog.cpp | 2 +- src/modules/theme/packthemedialog.cpp | 2 +- src/modules/theme/savethemedialog.cpp | 2 +- src/modules/tip/libkvitip.cpp | 2 +- src/modules/toolbareditor/toolbareditor.cpp | 4 +- src/modules/trayicon/libkvitrayicon.cpp | 2 +- src/modules/url/libkviurl.cpp | 2 +- src/modules/window/libkviwindow.cpp | 14 +- src/modules/window/userwindow.cpp | 2 +- src/modules/window/userwindow.h | 2 +- 36 files changed, 490 insertions(+), 466 deletions(-) (limited to 'src/modules') diff --git a/src/modules/about/aboutdialog.cpp b/src/modules/about/aboutdialog.cpp index b1f0dc92e..3bf758e93 100644 --- a/src/modules/about/aboutdialog.cpp +++ b/src/modules/about/aboutdialog.cpp @@ -72,7 +72,7 @@ extern KviAboutDialog * g_pAboutDialog; KviAboutDialog::KviAboutDialog() : KviTalTabDialog(0) { - setCaption(__tr2qs_ctx("About KVIrc...","about")); + setWindowTitle(__tr2qs_ctx("About KVIrc...","about")); setOkButton(__tr2qs_ctx("Close","about")); // About tab diff --git a/src/modules/addon/managementdialog.cpp b/src/modules/addon/managementdialog.cpp index 3d9905eb1..b7e82a035 100644 --- a/src/modules/addon/managementdialog.cpp +++ b/src/modules/addon/managementdialog.cpp @@ -160,7 +160,7 @@ void KviScriptAddonListView::resizeEvent(QResizeEvent * e) KviScriptManagementDialog::KviScriptManagementDialog(QWidget * p) : QDialog(p,"" /*,WType_TopLevel | WStyle_Customize | WStyle_Title | WStyle_StaysOnTop | WStyle_DialogBorder*/) { - setCaption(__tr2qs("Manage Script-Based Addons")); + setWindowTitle(__tr2qs("Manage Script-Based Addons")); setIcon(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_ADDONS))); setModal(true); diff --git a/src/modules/avatar/libkviavatar.cpp b/src/modules/avatar/libkviavatar.cpp index 335a526f0..e2d89190a 100644 --- a/src/modules/avatar/libkviavatar.cpp +++ b/src/modules/avatar/libkviavatar.cpp @@ -63,7 +63,7 @@ KviAsyncAvatarSelectionDialog::KviAsyncAvatarSelectionDialog(QWidget * par,const m_pConnection = c; - setCaption(__tr2qs("Choose Avatar - KVIrc")); + setWindowTitle(__tr2qs("Choose Avatar - KVIrc")); QGridLayout * g = new QGridLayout(this,3,3,4,8); diff --git a/src/modules/channelsjoin/channelsjoinwindow.cpp b/src/modules/channelsjoin/channelsjoinwindow.cpp index aa3a916f0..4813ac624 100644 --- a/src/modules/channelsjoin/channelsjoinwindow.cpp +++ b/src/modules/channelsjoin/channelsjoinwindow.cpp @@ -58,7 +58,7 @@ KviChannelsJoinWindow::KviChannelsJoinWindow(QWidget * par, const char * name) : QDialog(par,name) { m_pConsole=0; - setCaption(__tr2qs("Join Channels")); + setWindowTitle(__tr2qs("Join Channels")); setIcon(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_CHANNEL))); diff --git a/src/modules/dcc/dialogs.cpp b/src/modules/dcc/dialogs.cpp index d971e65b1..ccc3236c5 100644 --- a/src/modules/dcc/dialogs.cpp +++ b/src/modules/dcc/dialogs.cpp @@ -72,7 +72,7 @@ KviDccAcceptBox::KviDccAcceptBox(KviDccBroker * br,KviDccDescriptor * dcc,const hb->addWidget(btn); setIcon(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_DCCMSG))); - setCaption(capt); + setWindowTitle(capt); l->setActiveWindow(); l->setFocus(); @@ -143,7 +143,7 @@ KviDccRenameBox::KviDccRenameBox(KviDccBroker * br,KviDccDescriptor * dcc,const //btn->setFocus(); setIcon(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_DCCMSG))); - setCaption(__tr2qs_ctx("File Already Exists - KVIrc","dcc")); + setWindowTitle(__tr2qs_ctx("File Already Exists - KVIrc","dcc")); } KviDccRenameBox::~KviDccRenameBox() diff --git a/src/modules/dcc/send.cpp b/src/modules/dcc/send.cpp index 1c883e24a..7b5dbb43f 100644 --- a/src/modules/dcc/send.cpp +++ b/src/modules/dcc/send.cpp @@ -1821,7 +1821,7 @@ KviDccFileTransferBandwidthDialog::KviDccFileTransferBandwidthDialog(QWidget * p int iVal = m_pTransfer->bandwidthLimit(); QString szText = __tr2qs_ctx("Configure bandwidth for DCC transfer %1","dcc").arg(t->id()); - setCaption(szText); + setWindowTitle(szText); szText = t->isFileUpload() ? __tr2qs_ctx("Limit upload bandwidth to","dcc") : __tr2qs_ctx("Limit download bandwidth to","dcc"); diff --git a/src/modules/dialog/libkvidialog.cpp b/src/modules/dialog/libkvidialog.cpp index c7c8d3f10..ef9352a4e 100644 --- a/src/modules/dialog/libkvidialog.cpp +++ b/src/modules/dialog/libkvidialog.cpp @@ -206,7 +206,7 @@ KviKvsCallbackTextInput::KviKvsCallbackTextInput( g_pDialogModuleDialogList->append(this); setIcon(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_KVIRC))); setModal(modal); - setCaption(szCaption); + setWindowTitle(szCaption); QGridLayout * g = new QGridLayout(this,2,3,5,5); @@ -479,7 +479,7 @@ KviKvsCallbackFileDialog::KviKvsCallbackFileDialog( : KviFileDialog(szInitialSelection,szFilter,0,0,modal), KviKvsCallbackObject("dialog.file",pWindow,szCode,pMagicParams,0) { g_pDialogModuleDialogList->append(this); - setCaption(szCaption); + setWindowTitle(szCaption); } KviKvsCallbackFileDialog::~KviKvsCallbackFileDialog() diff --git a/src/modules/editor/scripteditor.cpp b/src/modules/editor/scripteditor.cpp index 107dc1a46..ad976c213 100644 --- a/src/modules/editor/scripteditor.cpp +++ b/src/modules/editor/scripteditor.cpp @@ -161,7 +161,7 @@ KviScriptEditorWidgetColorOptions::KviScriptEditorWidgetColorOptions(QWidget * p { m_pSelectorInterfaceList = new KviPointerList; m_pSelectorInterfaceList->setAutoDelete(false); - setCaption(__tr2qs_ctx("Preferences","editor")); + setWindowTitle(__tr2qs_ctx("Preferences","editor")); QGridLayout * g = new QGridLayout(this,3,3,4,4); KviFontSelector * f = new KviFontSelector(this,__tr2qs_ctx("Font:","editor"),&g_fntNormal,true); diff --git a/src/modules/mircimport/libkvimircimport.cpp b/src/modules/mircimport/libkvimircimport.cpp index 7b72b0b1b..5a49d5e35 100644 --- a/src/modules/mircimport/libkvimircimport.cpp +++ b/src/modules/mircimport/libkvimircimport.cpp @@ -138,7 +138,7 @@ KviRemoteMircServerImportWizard::KviRemoteMircServerImportWizard(KviRemoteMircSe : KviTalWizard(0) { QString capt = __tr2qs("Remote mIRC servers.ini Import Wizard"); - setCaption(capt); + setWindowTitle(capt); m_pRequest = 0; diff --git a/src/modules/objects/class_painter.cpp b/src/modules/objects/class_painter.cpp index bc2e41182..04ea9aa0c 100644 --- a/src/modules/objects/class_painter.cpp +++ b/src/modules/objects/class_painter.cpp @@ -364,7 +364,7 @@ const char * const brushstyles_tbl[] = { }[br] [br] %Hello=$new(hello)[br] - %Hello->$setcaption("Painter effects" );[br] + %Hello->$setWindowTitle("Painter effects" );[br] %Hello->$setFont(28,"times",bold);[br] %Btn=$new(button,%Hello)[br] %Btn->$setmaximumwidth(80)[br] diff --git a/src/modules/objects/class_popupmenu.cpp b/src/modules/objects/class_popupmenu.cpp index e15cbdbac..4745938ec 100644 --- a/src/modules/objects/class_popupmenu.cpp +++ b/src/modules/objects/class_popupmenu.cpp @@ -1,373 +1,373 @@ -//mdm : -// File : class_popupmenu.cpp -// Creation date : Mon Feb 01 21:30:48 CEST 2005 -// by Tonino Imbesi(Grifisx) and Alessandro Carbone(Noldor) -// Lucia Papini (^ashura^) English Translation. -// This file is part of the KVirc irc client distribution -// Copyright (C) 1999-2000 Szymon Stefanek (pragma at kvirc dot net) -// -// This program is FREE software. You can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your opinion) any later version. -// -// This program is distributed in the HOPE that it will be USEFUL, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -// See the GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, write to the Free Software Foundation, -// Inc. ,59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// - - -#include "class_popupmenu.h" -#include "kvi_error.h" -#include "kvi_debug.h" -#include "kvi_locale.h" -#include "kvi_iconmanager.h" -#include "kvi_tal_popupmenu.h" - -#include -#include -#include - - - -/* - @doc: popupmenu - @keyterms: - popupmenu object class, - @title: - popupmenu class - @type: - class - @short: - Provides a popup menu. - @inherits: - [class]object[/class] - [class]widget[/class] - @description: - This widget can be used to display a popup menu.Technically, a popup menu consists of a list of menu items.[br] - You add items with insertItem(). An item is either a string. In addition, items can have an optional icon drawn on the very left side.[br] - @functions: - !fn: $insertItem(,[icon_id:string]) - Inserts menu items into a popup menu with optional icon and return the popup identifier. - !fn: $insertWidget()[br] - Inserts widget items int a popup menu and return the popup identifier.[br] - The widget is treats as a separator; this means that the item is not selectable and you can, for example, simply insert a label if you need a popup menu with a title. - !fn: $insertHandle(,,[icon]) - Inserts a submenu with optional icon into the popup menu. - !fn: $exec([,,]) - If called without paramaters show the popup menu at the current pointer position.[br] - With the optional parameters show the popup menu at the coordinate x,y widget parameter relative. - !fn: $removeItem() - Removes the menu item that has the identifier id. - !fn: $removeItemAt() - Removes the menu item at position index. - !fn: $insertSeparator() - Inserts a separator at position index.[br] - If the index is negative the separator becomes the last menu item. - !fn: $activatedEvent() - This function is called when a menu item and return the the item id.[br] - The default implementation emits the [classfnc]$activated[/classfnc]() signal. - !fn: $highligthtedEvent() - This function is called when a menu item is highlighted and return the item id.[br] - The default implementation emits the [classfnc]$highlighted[/classfnc]() signal. - @signals: - !sg: $activated() - This signal is emitted by the default implementation of [classfnc]$activatedEvent[/classfnc](). - !sg: $highlighted() - This signal is emitted by the default implementation of [classfnc]$highlightedEvent[/classfnc](). - [br] - |-EXAMPLE POPUP MENU-|[br] - |--Start: - # First of all we create an array wich will be used to create random colors.[br] - %Hex[]=$array(0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F)[br] - [br] - class (ws,widget)[br] - {[br] - #In the constructor we create everything that belong to the single widget.[br] - constructor[br] - {[br] - #Geometry of the widget and setting-up of popupmenu [br] - $$->$setGeometry(%X,%Y,100,100)[br] - $$->%lay=$new(layout,$$)[br] - #Here we generate a cicle to create our labels inside the widget.[br] - %i=0[br] - while (%i<10)[br] - {[br] - $$->%label=$new(label,$$)[br] - $$->%label->$settext("Another class by N\&G")[br] - #We set our foreground's coulor using the hex arrey in random way.[br] - %color=%Hex[$rand(14)]%Hex[$rand(14)]%Hex[$rand(14)]%Hex[$rand(14)]%Hex[$rand(14)]%Hex[$rand(14)][br] - $$->%label->$setforegroundcolor(%color)[br] - $$->%label->$setautoresize(1)[br] - #We add the label to the widget's popupmenu.[br] - $$->%lay->$addwidget($$->%label,%i,0)[br] - %i++;[br] - }[br] - #We make the popupmenu relative to this widget: this is merely demonstrative.[br] - #because it creates 25 identical popups.[br] - $$->%Popupmenu=$new(popupmenu,$$)[br] - #we create the label widget wich will be used as popup's title[br] - $$->%Popuptitle=$new(label)[br] - $$->%Popuptitle->$settext("Windows Options")[br] - $$->%Popuptitle->$setAlignment(Center)[br] - #and we add it.[br] - %A=$$->%Popuptitle[br] - $$->%Popupmenu->$insertwidget(%A)[br] - #Here we keep the various IDs in the arrays[br] - %Tile[%I]=$$->%Popupmenu->$insertItem("Tile",118)[br] - %Cascade[%I]=$$->%Popupmenu->$insertItem("Cascade",115)[br] - $$->%Popupmenu->$insertSeparator(3)[br] - %Closeactw[%I]=$$->%Popupmenu->$insertItem("Close Active Window",08)[br] - %Closeallw[%I]=$$->%Popupmenu->$insertItem("Close All Window",58)[br] - $$->$show()[br] - privateimpl($$->%Popupmenu,activatedEvent)[br] - {[br] - %id=$0[br] - %i = 0[br] - #with this cicle we control wich of the items has been called comparing the id given back by the event with our arrays created before;[br] - while (%i<20)[br] - {[br] - if (%id == %Tile[%i]) return %Workspace->$tile()[br] - if (%id == %Cascade[%i]) return %Workspace->$cascade()[br] - if (%id == %Closeactw[%i]) return %Workspace->$closeactivewindow()[br] - if (%id == %Closeallw[%i]) return %Workspace->$closeallwindows()[br] - %i ++[br] - }[br] - }[br] - }[br] - #we activate the popup pushing the right mouse button on the widget[br] - mousepressevent[br] - {[br] - if ($0 == 1) $$->%Popupmenu->$exec()[br] - }[br] - }[br] - %Workspace=$new(workspace)[br] - %Workspace->$resize(640,480)[br] - %I=0[br] - %Cicle=1[br] - while (%I<20)[br] - {[br] - %X=$rand(500)[br] - %Y=$rand(480)[br] - %Widget=$new(ws,%Workspace)[br] - %I++[br] - }[br] - #Let's show! - %Workspace->$show[br] - |--End.[br][br] -*/ - -KVSO_BEGIN_REGISTERCLASS(KviKvsObject_popupmenu,"popupmenu","widget") - KVSO_REGISTER_HANDLER(KviKvsObject_popupmenu,"insertItem", functioninsertItem) - //KVSO_REGISTER_HANDLER(KviKvsObject_popupmenu,"insertWidget", functioninsertWidget) -// KVSO_REGISTER_HANDLER(KviKvsObject_popupmenu,"setTitle", functionsetTitle) - KVSO_REGISTER_HANDLER(KviKvsObject_popupmenu,"exec", functionexec) - KVSO_REGISTER_HANDLER(KviKvsObject_popupmenu,"insertSeparator", functioninsertSeparator) - KVSO_REGISTER_HANDLER(KviKvsObject_popupmenu,"removeItem", functionremoveItem) - - // events - KVSO_REGISTER_HANDLER(KviKvsObject_popupmenu,"highlightedEvent", functionhighlightedEvent) - KVSO_REGISTER_HANDLER(KviKvsObject_popupmenu,"activatedEvent", functionactivatedEvent) - -KVSO_END_REGISTERCLASS(KviKvsObject_popupmenu) - -KVSO_BEGIN_CONSTRUCTOR(KviKvsObject_popupmenu,KviKvsObject_widget) - -KVSO_END_CONSTRUCTOR(KviKvsObject_popupmenu) - - -KVSO_BEGIN_DESTRUCTOR(KviKvsObject_popupmenu) - -KVSO_END_CONSTRUCTOR(KviKvsObject_popupmenu) - -bool KviKvsObject_popupmenu::init(KviKvsRunTimeContext * pContext,KviKvsVariantList *pParams) -{ - identifier=0; - SET_OBJECT(QMenu) - connect(widget(),SIGNAL(triggered(QAction *)),this,SLOT(slottriggered(QAction *))); - connect(widget(),SIGNAL(highlighted(int)),this,SLOT(slothighlighted(int))); - return true; -} - -bool KviKvsObject_popupmenu::functioninsertItem(KviKvsObjectFunctionCall *c) -{ - QString szItem,szIcon; - KVSO_PARAMETERS_BEGIN(c) - KVSO_PARAMETER("text",KVS_PT_STRING,0,szItem) - KVSO_PARAMETER("icon_id",KVS_PT_STRING,KVS_PF_OPTIONAL,szIcon) - KVSO_PARAMETERS_END(c) - if(!widget())return true; - QPixmap *pix = 0; - int id=0; - QAction * action; - if(!szIcon.isEmpty()) - { - pix = g_pIconManager->getImage(szIcon); - if (pix) action=((QMenu *)widget())->addAction(*pix,szItem); - else c->warning(__tr2qs("pix '%Q' doesn't exists"),&szIcon); - - } - else - action=((QMenu *)widget())->addAction(szItem); - actionsDict[identifier]=action; - c->returnValue()->setInteger(identifier); - identifier++; - return true; -} -/* -bool KviKvsObject_popupmenu::functionsetTitle(KviKvsObjectFunctionCall *c) -{ - QString szTitle; - KVSO_PARAMETERS_BEGIN(c) - KVSO_PARAMETER("title",KVS_PT_STRING,0,szTitle) - KVSO_PARAMETERS_END(c) - if(!widget())return true; - ((QMenu *)widget())->setTitle(szTitle); - - return true; -} -/* -bool KviKvsObject_popupmenu::functioninsertWidget(KviKvsObjectFunctionCall *c) -{ - KviKvsObject *pObject; - kvs_hobject_t hObject; - KVSO_PARAMETERS_BEGIN(c) - KVSO_PARAMETER("widget",KVS_PT_HOBJECT,0,hObject) - KVSO_PARAMETERS_END(c) - pObject=KviKvsKernel::instance()->objectController()->lookupObject(hObject); - if (!pObject) - { - c->warning(__tr2qs("Widget parameter is not an object")); - return true; - } - if (!pObject->object()) - { - c->warning(__tr2qs("Widget parameter is not a valid object")); - return true; - } - if(!pObject->object()->isWidgetType()) - { - c->warning(__tr2qs("Can't add a non-widget object")); - return TRUE; - } - if (widget()) ((KviTalPopupMenu *)widget())->insertItem(((KviTalPopupMenu *)(pObject->object()))); - return true; -} - - -bool KviKvsObject_popupmenu::functioninsertHandle(KviKvsObjectFunctionCall *c) -{ - KviKvsObject *ob; - QString szLabel,szIcon; - kvs_hobject_t hObject; - KVSO_PARAMETERS_BEGIN(c) - KVSO_PARAMETER("text_label",KVS_PT_STRING,0,szLabel) - KVSO_PARAMETER("widget",KVS_PT_HOBJECT,0,hObject) - KVSO_PARAMETER("icon_id",KVS_PT_STRING,KVS_PF_OPTIONAL,szIcon) - KVSO_PARAMETERS_END(c) - ob=KviKvsKernel::instance()->objectController()->lookupObject(hObject); - if(!ob->object()->inherits("KviKvsObject_popupmenu")) - { - c->warning(__tr2qs("Can't add a non - popupmenu object")); - return TRUE; - } - if(!widget())return true; - QPixmap *pix = 0; - int id=0; - if(!szIcon.isEmpty()) - { - pix = g_pIconManager->getImage(szIcon); - if (pix) id=((KviTalPopupMenu *)widget())->insertItem(*pix,szLabel,((KviTalPopupMenu *)(ob->object()))); - else c->warning(__tr2qs("pix '%Q' doesn't exists"),&szIcon); - - } - else - id=((KviTalPopupMenu *)widget())->insertItem(szLabel,((KviTalPopupMenu *)(ob->object()))); - c->returnValue()->setInteger(id); - return true; -} -*/ -bool KviKvsObject_popupmenu::functionexec(KviKvsObjectFunctionCall *c) -{ - if(!c->params()->count()) - { - ((QMenu *)widget())->exec(QCursor::pos()); - return true; - } - - KviKvsObject *pObject; - kvs_uint_t iX,iY; - QString szLabel,szIcon; - kvs_hobject_t hObject; - KVSO_PARAMETERS_BEGIN(c) - KVSO_PARAMETER("widget",KVS_PT_HOBJECT,0,hObject) - KVSO_PARAMETER("x",KVS_PT_UNSIGNEDINTEGER,0,iX) - KVSO_PARAMETER("y",KVS_PT_UNSIGNEDINTEGER,0,iY) - KVSO_PARAMETERS_END(c) - pObject=KviKvsKernel::instance()->objectController()->lookupObject(hObject); - if (!pObject) - { - c->warning(__tr2qs("Widget parameter is not an object")); - return true; - } - if (!pObject->object()) - { - c->warning(__tr2qs("Widget parameter is not a valid object")); - return true; - } - if(!pObject->object()->isWidgetType()) - { - c->warning(__tr2qs("Doesn't a widget object")); - return true; - } - - ((QMenu *)widget())->exec(((QWidget *)(pObject->object()))->mapToGlobal(QPoint(iX,iY)) ); - - return true; -} -bool KviKvsObject_popupmenu::functionremoveItem(KviKvsObjectFunctionCall *c) -{ - kvs_uint_t uItem; - KVSO_PARAMETERS_BEGIN(c) - KVSO_PARAMETER("item_id",KVS_PT_UNSIGNEDINTEGER,0,uItem) - KVSO_PARAMETERS_END(c) - QAction * action=actionsDict.value(uItem); - if(widget() && action){ - ((QMenu *)widget())->removeAction(action); - identifier--; - } - return true; -} - - -bool KviKvsObject_popupmenu::functioninsertSeparator(KviKvsObjectFunctionCall *c) -{ - kvs_uint_t iIndex; - KVSO_PARAMETERS_BEGIN(c) - KVSO_PARAMETER("index",KVS_PT_UNSIGNEDINTEGER,0,iIndex) - KVSO_PARAMETERS_END(c) - QAction * action=actionsDict.value(iIndex); - if(widget()&& action)((QMenu *)widget())->insertSeparator(action); - return true; -} - -void KviKvsObject_popupmenu::slothighlighted(int i) -{ - KviKvsVariantList params(new KviKvsVariant((kvs_int_t)i)); - callFunction(this,"highlightedEvent",¶ms); -} -bool KviKvsObject_popupmenu::functionhighlightedEvent(KviKvsObjectFunctionCall *c) -{ - emitSignal("highlighted",c,c->params()); - return true; -} -void KviKvsObject_popupmenu::slottriggered(QAction *a) -{ +//mdm : +// File : class_popupmenu.cpp +// Creation date : Mon Feb 01 21:30:48 CEST 2005 +// by Tonino Imbesi(Grifisx) and Alessandro Carbone(Noldor) +// Lucia Papini (^ashura^) English Translation. +// This file is part of the KVirc irc client distribution +// Copyright (C) 1999-2000 Szymon Stefanek (pragma at kvirc dot net) +// +// This program is FREE software. You can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your opinion) any later version. +// +// This program is distributed in the HOPE that it will be USEFUL, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +// See the GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, write to the Free Software Foundation, +// Inc. ,59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// + + +#include "class_popupmenu.h" +#include "kvi_error.h" +#include "kvi_debug.h" +#include "kvi_locale.h" +#include "kvi_iconmanager.h" +#include "kvi_tal_popupmenu.h" + +#include +#include +#include + + + +/* + @doc: popupmenu + @keyterms: + popupmenu object class, + @title: + popupmenu class + @type: + class + @short: + Provides a popup menu. + @inherits: + [class]object[/class] + [class]widget[/class] + @description: + This widget can be used to display a popup menu.Technically, a popup menu consists of a list of menu items.[br] + You add items with insertItem(). An item is either a string. In addition, items can have an optional icon drawn on the very left side.[br] + @functions: + !fn: $insertItem(,[icon_id:string]) + Inserts menu items into a popup menu with optional icon and return the popup identifier. + !fn: $insertWidget()[br] + Inserts widget items int a popup menu and return the popup identifier.[br] + The widget is treats as a separator; this means that the item is not selectable and you can, for example, simply insert a label if you need a popup menu with a title. + !fn: $insertHandle(,,[icon]) + Inserts a submenu with optional icon into the popup menu. + !fn: $exec([,,]) + If called without paramaters show the popup menu at the current pointer position.[br] + With the optional parameters show the popup menu at the coordinate x,y widget parameter relative. + !fn: $removeItem() + Removes the menu item that has the identifier id. + !fn: $removeItemAt() + Removes the menu item at position index. + !fn: $insertSeparator() + Inserts a separator at position index.[br] + If the index is negative the separator becomes the last menu item. + !fn: $activatedEvent() + This function is called when a menu item and return the the item id.[br] + The default implementation emits the [classfnc]$activated[/classfnc]() signal. + !fn: $highligthtedEvent() + This function is called when a menu item is highlighted and return the item id.[br] + The default implementation emits the [classfnc]$highlighted[/classfnc]() signal. + @signals: + !sg: $activated() + This signal is emitted by the default implementation of [classfnc]$activatedEvent[/classfnc](). + !sg: $highlighted() + This signal is emitted by the default implementation of [classfnc]$highlightedEvent[/classfnc](). + [br] + |-EXAMPLE POPUP MENU-|[br] + |--Start: + # First of all we create an array wich will be used to create random colors.[br] + %Hex[]=$array(0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F)[br] + [br] + class (ws,widget)[br] + {[br] + #In the constructor we create everything that belong to the single widget.[br] + constructor[br] + {[br] + #Geometry of the widget and setting-up of popupmenu [br] + $$->$setGeometry(%X,%Y,100,100)[br] + $$->%lay=$new(layout,$$)[br] + #Here we generate a cicle to create our labels inside the widget.[br] + %i=0[br] + while (%i<10)[br] + {[br] + $$->%label=$new(label,$$)[br] + $$->%label->$settext("Another class by N\&G")[br] + #We set our foreground's coulor using the hex arrey in random way.[br] + %color=%Hex[$rand(14)]%Hex[$rand(14)]%Hex[$rand(14)]%Hex[$rand(14)]%Hex[$rand(14)]%Hex[$rand(14)][br] + $$->%label->$setforegroundcolor(%color)[br] + $$->%label->$setautoresize(1)[br] + #We add the label to the widget's popupmenu.[br] + $$->%lay->$addwidget($$->%label,%i,0)[br] + %i++;[br] + }[br] + #We make the popupmenu relative to this widget: this is merely demonstrative.[br] + #because it creates 25 identical popups.[br] + $$->%Popupmenu=$new(popupmenu,$$)[br] + #we create the label widget wich will be used as popup's title[br] + $$->%Popuptitle=$new(label)[br] + $$->%Popuptitle->$settext("Windows Options")[br] + $$->%Popuptitle->$setAlignment(Center)[br] + #and we add it.[br] + %A=$$->%Popuptitle[br] + $$->%Popupmenu->$insertwidget(%A)[br] + #Here we keep the various IDs in the arrays[br] + %Tile[%I]=$$->%Popupmenu->$insertItem("Tile",118)[br] + %Cascade[%I]=$$->%Popupmenu->$insertItem("Cascade",115)[br] + $$->%Popupmenu->$insertSeparator(3)[br] + %Closeactw[%I]=$$->%Popupmenu->$insertItem("Close Active Window",08)[br] + %Closeallw[%I]=$$->%Popupmenu->$insertItem("Close All Window",58)[br] + $$->$show()[br] + privateimpl($$->%Popupmenu,activatedEvent)[br] + {[br] + %id=$0[br] + %i = 0[br] + #with this cicle we control wich of the items has been called comparing the id given back by the event with our arrays created before;[br] + while (%i<20)[br] + {[br] + if (%id == %Tile[%i]) return %Workspace->$tile()[br] + if (%id == %Cascade[%i]) return %Workspace->$cascade()[br] + if (%id == %Closeactw[%i]) return %Workspace->$closeactivewindow()[br] + if (%id == %Closeallw[%i]) return %Workspace->$closeallwindows()[br] + %i ++[br] + }[br] + }[br] + }[br] + #we activate the popup pushing the right mouse button on the widget[br] + mousepressevent[br] + {[br] + if ($0 == 1) $$->%Popupmenu->$exec()[br] + }[br] + }[br] + %Workspace=$new(workspace)[br] + %Workspace->$resize(640,480)[br] + %I=0[br] + %Cicle=1[br] + while (%I<20)[br] + {[br] + %X=$rand(500)[br] + %Y=$rand(480)[br] + %Widget=$new(ws,%Workspace)[br] + %I++[br] + }[br] + #Let's show! + %Workspace->$show[br] + |--End.[br][br] +*/ + +KVSO_BEGIN_REGISTERCLASS(KviKvsObject_popupmenu,"popupmenu","widget") + KVSO_REGISTER_HANDLER(KviKvsObject_popupmenu,"insertItem", functioninsertItem) + //KVSO_REGISTER_HANDLER(KviKvsObject_popupmenu,"insertWidget", functioninsertWidget) +// KVSO_REGISTER_HANDLER(KviKvsObject_popupmenu,"setTitle", functionsetTitle) + KVSO_REGISTER_HANDLER(KviKvsObject_popupmenu,"exec", functionexec) + KVSO_REGISTER_HANDLER(KviKvsObject_popupmenu,"insertSeparator", functioninsertSeparator) + KVSO_REGISTER_HANDLER(KviKvsObject_popupmenu,"removeItem", functionremoveItem) + + // events + KVSO_REGISTER_HANDLER(KviKvsObject_popupmenu,"highlightedEvent", functionhighlightedEvent) + KVSO_REGISTER_HANDLER(KviKvsObject_popupmenu,"activatedEvent", functionactivatedEvent) + +KVSO_END_REGISTERCLASS(KviKvsObject_popupmenu) + +KVSO_BEGIN_CONSTRUCTOR(KviKvsObject_popupmenu,KviKvsObject_widget) + +KVSO_END_CONSTRUCTOR(KviKvsObject_popupmenu) + + +KVSO_BEGIN_DESTRUCTOR(KviKvsObject_popupmenu) + +KVSO_END_CONSTRUCTOR(KviKvsObject_popupmenu) + +bool KviKvsObject_popupmenu::init(KviKvsRunTimeContext * pContext,KviKvsVariantList *pParams) +{ + identifier=0; + SET_OBJECT(QMenu) + connect(widget(),SIGNAL(triggered(QAction *)),this,SLOT(slottriggered(QAction *))); + connect(widget(),SIGNAL(highlighted(int)),this,SLOT(slothighlighted(int))); + return true; +} + +bool KviKvsObject_popupmenu::functioninsertItem(KviKvsObjectFunctionCall *c) +{ + QString szItem,szIcon; + KVSO_PARAMETERS_BEGIN(c) + KVSO_PARAMETER("text",KVS_PT_STRING,0,szItem) + KVSO_PARAMETER("icon_id",KVS_PT_STRING,KVS_PF_OPTIONAL,szIcon) + KVSO_PARAMETERS_END(c) + if(!widget())return true; + QPixmap *pix = 0; + int id=0; + QAction * action; + if(!szIcon.isEmpty()) + { + pix = g_pIconManager->getImage(szIcon); + if (pix) action=((QMenu *)widget())->addAction(*pix,szItem); + else c->warning(__tr2qs("pix '%Q' doesn't exists"),&szIcon); + + } + else + action=((QMenu *)widget())->addAction(szItem); + actionsDict[identifier]=action; + c->returnValue()->setInteger(identifier); + identifier++; + return true; +} +/* +bool KviKvsObject_popupmenu::functionsetTitle(KviKvsObjectFunctionCall *c) +{ + QString szTitle; + KVSO_PARAMETERS_BEGIN(c) + KVSO_PARAMETER("title",KVS_PT_STRING,0,szTitle) + KVSO_PARAMETERS_END(c) + if(!widget())return true; + ((QMenu *)widget())->setTitle(szTitle); + + return true; +} +/* +bool KviKvsObject_popupmenu::functioninsertWidget(KviKvsObjectFunctionCall *c) +{ + KviKvsObject *pObject; + kvs_hobject_t hObject; + KVSO_PARAMETERS_BEGIN(c) + KVSO_PARAMETER("widget",KVS_PT_HOBJECT,0,hObject) + KVSO_PARAMETERS_END(c) + pObject=KviKvsKernel::instance()->objectController()->lookupObject(hObject); + if (!pObject) + { + c->warning(__tr2qs("Widget parameter is not an object")); + return true; + } + if (!pObject->object()) + { + c->warning(__tr2qs("Widget parameter is not a valid object")); + return true; + } + if(!pObject->object()->isWidgetType()) + { + c->warning(__tr2qs("Can't add a non-widget object")); + return TRUE; + } + if (widget()) ((KviTalPopupMenu *)widget())->insertItem(((KviTalPopupMenu *)(pObject->object()))); + return true; +} + + +bool KviKvsObject_popupmenu::functioninsertHandle(KviKvsObjectFunctionCall *c) +{ + KviKvsObject *ob; + QString szLabel,szIcon; + kvs_hobject_t hObject; + KVSO_PARAMETERS_BEGIN(c) + KVSO_PARAMETER("text_label",KVS_PT_STRING,0,szLabel) + KVSO_PARAMETER("widget",KVS_PT_HOBJECT,0,hObject) + KVSO_PARAMETER("icon_id",KVS_PT_STRING,KVS_PF_OPTIONAL,szIcon) + KVSO_PARAMETERS_END(c) + ob=KviKvsKernel::instance()->objectController()->lookupObject(hObject); + if(!ob->object()->inherits("KviKvsObject_popupmenu")) + { + c->warning(__tr2qs("Can't add a non - popupmenu object")); + return TRUE; + } + if(!widget())return true; + QPixmap *pix = 0; + int id=0; + if(!szIcon.isEmpty()) + { + pix = g_pIconManager->getImage(szIcon); + if (pix) id=((KviTalPopupMenu *)widget())->insertItem(*pix,szLabel,((KviTalPopupMenu *)(ob->object()))); + else c->warning(__tr2qs("pix '%Q' doesn't exists"),&szIcon); + + } + else + id=((KviTalPopupMenu *)widget())->insertItem(szLabel,((KviTalPopupMenu *)(ob->object()))); + c->returnValue()->setInteger(id); + return true; +} +*/ +bool KviKvsObject_popupmenu::functionexec(KviKvsObjectFunctionCall *c) +{ + if(!c->params()->count()) + { + ((QMenu *)widget())->exec(QCursor::pos()); + return true; + } + + KviKvsObject *pObject; + kvs_uint_t iX,iY; + QString szLabel,szIcon; + kvs_hobject_t hObject; + KVSO_PARAMETERS_BEGIN(c) + KVSO_PARAMETER("widget",KVS_PT_HOBJECT,0,hObject) + KVSO_PARAMETER("x",KVS_PT_UNSIGNEDINTEGER,0,iX) + KVSO_PARAMETER("y",KVS_PT_UNSIGNEDINTEGER,0,iY) + KVSO_PARAMETERS_END(c) + pObject=KviKvsKernel::instance()->objectController()->lookupObject(hObject); + if (!pObject) + { + c->warning(__tr2qs("Widget parameter is not an object")); + return true; + } + if (!pObject->object()) + { + c->warning(__tr2qs("Widget parameter is not a valid object")); + return true; + } + if(!pObject->object()->isWidgetType()) + { + c->warning(__tr2qs("Doesn't a widget object")); + return true; + } + + ((QMenu *)widget())->exec(((QWidget *)(pObject->object()))->mapToGlobal(QPoint(iX,iY)) ); + + return true; +} +bool KviKvsObject_popupmenu::functionremoveItem(KviKvsObjectFunctionCall *c) +{ + kvs_uint_t uItem; + KVSO_PARAMETERS_BEGIN(c) + KVSO_PARAMETER("item_id",KVS_PT_UNSIGNEDINTEGER,0,uItem) + KVSO_PARAMETERS_END(c) + QAction * action=actionsDict.value(uItem); + if(widget() && action){ + ((QMenu *)widget())->removeAction(action); + identifier--; + } + return true; +} + + +bool KviKvsObject_popupmenu::functioninsertSeparator(KviKvsObjectFunctionCall *c) +{ + kvs_uint_t iIndex; + KVSO_PARAMETERS_BEGIN(c) + KVSO_PARAMETER("index",KVS_PT_UNSIGNEDINTEGER,0,iIndex) + KVSO_PARAMETERS_END(c) + QAction * action=actionsDict.value(iIndex); + if(widget()&& action)((QMenu *)widget())->insertSeparator(action); + return true; +} + +void KviKvsObject_popupmenu::slothighlighted(int i) +{ + KviKvsVariantList params(new KviKvsVariant((kvs_int_t)i)); + callFunction(this,"highlightedEvent",¶ms); +} +bool KviKvsObject_popupmenu::functionhighlightedEvent(KviKvsObjectFunctionCall *c) +{ + emitSignal("highlighted",c,c->params()); + return true; +} +void KviKvsObject_popupmenu::slottriggered(QAction *a) +{ QHashIterator i(actionsDict); kvs_int_t count=0; bool found=false; @@ -376,18 +376,18 @@ void KviKvsObject_popupmenu::slottriggered(QAction *a) i.next(); if (i.value()!= a) count++; else break; - } - KviKvsVariantList params(new KviKvsVariant(count)); - callFunction(this,"activatedEvent",¶ms); -} -bool KviKvsObject_popupmenu::functionactivatedEvent(KviKvsObjectFunctionCall *c) -{ - emitSignal("activated",c,c->params()); - return true; -} - - -#ifndef COMPILE_USE_STANDALONE_MOC_SOURCES -#include "m_class_popupmenu.moc" -#endif //!COMPILE_USE_STANDALONE_MOC_SOURCES - + } + KviKvsVariantList params(new KviKvsVariant(count)); + callFunction(this,"activatedEvent",¶ms); +} +bool KviKvsObject_popupmenu::functionactivatedEvent(KviKvsObjectFunctionCall *c) +{ + emitSignal("activated",c,c->params()); + return true; +} + + +#ifndef COMPILE_USE_STANDALONE_MOC_SOURCES +#include "m_class_popupmenu.moc" +#endif //!COMPILE_USE_STANDALONE_MOC_SOURCES + diff --git a/src/modules/objects/class_widget.cpp b/src/modules/objects/class_widget.cpp index 2c7c7b3b9..eb3b9cda0 100644 --- a/src/modules/objects/class_widget.cpp +++ b/src/modules/objects/class_widget.cpp @@ -231,13 +231,13 @@ const Qt::WindowType widgettypes_cod[] = { !fn: $setEnabled() Sets the widget state to enabled or disabled if is 1 or 0 respectively. A disabled widget does not receive keyboard nor mouse input. - !fn: $setCaption() - Sets the caption of this widget to . + !fn: $setWindowTitle() + Sets the title of this widget to . This is meaningful for toplevel widgets only. !fn: $setToolTip() Set the tooltip of this widget; the text can contain HTML formatting. - !fn: $window.caption() - Returns the caption text of this widget. + !fn: $windowTitle() + Returns the title text of this widget. !fn: $isTopLevel() Returns '1' if this widget is a toplevel (parentless) one, '0' otherwise. @@ -379,7 +379,7 @@ const Qt::WindowType widgettypes_cod[] = { If you call "[cmd]return[/cmd] $true" you will stop the internal processing of this event. The default implementation does nothing. - !fn: $setIcon() + !fn: $setWindowIcon() Sets the icon for this widget. This is meaningful only for toplevel widgets. See the [doc:image_id]image identifier[/doc] documentation for the explaination of the parameter. @@ -515,7 +515,7 @@ const Qt::WindowType widgettypes_cod[] = { %Widget = $new(widget) # This is the main container for other elements. - %Widget->$setCaption("This is the widget title") + %Widget->$setWindowTitle("This is the widget title") %Widget->$setGeometry(100,200,170,290) # 100 and 200 are distance (pixel) from the left and the top of father widget (in this case the KVIrc window) @@ -620,13 +620,15 @@ KVSO_BEGIN_REGISTERCLASS(KviKvsObject_widget,"widget","object") KVSO_REGISTER_HANDLER(KviKvsObject_widget,"setEnabled",function_setEnabled) KVSO_REGISTER_HANDLER(KviKvsObject_widget,"isEnabled",function_isEnabled) KVSO_REGISTER_HANDLER(KviKvsObject_widget,"setMouseTracking",function_setMouseTracking) - KVSO_REGISTER_HANDLER(KviKvsObject_widget,"setCaption",function_setCaption) - KVSO_REGISTER_HANDLER(KviKvsObject_widget,"caption",function_caption) + KVSO_REGISTER_HANDLER(KviKvsObject_widget,"setCaption",function_setWindowTitle) + KVSO_REGISTER_HANDLER(KviKvsObject_widget,"setWindowTitle",function_setWindowTitle) + KVSO_REGISTER_HANDLER(KviKvsObject_widget,"windowTitle",function_windowTitle) + KVSO_REGISTER_HANDLER(KviKvsObject_widget,"caption",function_windowTitle) KVSO_REGISTER_HANDLER(KviKvsObject_widget,"hasFocus",function_hasFocus) KVSO_REGISTER_HANDLER(KviKvsObject_widget,"setFocus",function_setFocus) KVSO_REGISTER_HANDLER(KviKvsObject_widget,"setToolTip",function_setToolTip) KVSO_REGISTER_HANDLER(KviKvsObject_widget,"setWFlags",function_setWFlags) - KVSO_REGISTER_HANDLER(KviKvsObject_widget,"setIcon",function_setIcon) + KVSO_REGISTER_HANDLER(KviKvsObject_widget,"setIcon",function_setWindowIcon) // fonts KVSO_REGISTER_HANDLER(KviKvsObject_widget,"fontDescent",function_fontDescent) KVSO_REGISTER_HANDLER(KviKvsObject_widget,"fontAscent",function_fontAscent) @@ -1028,7 +1030,6 @@ bool KviKvsObject_widget::function_fontMetricsWidth(KviKvsObjectFunctionCall * c KVSO_PARAMETER("string",KVS_PT_STRING,0,m_szStr) KVSO_PARAMETERS_END(c) if(!widget()) return true; -// int fm = widget()->fontMetrics().width(m_szStr); c->returnValue()->setInteger(widget()->fontMetrics().width(m_szStr)); return true; } @@ -1209,7 +1210,9 @@ bool KviKvsObject_widget::function_setPaletteForeground(KviKvsObjectFunctionCall return false; } - } else { + } + else + { if (c->params()->count()==1) { bool bOk,bOk1,bOk2; @@ -1232,8 +1235,13 @@ bool KviKvsObject_widget::function_setPaletteForeground(KviKvsObjectFunctionCall c->warning(__tr2qs("Not an hex digits")); return true; } - if (widget()) widget()->setPaletteForegroundColor(QColor(iColR,iColG,iColB)); - return true; + if (widget()) + { + QPalette p = widget()->palette(); + p.setColor(widget()->foregroundRole(), QColor(iColR,iColG,iColB)); + widget()->setPalette(p); + return true; + } } if(c->params()->count() < 3) @@ -1248,7 +1256,13 @@ bool KviKvsObject_widget::function_setPaletteForeground(KviKvsObjectFunctionCall return false; } } - if (widget()) widget()->setPaletteForegroundColor(QColor(iColR,iColG,iColB)); + + if (widget()) + { + QPalette p = widget()->palette(); + p.setColor(widget()->foregroundRole(), QColor(iColR,iColG,iColB)); + widget()->setPalette(p); + } return true; } @@ -1309,7 +1323,12 @@ bool KviKvsObject_widget::function_setBackgroundColor(KviKvsObjectFunctionCall * c->warning(__tr2qs("Not an hex digits")); return true; } - if (widget()) widget()->setBackgroundColor(QColor(iColR,iColG,iColB)); + if (widget()) + { + QPalette p = widget()->palette(); + p.setColor(widget()->backgroundRole(), QColor(iColR,iColG,iColB)); + widget()->setPalette(p); + } return true; } @@ -1325,14 +1344,19 @@ bool KviKvsObject_widget::function_setBackgroundColor(KviKvsObjectFunctionCall * return false; } } - if (widget()) widget()->setBackgroundColor(QColor(iColR,iColG,iColB)); + if (widget()) + { + QPalette p = widget()->palette(); + p.setColor(widget()->backgroundRole(), QColor(iColR,iColG,iColB)); + widget()->setPalette(p); + } return true; } bool KviKvsObject_widget::function_backgroundColor(KviKvsObjectFunctionCall *c) { if(!widget())return true; - QColor col = widget()->backgroundColor(); + QColor col = widget()->palette().color(widget()->backgroundRole()); KviKvsArray * a = new KviKvsArray(); a->set(0,new KviKvsVariant((kvs_int_t)col.red())); a->set(1,new KviKvsVariant((kvs_int_t)col.green())); @@ -1344,7 +1368,7 @@ bool KviKvsObject_widget::function_backgroundColor(KviKvsObjectFunctionCall *c) bool KviKvsObject_widget::function_foregroundColor(KviKvsObjectFunctionCall *c) { if(!widget())return true; - QColor col = widget()->foregroundColor(); + QColor col = widget()->palette().color(widget()->foregroundRole()); KviKvsArray * a = new KviKvsArray(); a->set(0,new KviKvsVariant((kvs_int_t)col.red())); a->set(1,new KviKvsVariant((kvs_int_t)col.green())); @@ -1372,19 +1396,19 @@ bool KviKvsObject_widget::function_setMouseTracking(KviKvsObjectFunctionCall *c) return true; } -bool KviKvsObject_widget::function_setCaption(KviKvsObjectFunctionCall *c) +bool KviKvsObject_widget::function_setWindowTitle(KviKvsObjectFunctionCall *c) { - QString szCaption; + QString szWindowTitle; KVSO_PARAMETERS_BEGIN(c) - KVSO_PARAMETER("caption",KVS_PT_STRING,0,szCaption) + KVSO_PARAMETER("title",KVS_PT_STRING,0,szWindowTitle) KVSO_PARAMETERS_END(c) - if(widget()) widget()->setCaption(szCaption); + if(widget()) widget()->setWindowTitle(szWindowTitle); return true; } -bool KviKvsObject_widget::function_caption(KviKvsObjectFunctionCall *c) +bool KviKvsObject_widget::function_windowTitle(KviKvsObjectFunctionCall *c) { - if(widget()) c->returnValue()->setString(widget()->caption().toUtf8().data()); + if(widget()) c->returnValue()->setString(widget()->windowTitle().toUtf8().data()); return true; } @@ -1632,7 +1656,6 @@ bool KviKvsObject_widget::function_setFocusPolicy(KviKvsObjectFunctionCall *c) bool KviKvsObject_widget::function_setWFlags(KviKvsObjectFunctionCall *c) { QStringList wflags; - //Qt::WindowType sum; KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETER("widget_flags",KVS_PT_STRINGLIST,KVS_PF_OPTIONAL,wflags) KVSO_PARAMETERS_END(c) @@ -1719,9 +1742,10 @@ bool KviKvsObject_widget::function_addWidgetToWrappedLayout(KviKvsObjectFunction c->warning(__tr2qs("Can't add a non-widget object")); return true; } - lay->add(((QWidget *)(ob->object()))); + lay->addWidget(((QWidget *)(ob->object()))); return true; } +//FIXME bool KviKvsObject_widget::function_reparent(KviKvsObjectFunctionCall *c) { KviKvsObject *ob; @@ -1745,7 +1769,7 @@ bool KviKvsObject_widget::function_reparent(KviKvsObjectFunctionCall *c) widget()->reparent(((QWidget *)(ob->object())),QPoint(((QWidget *)(ob->object()))->x(),((QWidget *)(ob->object()))->y())); return true; } -bool KviKvsObject_widget::function_setIcon(KviKvsObjectFunctionCall *c) +bool KviKvsObject_widget::function_setWindowIcon(KviKvsObjectFunctionCall *c) { QString icon; @@ -1754,7 +1778,7 @@ bool KviKvsObject_widget::function_setIcon(KviKvsObjectFunctionCall *c) KVSO_PARAMETERS_END(c) if(!widget())return true; QPixmap * pix = g_pIconManager->getImage(icon); - if(pix)widget()->setIcon(*pix); + if(pix)widget()->setWindowIcon(*pix); return true; } diff --git a/src/modules/objects/class_widget.h b/src/modules/objects/class_widget.h index 0863989fe..c3ef7be19 100644 --- a/src/modules/objects/class_widget.h +++ b/src/modules/objects/class_widget.h @@ -52,7 +52,7 @@ protected: bool function_addWidgetToWrappedLayout(KviKvsObjectFunctionCall *c); bool function_backgroundColor(KviKvsObjectFunctionCall *c); - bool function_caption(KviKvsObjectFunctionCall *c); + bool function_windowTitle(KviKvsObjectFunctionCall *c); bool function_centerToScreen(KviKvsObjectFunctionCall *c); bool function_fontAscent(KviKvsObjectFunctionCall * c); bool function_fontDescent(KviKvsObjectFunctionCall * c); @@ -82,12 +82,12 @@ protected: bool function_screenResolution(KviKvsObjectFunctionCall * c); bool function_setBackgroundColor(KviKvsObjectFunctionCall *c); bool function_setBackgroundImage(KviKvsObjectFunctionCall *c); - bool function_setCaption(KviKvsObjectFunctionCall *c); + bool function_setWindowTitle(KviKvsObjectFunctionCall *c); bool function_setEnabled(KviKvsObjectFunctionCall *c); bool function_setFocus(KviKvsObjectFunctionCall *c); bool function_setFocusPolicy(KviKvsObjectFunctionCall *c); bool function_setFont(KviKvsObjectFunctionCall *c); - bool function_setIcon(KviKvsObjectFunctionCall *c); + bool function_setWindowIcon(KviKvsObjectFunctionCall *c); bool function_setMaximumWidth(KviKvsObjectFunctionCall *c); bool function_setMaximumHeight(KviKvsObjectFunctionCall *c); bool function_setMinimumWidth(KviKvsObjectFunctionCall *c); diff --git a/src/modules/objects/class_window.cpp b/src/modules/objects/class_window.cpp index 81222f086..a0cdb4d08 100644 --- a/src/modules/objects/class_window.cpp +++ b/src/modules/objects/class_window.cpp @@ -96,7 +96,7 @@ void KviKvsScriptWindowWindow::centralWidgetDestroyed() KVSO_BEGIN_REGISTERCLASS(KviKvsObject_window,"window","widget") - KVSO_REGISTER_HANDLER(KviKvsObject_window,"setCaption", functionsetCaption) + KVSO_REGISTER_HANDLER(KviKvsObject_window,"setWindowTitle", functionsetWindowTitle) KVSO_REGISTER_HANDLER(KviKvsObject_window,"setCentralWidget", functionsetCentralWidget) // KVSO_REGISTER_HANDLER(KviKvsObject_window,"setIcon", functionsetIcon) KVSO_END_REGISTERCLASS(KviKvsObject_window) @@ -119,14 +119,14 @@ bool KviKvsObject_window::init(KviKvsRunTimeContext * pContext,KviKvsVariantList return true; } -bool KviKvsObject_window::functionsetCaption(KviKvsObjectFunctionCall *c) +bool KviKvsObject_window::functionsetWindowTitle(KviKvsObjectFunctionCall *c) { QString szCaption; KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETER("caption",KVS_PT_STRING,0,szCaption) KVSO_PARAMETERS_END(c) if(widget()) - ((KviKvsScriptWindowWindow *)widget())->setCaptionString(szCaption); + ((KviKvsScriptWindowWindow *)widget())->setWindowTitleString(szCaption); return true; } bool KviKvsObject_window::functionsetCentralWidget(KviKvsObjectFunctionCall *c) diff --git a/src/modules/objects/class_window.h b/src/modules/objects/class_window.h index 1324a5626..ba7d053b1 100644 --- a/src/modules/objects/class_window.h +++ b/src/modules/objects/class_window.h @@ -36,7 +36,7 @@ public: protected: virtual bool init(KviKvsRunTimeContext * pContext,KviKvsVariantList *pParams); - bool functionsetCaption(KviKvsObjectFunctionCall *c); + bool functionsetWindowTitle(KviKvsObjectFunctionCall *c); bool functionsetCentralWidget(KviKvsObjectFunctionCall *c); }; @@ -53,7 +53,7 @@ protected: QWidget * m_pCentralWidget; public: void setCentralWidget(KviKvsObject_widget *o,QWidget * w); - void setCaptionString(const QString &s){ setFixedCaption(s); }; + void setWindowTitleString(const QString &s){ setFixedCaption(s); }; virtual void resizeEvent(QResizeEvent *e); protected slots: void centralWidgetObjectDestroyed(); diff --git a/src/modules/objects/class_workspace.cpp b/src/modules/objects/class_workspace.cpp index 746786e5d..c32b684ce 100644 --- a/src/modules/objects/class_workspace.cpp +++ b/src/modules/objects/class_workspace.cpp @@ -132,7 +132,7 @@ }[br] %Workspace=$new(workspace)[br] %Workspace->$resize(640,480)[br] - %Workspace->$setCaption("Hit the mouse to stop cycling windows....")[br] + %Workspace->$setWindowTitle("Hit the mouse to stop cycling windows....")[br] %I=0[br] %Cicle=1[br] while (%I<20)[br] diff --git a/src/modules/options/container.cpp b/src/modules/options/container.cpp index 1660a9141..ee0a45168 100644 --- a/src/modules/options/container.cpp +++ b/src/modules/options/container.cpp @@ -79,7 +79,7 @@ void KviOptionsWidgetContainer::setup(KviOptionsWidget * w) { //KviStr caption(KviStr::Format,"%s - KVIrc",e->szName); setIcon(*(g_pIconManager->getSmallIcon(e->iIcon))); - setCaption(e->szName); + setWindowTitle(e->szName); } m_pOptionsWidget = w; diff --git a/src/modules/options/dialog.cpp b/src/modules/options/dialog.cpp index 4863946de..48fb0e7e7 100644 --- a/src/modules/options/dialog.cpp +++ b/src/modules/options/dialog.cpp @@ -174,7 +174,7 @@ KviOptionsDialog::KviOptionsDialog(QWidget * par,const QString &szGroup) ).arg(szDialogTitle).arg(szDialog).arg(szInfoTips).arg(szOkCancelButtons); QString szCaption = szDialogTitle + " - KVIrc"; - setCaption(szCaption); + setWindowTitle(szCaption); QGridLayout * g1 = new QGridLayout(this,2,5,8,8); QSplitter * spl = new QSplitter(Qt::Horizontal,this); diff --git a/src/modules/options/optw_identity.cpp b/src/modules/options/optw_identity.cpp index ebed7337e..ba642dbf3 100644 --- a/src/modules/options/optw_identity.cpp +++ b/src/modules/options/optw_identity.cpp @@ -53,7 +53,7 @@ KviNickAlternativesDialog::KviNickAlternativesDialog(QWidget * par,const QString { QGridLayout * g = new QGridLayout(this,5,3,4,12); - setCaption(__tr2qs_ctx("Nickname alternatives","options")); + setWindowTitle(__tr2qs_ctx("Nickname alternatives","options")); QLabel * l = new QLabel(this); l->setText(__tr2qs_ctx("
Here you can choose up to three nicknames " \ @@ -114,7 +114,7 @@ void KviNickAlternativesDialog::fill(QString &n1,QString &n2,QString &n3) KviAvatarDownloadDialog::KviAvatarDownloadDialog(QWidget * par,const QString &szUrl) : QDialog(par) { - setCaption(__tr2qs_ctx("Avatar Download - KVIrc","options")); + setWindowTitle(__tr2qs_ctx("Avatar Download - KVIrc","options")); m_szUrl = szUrl; @@ -197,7 +197,7 @@ void KviAvatarDownloadDialog::downloadTerminated(bool bSuccess) KviAvatarSelectionDialog::KviAvatarSelectionDialog(QWidget * par,const QString &szInitialPath) : QDialog(par) { - setCaption(__tr2qs_ctx("Choose Avatar - KVIrc","options")); + setWindowTitle(__tr2qs_ctx("Choose Avatar - KVIrc","options")); QGridLayout * g = new QGridLayout(this,3,3,4,8); diff --git a/src/modules/options/optw_nickserv.cpp b/src/modules/options/optw_nickserv.cpp index caa881792..84d080800 100644 --- a/src/modules/options/optw_nickserv.cpp +++ b/src/modules/options/optw_nickserv.cpp @@ -46,7 +46,7 @@ extern KVIRC_API KviNickServRuleSet * g_pNickServRuleSet; KviNickServRuleEditor::KviNickServRuleEditor(QWidget * par,bool bUseServerMaskField) : QDialog(par) { - setCaption(__tr2qs_ctx("NickServ Authentication Rule","options")); + setWindowTitle(__tr2qs_ctx("NickServ Authentication Rule","options")); QString html_center_begin = "
"; QString html_center_end = "
"; diff --git a/src/modules/options/optw_servers.cpp b/src/modules/options/optw_servers.cpp index 39b7a7a84..64036bb9b 100644 --- a/src/modules/options/optw_servers.cpp +++ b/src/modules/options/optw_servers.cpp @@ -91,7 +91,7 @@ KviNetworkDetailsWidget::KviNetworkDetailsWidget(QWidget * par,KviIrcNetwork * n QGridLayout * g = new QGridLayout(this,4,4,10,4); - setCaption(__tr2qs_ctx("Network Details","options")); + setWindowTitle(__tr2qs_ctx("Network Details","options")); setIcon(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_WORLD))); QString szTmp = ""; @@ -418,7 +418,7 @@ KviServerDetailsWidget::KviServerDetailsWidget(QWidget * par,KviIrcServer * s) m_szHostname = s->hostName(); QGridLayout * g = new QGridLayout(this,4,4,10,4); - setCaption(__tr2qs_ctx("Server Details","options")); + setWindowTitle(__tr2qs_ctx("Server Details","options")); setIcon(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_SERVER))); m_pHeaderLabel = new QLabel("",this); // the text will be set later diff --git a/src/modules/reguser/dialog.cpp b/src/modules/reguser/dialog.cpp index e2952f727..4c23c5338 100644 --- a/src/modules/reguser/dialog.cpp +++ b/src/modules/reguser/dialog.cpp @@ -163,7 +163,7 @@ KviRegisteredUsersDialog::KviRegisteredUsersDialog(QWidget * par) g_pLocalRegisteredUserDataBase->copyFrom(g_pRegisteredUserDataBase); setIcon(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_REGUSERS))); - setCaption(__tr2qs("Registered Users - KVIrc")); + setWindowTitle(__tr2qs("Registered Users - KVIrc")); QGridLayout * g = new QGridLayout(this,4,3,4,4); diff --git a/src/modules/reguser/edituser.cpp b/src/modules/reguser/edituser.cpp index 71a600ba6..9633b3c26 100644 --- a/src/modules/reguser/edituser.cpp +++ b/src/modules/reguser/edituser.cpp @@ -73,7 +73,7 @@ KviReguserPropertiesDialog::KviReguserPropertiesDialog(QWidget * p,KviPointerHas { m_pPropertyDict = dict; - setCaption(__tr2qs("Property Editor")); + setWindowTitle(__tr2qs("Property Editor")); setIcon(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_LINUX))); QGridLayout * g = new QGridLayout(this,3,3,4,4); @@ -221,7 +221,7 @@ KviReguserMaskDialog::KviReguserMaskDialog(QWidget * p,KviIrcMask * m) { m_pMask = m; - setCaption(__tr2qs("Mask Editor")); + setWindowTitle(__tr2qs("Mask Editor")); QGridLayout * g = new QGridLayout(this,3,2,4,4); @@ -329,7 +329,7 @@ KviRegisteredUserEntryDialog::KviRegisteredUserEntryDialog(QWidget *p,KviRegiste //setMinimumSize(400,450); setIcon(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_LINUX))); - setCaption(__tr2qs("Registered User Entry")); + setWindowTitle(__tr2qs("Registered User Entry")); QWidget * p1 = new QWidget(this); diff --git a/src/modules/reguser/wizard.cpp b/src/modules/reguser/wizard.cpp index 6dae150d5..6d5638926 100644 --- a/src/modules/reguser/wizard.cpp +++ b/src/modules/reguser/wizard.cpp @@ -73,7 +73,7 @@ KviRegistrationWizard::KviRegistrationWizard(const char * startMask,KviRegistere QFrame * f; // resize( 490, 456 ); - setCaption(__tr2qs("User Registration Wizard - KVIrc")); + setWindowTitle(__tr2qs("User Registration Wizard - KVIrc")); setIcon(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_LINUX))); setSizeGripEnabled( TRUE ); diff --git a/src/modules/setup/setupwizard.cpp b/src/modules/setup/setupwizard.cpp index d0c7d26aa..b3d2392a7 100644 --- a/src/modules/setup/setupwizard.cpp +++ b/src/modules/setup/setupwizard.cpp @@ -209,7 +209,7 @@ KviSetupWizard::KviSetupWizard() setHelpEnabled(m_pLicense,false); - setCaption(__tr2qs("KVIrc Setup")); + setWindowTitle(__tr2qs("KVIrc Setup")); #else m_pLicense = 0; #endif diff --git a/src/modules/sharedfileswindow/sharedfileswindow.cpp b/src/modules/sharedfileswindow/sharedfileswindow.cpp index a0d553b41..d9487169f 100644 --- a/src/modules/sharedfileswindow/sharedfileswindow.cpp +++ b/src/modules/sharedfileswindow/sharedfileswindow.cpp @@ -57,7 +57,7 @@ KviSharedFileEditDialog::KviSharedFileEditDialog(QWidget * par,KviSharedFile * f { QGridLayout * g = new QGridLayout(this,1,1,11,6); - setCaption(__tr2qs_ctx("Edit Shared File - KVIrc","sharedfileswindow")); + setWindowTitle(__tr2qs_ctx("Edit Shared File - KVIrc","sharedfileswindow")); QLabel * l = new QLabel(__tr2qs_ctx("Share name:","sharedfileswindow"),this); g->addWidget(l, 0, 0 ); diff --git a/src/modules/theme/managementdialog.cpp b/src/modules/theme/managementdialog.cpp index 43dbe7ee1..a21904018 100644 --- a/src/modules/theme/managementdialog.cpp +++ b/src/modules/theme/managementdialog.cpp @@ -139,7 +139,7 @@ KviThemeManagementDialog * KviThemeManagementDialog::m_pInstance = 0; KviThemeManagementDialog::KviThemeManagementDialog(QWidget * parent) : QDialog(parent,"theme_options_widget") { - setCaption(__tr2qs_ctx("Manage Themes - KVIrc","theme")); + setWindowTitle(__tr2qs_ctx("Manage Themes - KVIrc","theme")); setIcon(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_THEME))); setModal(true); diff --git a/src/modules/theme/packthemedialog.cpp b/src/modules/theme/packthemedialog.cpp index ec34c13a3..b10317032 100644 --- a/src/modules/theme/packthemedialog.cpp +++ b/src/modules/theme/packthemedialog.cpp @@ -112,7 +112,7 @@ KviPackThemeDialog::KviPackThemeDialog(QWidget * pParent,KviPointerListgetSmallIcon(KVI_SMALLICON_IDEA))); - setCaption(__tr2qs("Did you know...")); + setWindowTitle(__tr2qs("Did you know...")); pb->setFocus(); diff --git a/src/modules/toolbareditor/toolbareditor.cpp b/src/modules/toolbareditor/toolbareditor.cpp index 9d8f4bef5..aac7f3bbd 100644 --- a/src/modules/toolbareditor/toolbareditor.cpp +++ b/src/modules/toolbareditor/toolbareditor.cpp @@ -122,7 +122,7 @@ KviCustomToolBarPropertiesDialog::KviCustomToolBarPropertiesDialog(QWidget * p,c m_szOriginalId = szId; m_szLabel = szLabel; - setCaption(__tr2qs("ToolBar Properties")); + setWindowTitle(__tr2qs("ToolBar Properties")); setIcon(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_TOOLBAR))); QGridLayout * g = new QGridLayout(this,5,6,5,3); @@ -277,7 +277,7 @@ void KviCustomToolBarPropertiesDialog::advancedClicked() KviCustomizeToolBarsDialog::KviCustomizeToolBarsDialog(QWidget * p) : QDialog(p,"" /*,WType_TopLevel | WStyle_Customize | WStyle_Title | WStyle_StaysOnTop | WStyle_DialogBorder*/) { - setCaption(__tr2qs("Customize Toolbars")); + setWindowTitle(__tr2qs("Customize Toolbars")); setIcon(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_TOOLBAR))); m_pInstance = this; diff --git a/src/modules/trayicon/libkvitrayicon.cpp b/src/modules/trayicon/libkvitrayicon.cpp index fc3286515..aa3e8edae 100644 --- a/src/modules/trayicon/libkvitrayicon.cpp +++ b/src/modules/trayicon/libkvitrayicon.cpp @@ -87,7 +87,7 @@ KviTrayIcon::KviTrayIcon(KviFrame * frm) QLabel * l = new QLabel(__tr2qs("KVIrc"),m_pContextPopup); l->setFrameStyle(QFrame::Raised | QFrame::StyledPanel); m_pContextPopup->insertItem(l); - m_pContextPopup->setCaption(__tr2qs("Context")); + m_pContextPopup->setWindowTitle(__tr2qs("Context")); m_iAwayMenuId = m_pContextPopup->insertItem ( __tr2qs("Away"), m_pAwayPopup); m_pContextPopup->changeItem(m_iAwayMenuId,*(g_pIconManager->getSmallIcon(KVI_SMALLICON_AWAY)),__tr2qs("Away")); diff --git a/src/modules/url/libkviurl.cpp b/src/modules/url/libkviurl.cpp index 1ff07a6ad..5afc147cb 100644 --- a/src/modules/url/libkviurl.cpp +++ b/src/modules/url/libkviurl.cpp @@ -339,7 +339,7 @@ UrlDialog::~UrlDialog() ConfigDialog::ConfigDialog() :QDialog() { - setCaption(__tr2qs("URL Module Configuration")); + setWindowTitle(__tr2qs("URL Module Configuration")); QGridLayout *g = new QGridLayout(this,4,2,10,10); diff --git a/src/modules/window/libkviwindow.cpp b/src/modules/window/libkviwindow.cpp index 90f46dffe..05d987d34 100644 --- a/src/modules/window/libkviwindow.cpp +++ b/src/modules/window/libkviwindow.cpp @@ -994,7 +994,7 @@ static bool window_kvs_fnc_list(KviKvsModuleFunctionCall * c) [b]m[/b]: Creates a window that is initially minimized.[br] [b]q[/b]: Don't print warning messages during the creation.[br] If is given then the new window will have it as the initial plain text . - You can change the caption later by calling [cmd]window.setCaption[/cmd].[br] + You can change the caption later by calling [cmd]window.setWindowTitle[/cmd].[br] If is given then the new window is bound to the specified irc context and will be destroyed when the attacched console closes. If is omitted or is 0 then the window will be context free (not bound @@ -1060,15 +1060,15 @@ static bool window_kvs_fnc_open(KviKvsModuleFunctionCall * c) } /* - @doc: window.setCaption + @doc: window.setWindowTitle @type: command @title: - window.setCaption + window.setWindowTitle @short: Sets the caption of an user window @syntax: - window.setCaption [-q] [html_inactive_caption] [html_active_caption] + window.setWindowTitle [-q] [html_inactive_caption] [html_active_caption] @switches: !sw: -q | --quiet Be quiet @@ -1089,7 +1089,7 @@ static bool window_kvs_fnc_open(KviKvsModuleFunctionCall * c) @seealso: */ -static bool window_kvs_cmd_setCaption(KviKvsModuleCommandCall * c) +static bool window_kvs_cmd_setWindowTitle(KviKvsModuleCommandCall * c) { QString szWnd; QString szPlain; @@ -1113,7 +1113,7 @@ static bool window_kvs_cmd_setCaption(KviKvsModuleCommandCall * c) if(pWnd->type() == KVI_WINDOW_TYPE_USERWINDOW) { - ((KviUserWindow *)pWnd)->setCaptionStrings(szPlain,szInactive,szActive); + ((KviUserWindow *)pWnd)->setWindowTitleStrings(szPlain,szInactive,szActive); } else { if(!c->hasSwitch('q',"quiet"))c->warning(__tr2qs("The specified window is not of type \"userwnd\"")); } @@ -1491,7 +1491,7 @@ static bool window_module_init(KviModule *m) KVSM_REGISTER_SIMPLE_COMMAND(m,"demandAttention",window_kvs_cmd_demandAttention); KVSM_REGISTER_SIMPLE_COMMAND(m,"listtypes",window_kvs_cmd_listtypes); KVSM_REGISTER_SIMPLE_COMMAND(m,"setBackground",window_kvs_cmd_setBackground); - KVSM_REGISTER_SIMPLE_COMMAND(m,"setCaption",window_kvs_cmd_setCaption); + KVSM_REGISTER_SIMPLE_COMMAND(m,"setWindowTitle",window_kvs_cmd_setWindowTitle); KVSM_REGISTER_SIMPLE_COMMAND(m,"setCryptEngine",window_kvs_cmd_setCryptEngine); KVSM_REGISTER_SIMPLE_COMMAND(m,"setInputText",window_kvs_cmd_setInputText); KVSM_REGISTER_SIMPLE_COMMAND(m,"insertInInputText",window_kvs_cmd_insertInInputText); diff --git a/src/modules/window/userwindow.cpp b/src/modules/window/userwindow.cpp index cc9187a83..7f38dd0f6 100644 --- a/src/modules/window/userwindow.cpp +++ b/src/modules/window/userwindow.cpp @@ -95,7 +95,7 @@ void KviUserWindow::fillCaptionBuffers() // nothing here } -void KviUserWindow::setCaptionStrings(const QString &szPlainText,const QString &szHtmlInactive,const QString &szHtmlActive) +void KviUserWindow::setWindowTitleStrings(const QString &szPlainText,const QString &szHtmlInactive,const QString &szHtmlActive) { m_szPlainTextCaption = szPlainText; m_szHtmlActiveCaption = szHtmlActive; diff --git a/src/modules/window/userwindow.h b/src/modules/window/userwindow.h index ec0d2d12c..42140c6fe 100644 --- a/src/modules/window/userwindow.h +++ b/src/modules/window/userwindow.h @@ -42,7 +42,7 @@ protected: virtual QPixmap * myIconPtr(); virtual void fillCaptionBuffers(); public: - void setCaptionStrings(const QString &szPlainText,const QString &szHtmlInactive,const QString &szHtmlActive); + void setWindowTitleStrings(const QString &szPlainText,const QString &szHtmlInactive,const QString &szHtmlActive); }; #endif //!_USERWINDOW_H_ -- cgit v1.3.1-10-gc9f91