summaryrefslogtreecommitdiffstats
path: root/src/modules/actioneditor/actioneditor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/actioneditor/actioneditor.cpp')
-rw-r--r--src/modules/actioneditor/actioneditor.cpp320
1 files changed, 160 insertions, 160 deletions
diff --git a/src/modules/actioneditor/actioneditor.cpp b/src/modules/actioneditor/actioneditor.cpp
index cfc12932..d4206564 100644
--- a/src/modules/actioneditor/actioneditor.cpp
+++ b/src/modules/actioneditor/actioneditor.cpp
@@ -41,32 +41,32 @@
#include "kvi_kvs_useraction.h"
#include "kvi_customtoolbarmanager.h"
-#include <qsplitter.h>
-#include <qlayout.h>
+#include <tqsplitter.h>
+#include <tqlayout.h>
#include "kvi_tal_vbox.h"
-#include <qtooltip.h>
-#include <qpushbutton.h>
-#include <qdir.h>
-#include <qmessagebox.h>
-#include <qlineedit.h>
-#include <qcombobox.h>
-#include <qtoolbutton.h>
-#include <qcheckbox.h>
-#include <qtooltip.h>
-#include <qpainter.h>
+#include <tqtooltip.h>
+#include <tqpushbutton.h>
+#include <tqdir.h>
+#include <tqmessagebox.h>
+#include <tqlineedit.h>
+#include <tqcombobox.h>
+#include <tqtoolbutton.h>
+#include <tqcheckbox.h>
+#include <tqtooltip.h>
+#include <tqpainter.h>
#ifdef COMPILE_USE_QT4
- #include <q3header.h>
+ #include <tq3header.h>
#else
- #include <qheader.h>
+ #include <tqheader.h>
#endif
-#include <qtabwidget.h>
+#include <tqtabwidget.h>
#include <kvi_tal_groupbox.h>
#include "kvi_valuelist.h"
-#include <qlabel.h>
+#include <tqlabel.h>
extern KviActionEditorWindow * g_pActionEditorWindow;
-static QString g_szLastEditedAction;
+static TQString g_szLastEditedAction;
#define LVI_ICON_SIZE 32
#define LVI_BORDER 4
@@ -91,22 +91,22 @@ KviActionEditorListViewItem::~KviActionEditorListViewItem()
void KviActionEditorListViewItem::setupForActionData()
{
- QString t = "<b>" + m_pActionData->m_szName + "</b>";
+ TQString t = "<b>" + m_pActionData->m_szName + "</b>";
t += "<br><font color=\"#808080\" size=\"-1\">" + m_pActionData->m_szVisibleName + "</font>";
m_szKey = m_pActionData->m_szName.upper();
- m_pText = new QSimpleRichText(t,m_pListView->font());
+ m_pText = new TQSimpleRichText(t,m_pListView->font());
if(m_pIcon)delete m_pIcon;
- QPixmap * p = g_pIconManager->getBigIcon(m_pActionData->m_szBigIcon);
- if(p)m_pIcon = new QPixmap(*p);
+ TQPixmap * p = g_pIconManager->getBigIcon(m_pActionData->m_szBigIcon);
+ if(p)m_pIcon = new TQPixmap(*p);
else {
p = g_pIconManager->getImage("kvi_bigicon_unknown.png");
- if(p)m_pIcon = new QPixmap(*p);
- else m_pIcon = new QPixmap(LVI_ICON_SIZE,LVI_ICON_SIZE);
+ if(p)m_pIcon = new TQPixmap(*p);
+ else m_pIcon = new TQPixmap(LVI_ICON_SIZE,LVI_ICON_SIZE);
}
setup();
}
-QString KviActionEditorListViewItem::key(int,bool) const
+TQString KviActionEditorListViewItem::key(int,bool) const
{
return m_szKey;
}
@@ -123,105 +123,105 @@ void KviActionEditorListViewItem::setup()
setHeight(iHeight);
}
-void KviActionEditorListViewItem::paintCell(QPainter * p,const QColorGroup & cg,int column,int width,int align)
+void KviActionEditorListViewItem::paintCell(TQPainter * p,const TQColorGroup & cg,int column,int width,int align)
{
- p->fillRect(QRect(0,0,width,height()),isSelected() ? cg.highlight() : cg.base());
+ p->fillRect(TQRect(0,0,width,height()),isSelected() ? cg.highlight() : cg.base());
p->drawPixmap(LVI_BORDER,LVI_BORDER,*m_pIcon);
int afterIcon = LVI_BORDER + LVI_ICON_SIZE + LVI_SPACING;
int www = m_pListView->visibleWidth() - (afterIcon + LVI_BORDER);
m_pText->setWidth(www);
- m_pText->draw(p,afterIcon,LVI_BORDER,QRect(afterIcon,LVI_BORDER,www,height() - (LVI_BORDER * 2)),cg);
+ m_pText->draw(p,afterIcon,LVI_BORDER,TQRect(afterIcon,LVI_BORDER,www,height() - (LVI_BORDER * 2)),cg);
}
-KviSingleActionEditor::KviSingleActionEditor(QWidget * par,KviActionEditor * ed)
-: QWidget(par)
+KviSingleActionEditor::KviSingleActionEditor(TQWidget * par,KviActionEditor * ed)
+: TQWidget(par)
{
m_pActionEditor = ed;
m_pActionData = 0;
- QGridLayout * g = new QGridLayout(this,3,2,0,4);
+ TQGridLayout * g = new TQGridLayout(this,3,2,0,4);
- QLabel * l = new QLabel(__tr2qs("Name:"),this);
+ TQLabel * l = new TQLabel(__tr2qs("Name:"),this);
g->addWidget(l,0,0);
- m_pNameEdit = new QLineEdit(this);
+ m_pNameEdit = new TQLineEdit(this);
g->addWidget(m_pNameEdit,0,1);
- QToolTip::add(m_pNameEdit,__tr2qs("Internal unique name for the action"));
+ TQToolTip::add(m_pNameEdit,__tr2qs("Internal unique name for the action"));
- l = new QLabel(__tr2qs("Label:"),this);
+ l = new TQLabel(__tr2qs("Label:"),this);
g->addWidget(l,1,0);
- m_pVisibleNameEdit = new QLineEdit(this);
+ m_pVisibleNameEdit = new TQLineEdit(this);
g->addWidget(m_pVisibleNameEdit,1,1);
- QToolTip::add(m_pVisibleNameEdit,__tr2qs("Visible name for this action.<br>This string will be displayed to the user so it is a good idea to use $tr() here"));
+ TQToolTip::add(m_pVisibleNameEdit,__tr2qs("Visible name for this action.<br>This string will be displayed to the user so it is a good idea to use $tr() here"));
- QTabWidget * tw = new QTabWidget(this);
+ TQTabWidget * tw = new TQTabWidget(this);
g->addMultiCellWidget(tw,2,2,0,1);
// code tab
- QWidget * tab = new QWidget(tw);
- QGridLayout * gl = new QGridLayout(tab,1,1,8,4);
+ TQWidget * tab = new TQWidget(tw);
+ TQGridLayout * gl = new TQGridLayout(tab,1,1,8,4);
m_pScriptEditor = KviScriptEditor::createInstance(tab);
gl->addWidget(m_pScriptEditor,0,0);
- QToolTip::add(m_pScriptEditor,__tr2qs("Action code"));
+ TQToolTip::add(m_pScriptEditor,__tr2qs("Action code"));
tw->addTab(tab,__tr2qs("Code"));
// properties tab
- tab = new QWidget(tw);
- gl = new QGridLayout(tab,7,4,8,4);
+ tab = new TQWidget(tw);
+ gl = new TQGridLayout(tab,7,4,8,4);
- l = new QLabel(__tr2qs("Category:"),tab);
+ l = new TQLabel(__tr2qs("Category:"),tab);
gl->addWidget(l,0,0);
- m_pCategoryCombo = new QComboBox(false,tab);
+ m_pCategoryCombo = new TQComboBox(false,tab);
gl->addMultiCellWidget(m_pCategoryCombo,0,0,1,3);
- QToolTip::add(m_pCategoryCombo,__tr2qs("Choose the category that best fits for this action"));
+ TQToolTip::add(m_pCategoryCombo,__tr2qs("Choose the category that best fits for this action"));
- l = new QLabel(__tr2qs("Description:"),tab);
+ l = new TQLabel(__tr2qs("Description:"),tab);
gl->addWidget(l,1,0);
- m_pDescriptionEdit = new QLineEdit(tab);
+ m_pDescriptionEdit = new TQLineEdit(tab);
gl->addMultiCellWidget(m_pDescriptionEdit,1,1,1,3);
- QToolTip::add(m_pDescriptionEdit,__tr2qs("Visible short description for this action.<br>This string will be displayed to the user so it is a good idea to use $tr() here"));
+ TQToolTip::add(m_pDescriptionEdit,__tr2qs("Visible short description for this action.<br>This string will be displayed to the user so it is a good idea to use $tr() here"));
- l = new QLabel(__tr2qs("Small Icon:"),tab);
+ l = new TQLabel(__tr2qs("Small Icon:"),tab);
gl->addWidget(l,2,0);
- m_pSmallIconEdit = new QLineEdit(tab);
+ m_pSmallIconEdit = new TQLineEdit(tab);
gl->addWidget(m_pSmallIconEdit,2,1);
- m_pSmallIconButton = new QToolButton(tab);
- m_pSmallIconButton->setMinimumSize(QSize(20,20));
- connect(m_pSmallIconButton,SIGNAL(clicked()),this,SLOT(chooseSmallIcon()));
+ m_pSmallIconButton = new TQToolButton(tab);
+ m_pSmallIconButton->setMinimumSize(TQSize(20,20));
+ connect(m_pSmallIconButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(chooseSmallIcon()));
gl->addWidget(m_pSmallIconButton,2,2);
- QString s= __tr2qs("The small icon associated to this action.<br>" \
+ TQString s= __tr2qs("The small icon associated to this action.<br>" \
"It will appear at least in the popup menus when this action is inserted.<br>" \
"It should be 16x16 pixels.");
- QToolTip::add(m_pSmallIconEdit,s);
- QToolTip::add(m_pSmallIconButton,s);
+ TQToolTip::add(m_pSmallIconEdit,s);
+ TQToolTip::add(m_pSmallIconButton,s);
- l = new QLabel(__tr2qs("Big Icon:"),tab);
+ l = new TQLabel(__tr2qs("Big Icon:"),tab);
gl->addWidget(l,3,0);
- m_pBigIconEdit = new QLineEdit(tab);
+ m_pBigIconEdit = new TQLineEdit(tab);
gl->addWidget(m_pBigIconEdit,3,1);
- m_pBigIconButton = new QToolButton(tab);
- m_pBigIconButton->setMinimumSize(QSize(48,48));
+ m_pBigIconButton = new TQToolButton(tab);
+ m_pBigIconButton->setMinimumSize(TQSize(48,48));
m_pBigIconButton->setUsesBigPixmap(true);
- connect(m_pBigIconButton,SIGNAL(clicked()),this,SLOT(chooseBigIcon()));
+ connect(m_pBigIconButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(chooseBigIcon()));
gl->addMultiCellWidget(m_pBigIconButton,3,4,2,3);
s = __tr2qs("The big icon associated to this action.<br>" \
"It will appear at least in the toolbar buttons when this action is inserted.<br>" \
"It should be 32x32 pixels.");
- QToolTip::add(m_pBigIconEdit,s);
- QToolTip::add(m_pBigIconButton,s);
+ TQToolTip::add(m_pBigIconEdit,s);
+ TQToolTip::add(m_pBigIconButton,s);
- l = new QLabel(__tr2qs("Key Sequence:"),tab);
+ l = new TQLabel(__tr2qs("Key Sequence:"),tab);
gl->addMultiCellWidget(l,4,5,0,0);
- m_pKeySequenceEdit = new QLineEdit(tab);
+ m_pKeySequenceEdit = new TQLineEdit(tab);
gl->addMultiCellWidget(m_pKeySequenceEdit,4,5,1,1);
- QToolTip::add(m_pKeySequenceEdit,__tr2qs("Optional keyboard sequence that will activate this action.<br>" \
+ TQToolTip::add(m_pKeySequenceEdit,__tr2qs("Optional keyboard sequence that will activate this action.<br>" \
"The sequence should be expressed as a string of up to four key codes separated by commas " \
"eventually combined with the modifiers \"Ctrl\",\"Shift\",\"Alt\" and \"Meta\".<br>" \
"Examples of such sequences are \"Ctrl+X\", \"Ctrl+Alt+Z\", \"Ctrl+X,Ctrl+C\" ..."));
- l = new QLabel(tab);
+ l = new TQLabel(tab);
gl->addMultiCellWidget(l,6,6,0,3);
gl->setColStretch(1,1);
@@ -233,82 +233,82 @@ KviSingleActionEditor::KviSingleActionEditor(QWidget * par,KviActionEditor * ed)
// flags tab
- tab = new QWidget(tw);
- gl = new QGridLayout(tab,12,4,8,4);
+ tab = new TQWidget(tw);
+ gl = new TQGridLayout(tab,12,4,8,4);
m_pNeedsContextCheck = new KviStyledCheckBox(__tr2qs("Needs IRC Context"),tab);
- connect(m_pNeedsContextCheck,SIGNAL(toggled(bool)),this,SLOT(needsContextCheckToggled(bool)));
- QToolTip::add(m_pNeedsContextCheck,__tr2qs("Check this option if this action should be enabled only when " \
+ connect(m_pNeedsContextCheck,TQT_SIGNAL(toggled(bool)),this,TQT_SLOT(needsContextCheckToggled(bool)));
+ TQToolTip::add(m_pNeedsContextCheck,__tr2qs("Check this option if this action should be enabled only when " \
"the active window belongs to an irc context"));
gl->addMultiCellWidget(m_pNeedsContextCheck,0,0,0,3);
- l = new QLabel(tab);
+ l = new TQLabel(tab);
l->setMinimumWidth(40);
gl->addWidget(l,1,0);
m_pNeedsConnectionCheck = new KviStyledCheckBox(__tr2qs("Needs IRC Connection"),tab);
- connect(m_pNeedsConnectionCheck,SIGNAL(toggled(bool)),this,SLOT(needsConnectionCheckToggled(bool)));
- QToolTip::add(m_pNeedsConnectionCheck,__tr2qs("Check this option if this action should be enabled only when " \
+ connect(m_pNeedsConnectionCheck,TQT_SIGNAL(toggled(bool)),this,TQT_SLOT(needsConnectionCheckToggled(bool)));
+ TQToolTip::add(m_pNeedsConnectionCheck,__tr2qs("Check this option if this action should be enabled only when " \
"the active window has an active IRC connection"));
gl->addMultiCellWidget(m_pNeedsConnectionCheck,1,1,1,3);
- l = new QLabel(tab);
+ l = new TQLabel(tab);
l->setMinimumWidth(40);
gl->addWidget(l,2,1);
m_pEnableAtLoginCheck = new KviStyledCheckBox(__tr2qs("Enable at Login"),tab);
- QToolTip::add(m_pEnableAtLoginCheck,__tr2qs("Check this option if this action should be enabled also during " \
+ TQToolTip::add(m_pEnableAtLoginCheck,__tr2qs("Check this option if this action should be enabled also during " \
"the login operations (so when the logical IRC connection hasn't been estabilished yet)"));
gl->addMultiCellWidget(m_pEnableAtLoginCheck,2,2,2,3);
m_pSpecificWindowsCheck = new KviStyledCheckBox(__tr2qs("Enable Only in Specified Windows"),tab);
- connect(m_pSpecificWindowsCheck,SIGNAL(toggled(bool)),this,SLOT(specificWindowsCheckToggled(bool)));
- QToolTip::add(m_pSpecificWindowsCheck,__tr2qs("Check this option if this action should be enabled only when " \
+ connect(m_pSpecificWindowsCheck,TQT_SIGNAL(toggled(bool)),this,TQT_SLOT(specificWindowsCheckToggled(bool)));
+ TQToolTip::add(m_pSpecificWindowsCheck,__tr2qs("Check this option if this action should be enabled only when " \
"the active window is of a specified type"));
gl->addMultiCellWidget(m_pSpecificWindowsCheck,3,3,0,3);
m_pWindowConsoleCheck = new KviStyledCheckBox(__tr2qs("Enable in Console Windows"),tab);
- QToolTip::add(m_pWindowConsoleCheck,__tr2qs("Check this option if this action should be enabled only when " \
+ TQToolTip::add(m_pWindowConsoleCheck,__tr2qs("Check this option if this action should be enabled only when " \
"the active window is a console"));
- connect(m_pWindowConsoleCheck,SIGNAL(toggled(bool)),this,SLOT(channelQueryOrConsoleWindowCheckToggled(bool)));
+ connect(m_pWindowConsoleCheck,TQT_SIGNAL(toggled(bool)),this,TQT_SLOT(channelQueryOrConsoleWindowCheckToggled(bool)));
gl->addMultiCellWidget(m_pWindowConsoleCheck,4,4,1,3);
m_pConsoleOnlyIfUsersSelectedCheck = new KviStyledCheckBox(__tr2qs("Only If There Are Selected Users"),tab);
- QToolTip::add(m_pConsoleOnlyIfUsersSelectedCheck,__tr2qs("This will enable the action only if there are " \
+ TQToolTip::add(m_pConsoleOnlyIfUsersSelectedCheck,__tr2qs("This will enable the action only if there are " \
"selected users in the active window"));
gl->addMultiCellWidget(m_pConsoleOnlyIfUsersSelectedCheck,5,5,2,3);
m_pWindowChannelCheck = new KviStyledCheckBox(__tr2qs("Enable in Channel Windows"),tab);
- QToolTip::add(m_pWindowChannelCheck,__tr2qs("Check this option if this action should be enabled only when " \
+ TQToolTip::add(m_pWindowChannelCheck,__tr2qs("Check this option if this action should be enabled only when " \
"the active window is a channel"));
- connect(m_pWindowChannelCheck,SIGNAL(toggled(bool)),this,SLOT(channelQueryOrConsoleWindowCheckToggled(bool)));
+ connect(m_pWindowChannelCheck,TQT_SIGNAL(toggled(bool)),this,TQT_SLOT(channelQueryOrConsoleWindowCheckToggled(bool)));
gl->addMultiCellWidget(m_pWindowChannelCheck,6,6,1,3);
m_pChannelOnlyIfUsersSelectedCheck = new KviStyledCheckBox(__tr2qs("Only If There Are Selected Users"),tab);
- QToolTip::add(m_pChannelOnlyIfUsersSelectedCheck,__tr2qs("This will enable the action only if there are " \
+ TQToolTip::add(m_pChannelOnlyIfUsersSelectedCheck,__tr2qs("This will enable the action only if there are " \
"selected users in the active window"));
gl->addMultiCellWidget(m_pChannelOnlyIfUsersSelectedCheck,7,7,2,3);
m_pWindowQueryCheck = new KviStyledCheckBox(__tr2qs("Enable in Query Windows"),tab);
- QToolTip::add(m_pWindowQueryCheck,__tr2qs("Check this option if this action should be enabled only when " \
+ TQToolTip::add(m_pWindowQueryCheck,__tr2qs("Check this option if this action should be enabled only when " \
"the active window is a query"));
- connect(m_pWindowQueryCheck,SIGNAL(toggled(bool)),this,SLOT(channelQueryOrConsoleWindowCheckToggled(bool)));
+ connect(m_pWindowQueryCheck,TQT_SIGNAL(toggled(bool)),this,TQT_SLOT(channelQueryOrConsoleWindowCheckToggled(bool)));
gl->addMultiCellWidget(m_pWindowQueryCheck,8,8,1,3);
m_pQueryOnlyIfUsersSelectedCheck = new KviStyledCheckBox(__tr2qs("Only If There Are Selected Users"),tab);
- QToolTip::add(m_pQueryOnlyIfUsersSelectedCheck,__tr2qs("This will enable the action only if there are " \
+ TQToolTip::add(m_pQueryOnlyIfUsersSelectedCheck,__tr2qs("This will enable the action only if there are " \
"selected users in the active window"));
gl->addMultiCellWidget(m_pQueryOnlyIfUsersSelectedCheck,9,9,2,3);
m_pWindowDccChatCheck = new KviStyledCheckBox(__tr2qs("Enable in DCC Chat Windows"),tab);
- QToolTip::add(m_pWindowDccChatCheck,__tr2qs("Check this option if this action should be enabled only when " \
+ TQToolTip::add(m_pWindowDccChatCheck,__tr2qs("Check this option if this action should be enabled only when " \
"the active window is a dcc chat"));
gl->addMultiCellWidget(m_pWindowDccChatCheck,10,10,1,3);
- l = new QLabel(tab);
+ l = new TQLabel(tab);
gl->addMultiCellWidget(l,11,11,0,3);
gl->setColStretch(3,1);
@@ -324,7 +324,7 @@ KviSingleActionEditor::KviSingleActionEditor(QWidget * par,KviActionEditor * ed)
g->setColStretch(1,1);
- KviPointerHashTableIterator<QString,KviActionCategory> it(*(KviActionManager::instance()->categories()));
+ KviPointerHashTableIterator<TQString,KviActionCategory> it(*(KviActionManager::instance()->categories()));
while(KviActionCategory * ac = it.current())
{
m_pCategoryCombo->insertItem(ac->visibleName() + " (" + ac->name() + ")");
@@ -384,10 +384,10 @@ void KviSingleActionEditor::chooseSmallIcon()
if(!m_pActionData)return;
KviImageDialog * d = new KviImageDialog(this);
int ret = d->exec();
- QString s = d->selectedImage();
+ TQString s = d->selectedImage();
delete d;
- if(ret != QDialog::Accepted)return;
- QPixmap * p = g_pIconManager->getImage(s.utf8().data());
+ if(ret != TQDialog::Accepted)return;
+ TQPixmap * p = g_pIconManager->getImage(s.utf8().data());
if(!p)return;
m_pSmallIconEdit->setText(s);
m_pSmallIconButton->setPixmap(*p);
@@ -396,12 +396,12 @@ void KviSingleActionEditor::chooseSmallIcon()
void KviSingleActionEditor::chooseBigIcon()
{
if(!m_pActionData)return;
- KviImageDialog * d = new KviImageDialog(this,QString::null,KID_TYPE_ALL,KID_TYPE_FULL_PATH);
+ KviImageDialog * d = new KviImageDialog(this,TQString(),KID_TYPE_ALL,KID_TYPE_FULL_PATH);
int ret = d->exec();
- QString s = d->selectedImage();
+ TQString s = d->selectedImage();
delete d;
- if(ret != QDialog::Accepted)return;
- QPixmap * p = g_pIconManager->getBigIcon(s);
+ if(ret != TQDialog::Accepted)return;
+ TQPixmap * p = g_pIconManager->getBigIcon(s);
if(!p)return;
m_pBigIconEdit->setText(s);
m_pBigIconButton->setPixmap(*p);
@@ -426,10 +426,10 @@ void KviSingleActionEditor::setActionData(KviActionData * d)
int i;
for(i=0;i<m_pCategoryCombo->count();i++)
{
- QString t = m_pCategoryCombo->text(i);
- int idx = t.findRev('(');
- QString r = t.right(t.length() - (idx + 1));
- QString r2 = r.left(r.length() - 1);
+ TQString t = m_pCategoryCombo->text(i);
+ int idx = t.tqfindRev('(');
+ TQString r = t.right(t.length() - (idx + 1));
+ TQString r2 = r.left(r.length() - 1);
r2.stripWhiteSpace();
if(r2 == d->m_szCategory)
{
@@ -449,14 +449,14 @@ void KviSingleActionEditor::setActionData(KviActionData * d)
m_pDescriptionEdit->setEnabled(true);
m_pSmallIconEdit->setEnabled(true);
m_pBigIconEdit->setEnabled(true);
- QPixmap * p = g_pIconManager->getImage(d->m_szSmallIcon);
+ TQPixmap * p = g_pIconManager->getImage(d->m_szSmallIcon);
if(p)
{
m_pSmallIconEdit->setText(d->m_szSmallIcon);
m_pSmallIconButton->setPixmap(*p);
} else {
m_pSmallIconEdit->setText("");
- m_pSmallIconButton->setPixmap(QPixmap());
+ m_pSmallIconButton->setPixmap(TQPixmap());
}
p = g_pIconManager->getImage(d->m_szBigIcon);
if(p)
@@ -465,7 +465,7 @@ void KviSingleActionEditor::setActionData(KviActionData * d)
m_pBigIconButton->setPixmap(*p);
} else {
m_pBigIconEdit->setText("");
- m_pBigIconButton->setPixmap(QPixmap());
+ m_pBigIconButton->setPixmap(TQPixmap());
}
m_pSmallIconButton->setEnabled(true);
m_pBigIconButton->setEnabled(true);
@@ -517,9 +517,9 @@ void KviSingleActionEditor::setActionData(KviActionData * d)
m_pSmallIconEdit->setEnabled(false);
m_pBigIconEdit->setText("");
m_pBigIconEdit->setEnabled(false);
- m_pSmallIconButton->setPixmap(QPixmap());
+ m_pSmallIconButton->setPixmap(TQPixmap());
m_pSmallIconButton->setEnabled(false);
- m_pBigIconButton->setPixmap(QPixmap());
+ m_pBigIconButton->setPixmap(TQPixmap());
m_pBigIconButton->setEnabled(false);
m_pNeedsContextCheck->setChecked(false);
m_pNeedsContextCheck->setEnabled(false);
@@ -550,13 +550,13 @@ void KviSingleActionEditor::commit()
{
if(!m_pActionData)return;
- QString tmp = m_pNameEdit->text();
+ TQString tmp = m_pNameEdit->text();
if(tmp != m_pActionData->m_szName)
{
int idx = 1;
while(KviActionManager::instance()->coreActionExists(tmp) || m_pActionEditor->actionExists(tmp))
{
- QString tmp2;
+ TQString tmp2;
tmp2.setNum(idx);
tmp = m_pNameEdit->text();
tmp.append(tmp2);
@@ -571,11 +571,11 @@ void KviSingleActionEditor::commit()
m_pActionData->m_szBigIcon = m_pBigIconEdit->text();
m_pActionData->m_szSmallIcon = m_pSmallIconEdit->text();
m_pActionData->m_szKeySequence = m_pKeySequenceEdit->text();
- QString szCat = m_pCategoryCombo->currentText();
- int idx = szCat.findRev(')');
+ TQString szCat = m_pCategoryCombo->currentText();
+ int idx = szCat.tqfindRev(')');
if(idx != -1)m_pActionData->m_szCategory = szCat.left(idx);
else m_pActionData->m_szCategory = szCat;
- idx = m_pActionData->m_szCategory.findRev('(');
+ idx = m_pActionData->m_szCategory.tqfindRev('(');
if(idx != -1)m_pActionData->m_szCategory.remove(0,idx+1);
m_pActionData->m_uFlags = 0;
if(m_pNeedsContextCheck->isChecked())
@@ -618,7 +618,7 @@ void KviSingleActionEditor::commit()
-KviActionEditorListView::KviActionEditorListView(QWidget * pParent)
+KviActionEditorListView::KviActionEditorListView(TQWidget * pParent)
: KviTalListView(pParent)
{
setSelectionMode(Extended);
@@ -633,7 +633,7 @@ KviActionEditorListView::~KviActionEditorListView()
}
-void KviActionEditorListView::resizeEvent(QResizeEvent * e)
+void KviActionEditorListView::resizeEvent(TQResizeEvent * e)
{
KviTalListView::resizeEvent(e);
int iWidth = visibleWidth();
@@ -648,18 +648,18 @@ void KviActionEditorListView::resizeEvent(QResizeEvent * e)
-KviActionEditor::KviActionEditor(QWidget * par)
-: QWidget(par)
+KviActionEditor::KviActionEditor(TQWidget * par)
+: TQWidget(par)
{
- QGridLayout * l = new QGridLayout(this,1,1,2,2);
+ TQGridLayout * l = new TQGridLayout(this,1,1,2,2);
#ifdef COMPILE_USE_QT4
- m_pSplitter = new QSplitter(Qt::Horizontal,this);
+ m_pSplitter = new TQSplitter(Qt::Horizontal,this);
m_pSplitter->setOpaqueResize(false);
#else
- m_pSplitter = new QSplitter(QSplitter::Horizontal,this);
+ m_pSplitter = new TQSplitter(Qt::Horizontal,this);
#endif
l->addWidget(m_pSplitter,0,0);
@@ -670,21 +670,21 @@ KviActionEditor::KviActionEditor(QWidget * par)
//m_pListView->setMultiSelection(false);
m_pListView->setShowSortIndicator(true);
#ifdef COMPILE_USE_QT4
- m_pListView->setFocusPolicy(Qt::StrongFocus);
+ m_pListView->setFocusPolicy(TTQ_StrongFocus);
#else
- m_pListView->setFocusPolicy(QWidget::StrongFocus);
+ m_pListView->setFocusPolicy(TQ_StrongFocus);
#endif
- connect(m_pListView,SIGNAL(currentChanged(KviTalListViewItem *)),this,SLOT(currentChanged(KviTalListViewItem *)));
+ connect(m_pListView,TQT_SIGNAL(currentChanged(KviTalListViewItem *)),this,TQT_SLOT(currentChanged(KviTalListViewItem *)));
- m_pNewActionButton = new QPushButton(__tr2qs("New Action"),box);
- connect(m_pNewActionButton,SIGNAL(clicked()),this,SLOT(newAction()));
+ m_pNewActionButton = new TQPushButton(__tr2qs("New Action"),box);
+ connect(m_pNewActionButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(newAction()));
- m_pDeleteActionsButton = new QPushButton(__tr2qs("Delete Actions"),box);
- connect(m_pDeleteActionsButton,SIGNAL(clicked()),this,SLOT(deleteActions()));
+ m_pDeleteActionsButton = new TQPushButton(__tr2qs("Delete Actions"),box);
+ connect(m_pDeleteActionsButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(deleteActions()));
- m_pExportActionsButton = new QPushButton(__tr2qs("Export Actions..."),box);
- connect(m_pExportActionsButton,SIGNAL(clicked()),this,SLOT(exportActions()));
+ m_pExportActionsButton = new TQPushButton(__tr2qs("Export Actions..."),box);
+ connect(m_pExportActionsButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(exportActions()));
box->setSpacing(1);
@@ -693,7 +693,7 @@ KviActionEditor::KviActionEditor(QWidget * par)
KviActionEditorListViewItem * last = 0;
KviActionEditorListViewItem * first = 0;
- KviPointerHashTableIterator<QString,KviAction> it(*(KviActionManager::instance()->actions()));
+ KviPointerHashTableIterator<TQString,KviAction> it(*(KviActionManager::instance()->actions()));
while(KviAction * a = it.current())
{
if(a->isKviUserActionNeverOverrideThis())
@@ -736,15 +736,15 @@ KviActionEditor::~KviActionEditor()
void KviActionEditor::exportActions()
{
- QString szName = QDir::homeDirPath();
- if(!szName.endsWith(QString(KVI_PATH_SEPARATOR)))szName += KVI_PATH_SEPARATOR;
+ TQString szName = TQDir::homeDirPath();
+ if(!szName.endsWith(TQString(KVI_PATH_SEPARATOR)))szName += KVI_PATH_SEPARATOR;
szName += "myactions.kvs";
- QString szFile;
+ TQString szFile;
- if(!KviFileDialog::askForSaveFileName(szFile,__tr2qs("Choose a Filename - KVIrc"),szName,QString::null,true,true,true))return;
+ if(!KviFileDialog::askForSaveFileName(szFile,__tr2qs("Choose a Filename - KVIrc"),szName,TQString(),true,true,true))return;
- QString szCode;
+ TQString szCode;
KviActionEditorListViewItem * it = (KviActionEditorListViewItem *)m_pListView->firstChild();
while(it)
@@ -770,7 +770,7 @@ void KviActionEditor::exportActions()
if(!KviFileUtils::writeFile(szFile,szCode))
{
- QMessageBox::warning(this,__tr2qs("Write Failed - KVIrc"),__tr2qs("Unable to write to the actions file."),__tr2qs("OK"));
+ TQMessageBox::warning(this,__tr2qs("Write Failed - KVIrc"),__tr2qs("Unable to write to the actions file."),__tr2qs("OK"));
}
}
@@ -790,7 +790,7 @@ void KviActionEditor::deleteActions()
if(l.isEmpty())return;
- //if(QMessageBox::question(this,__tr2qsf("Confirm Deletion"),__tr2qsf("Do you really want to delete the selected actions ?"),__tr2qsf("Yes"),__tr2qsf("No")) != 0)
+ //if(TQMessageBox::question(this,__tr2qsf("Confirm Deletion"),__tr2qsf("Do you really want to delete the selected actions ?"),__tr2qsf("Yes"),__tr2qsf("No")) != 0)
// return;
for(KviActionEditorListViewItem * i = l.first();i;i = l.next())
@@ -802,16 +802,16 @@ void KviActionEditor::deleteActions()
}
-QString KviActionEditor::nameForAutomaticAction(const QString &szTemplate)
+TQString KviActionEditor::nameForAutomaticAction(const TQString &szTemplate)
{
- QString ret;
- QString szT = szTemplate;
- szT.replace(" ","");
- szT.replace(".","_");
+ TQString ret;
+ TQString szT = szTemplate;
+ szT.tqreplace(" ","");
+ szT.tqreplace(".","_");
int i = 1;
do {
- KviQString::sprintf(ret,"%Q%d",&szT,i);
+ KviTQString::sprintf(ret,"%Q%d",&szT,i);
i++;
} while(actionExists(ret));
@@ -820,9 +820,9 @@ QString KviActionEditor::nameForAutomaticAction(const QString &szTemplate)
void KviActionEditor::newAction()
{
- QString szName = nameForAutomaticAction(__tr2qs("My Action"));
- QString szVis = __tr2qs("My Action");
- QString szDes = __tr2qs("Put here a short description of your action");
+ TQString szName = nameForAutomaticAction(__tr2qs("My Action"));
+ TQString szVis = __tr2qs("My Action");
+ TQString szDes = __tr2qs("Put here a short description of your action");
szVis.prepend("$tr(\"");
szVis.append("\")");
@@ -830,14 +830,14 @@ void KviActionEditor::newAction()
szDes.append("\")");
KviActionData * ad = new KviActionData(szName,
- QString::null,
+ TQString(),
szVis,
szDes,
KviActionManager::categoryGeneric()->name(),
- QString::null,
- QString::null,
+ TQString(),
+ TQString(),
0,
- QString::null,
+ TQString(),
0);
KviActionEditorListViewItem * lvi = new KviActionEditorListViewItem(m_pListView,ad);
@@ -846,7 +846,7 @@ void KviActionEditor::newAction()
currentChanged(lvi);
}
-bool KviActionEditor::actionExists(const QString &szName)
+bool KviActionEditor::actionExists(const TQString &szName)
{
KviActionEditorListViewItem * it = (KviActionEditorListViewItem *)m_pListView->firstChild();
while(it)
@@ -926,24 +926,24 @@ KviActionEditorWindow::KviActionEditorWindow(KviFrame * lpFrm)
m_pEditor = new KviActionEditor(this);
- m_pBase = new QWidget(this);
- QGridLayout * g = new QGridLayout(m_pBase,1,4,4,4);
+ m_pBase = new TQWidget(this);
+ TQGridLayout * g = new TQGridLayout(m_pBase,1,4,4,4);
- QPushButton * btn = new QPushButton(__tr2qs("OK"),m_pBase);
+ TQPushButton * btn = new TQPushButton(__tr2qs("OK"),m_pBase);
btn->setMinimumWidth(80);
- connect(btn,SIGNAL(clicked()),this,SLOT(okClicked()));
+ connect(btn,TQT_SIGNAL(clicked()),this,TQT_SLOT(okClicked()));
btn->setIconSet(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_ACCEPT)));
g->addWidget(btn,0,1);
- btn = new QPushButton(__tr2qs("Apply"),m_pBase);
+ btn = new TQPushButton(__tr2qs("Apply"),m_pBase);
btn->setMinimumWidth(80);
- connect(btn,SIGNAL(clicked()),this,SLOT(applyClicked()));
+ connect(btn,TQT_SIGNAL(clicked()),this,TQT_SLOT(applyClicked()));
btn->setIconSet(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_ACCEPT)));
g->addWidget(btn,0,2);
- btn = new QPushButton(__tr2qs("Cancel"),m_pBase);
+ btn = new TQPushButton(__tr2qs("Cancel"),m_pBase);
btn->setMinimumWidth(80);
- connect(btn,SIGNAL(clicked()),this,SLOT(cancelClicked()));
+ connect(btn,TQT_SIGNAL(clicked()),this,TQT_SLOT(cancelClicked()));
btn->setIconSet(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_DISCARD)));
g->addWidget(btn,0,3);
@@ -973,14 +973,14 @@ void KviActionEditorWindow::cancelClicked()
}
-QPixmap * KviActionEditorWindow::myIconPtr()
+TQPixmap * KviActionEditorWindow::myIconPtr()
{
return g_pIconManager->getSmallIcon(KVI_SMALLICON_SCRIPTACTION);
}
-void KviActionEditorWindow::resizeEvent(QResizeEvent *e)
+void KviActionEditorWindow::resizeEvent(TQResizeEvent *e)
{
- int hght = m_pBase->sizeHint().height();
+ int hght = m_pBase->tqsizeHint().height();
m_pEditor->setGeometry(0,0,width(),height()- hght);
m_pBase->setGeometry(0,height() - hght,width(),hght);
}