summaryrefslogtreecommitdiffstats
path: root/kexi/plugins/forms/kexiactionselectiondialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kexi/plugins/forms/kexiactionselectiondialog.cpp')
-rw-r--r--kexi/plugins/forms/kexiactionselectiondialog.cpp288
1 files changed, 144 insertions, 144 deletions
diff --git a/kexi/plugins/forms/kexiactionselectiondialog.cpp b/kexi/plugins/forms/kexiactionselectiondialog.cpp
index 26b4a9a6..31ab61d0 100644
--- a/kexi/plugins/forms/kexiactionselectiondialog.cpp
+++ b/kexi/plugins/forms/kexiactionselectiondialog.cpp
@@ -34,38 +34,38 @@
#include <kstdguiitem.h>
#include <kpushbutton.h>
-#include <qbitmap.h>
-#include <qlabel.h>
-#include <qheader.h>
-#include <qvbox.h>
-#include <qtooltip.h>
-#include <qwidgetstack.h>
+#include <tqbitmap.h>
+#include <tqlabel.h>
+#include <tqheader.h>
+#include <tqvbox.h>
+#include <tqtooltip.h>
+#include <tqwidgetstack.h>
#include <widget/utils/klistviewitemtemplate.h>
#include <widget/kexibrowser.h>
#include <widget/kexibrowseritem.h>
#include <kexiutils/utils.h>
-typedef KListViewItemTemplate<QString> ActionSelectorDialogListItemBase;
+typedef KListViewItemTemplate<TQString> ActionSelectorDialogListItemBase;
class ActionSelectorDialogListItem : public ActionSelectorDialogListItemBase
{
public:
- ActionSelectorDialogListItem(const QString& data, QListView *parent, QString label1)
- : ActionSelectorDialogListItemBase(data, parent, label1)
+ ActionSelectorDialogListItem(const TQString& data, TQListView *tqparent, TQString label1)
+ : ActionSelectorDialogListItemBase(data, tqparent, label1)
, fifoSorting(true)
{
- m_sortKey.sprintf("%2.2d", parent->childCount());
+ m_sortKey.sprintf("%2.2d", tqparent->childCount());
}
- ActionSelectorDialogListItem(const QString& data, QListViewItem *parent, QString label1)
- : ActionSelectorDialogListItemBase(data, parent, label1)
+ ActionSelectorDialogListItem(const TQString& data, TQListViewItem *tqparent, TQString label1)
+ : ActionSelectorDialogListItemBase(data, tqparent, label1)
, fifoSorting(true)
{
- m_sortKey.sprintf("%2.2d", parent->childCount());
+ m_sortKey.sprintf("%2.2d", tqparent->childCount());
}
- virtual QString key( int column, bool ascending ) const
+ virtual TQString key( int column, bool ascending ) const
{
return fifoSorting ? m_sortKey : ActionSelectorDialogListItemBase::key(column, ascending);
}
@@ -73,18 +73,18 @@ public:
bool fifoSorting : 1;
protected:
- QString m_sortKey;
+ TQString m_sortKey;
};
//---------------------------------------
-ActionsListViewBase::ActionsListViewBase(QWidget* parent)
- : KListView(parent)
+ActionsListViewBase::ActionsListViewBase(TQWidget* tqparent)
+ : KListView(tqparent)
{
- setResizeMode(QListView::AllColumns);
+ setResizeMode(TQListView::AllColumns);
addColumn("");
header()->hide();
- setColumnWidthMode(0, QListView::Maximum);
+ setColumnWidthMode(0, TQListView::Maximum);
setAllColumnsShowFocus(true);
setTooltipColumn(0);
}
@@ -93,9 +93,9 @@ ActionsListViewBase::~ActionsListViewBase()
{
}
-QListViewItem *ActionsListViewBase::itemForAction(const QString& actionName)
+TQListViewItem *ActionsListViewBase::itemForAction(const TQString& actionName)
{
- for (QListViewItemIterator it(this); it.current(); ++it) {
+ for (TQListViewItemIterator it(this); it.current(); ++it) {
ActionSelectorDialogListItem* item = dynamic_cast<ActionSelectorDialogListItem*>(it.current());
if (item && item->data == actionName)
return item;
@@ -103,9 +103,9 @@ QListViewItem *ActionsListViewBase::itemForAction(const QString& actionName)
return 0;
}
-void ActionsListViewBase::selectAction(const QString& actionName)
+void ActionsListViewBase::selectAction(const TQString& actionName)
{
- QListViewItem *item = itemForAction(actionName);
+ TQListViewItem *item = itemForAction(actionName);
if (item) {
setSelected(item, true);
ensureItemVisible(firstChild());
@@ -115,8 +115,8 @@ void ActionsListViewBase::selectAction(const QString& actionName)
//---------------------------------------
-KActionsListViewBase::KActionsListViewBase(QWidget* parent, KexiMainWindow* mainWin)
- : ActionsListViewBase(parent)
+KActionsListViewBase::KActionsListViewBase(TQWidget* tqparent, KexiMainWindow* mainWin)
+ : ActionsListViewBase(tqparent)
, m_mainWin(mainWin)
{
}
@@ -126,7 +126,7 @@ KActionsListViewBase::~KActionsListViewBase() {}
void KActionsListViewBase::init()
{
setSorting(0);
- const QPixmap noIcon( KexiUtils::emptyIcon(KIcon::Small) );
+ const TQPixmap noIcon( KexiUtils::emptyIcon(KIcon::Small) );
KActionPtrList sharedActions( m_mainWin->allActions() );
const Kexi::ActionCategories *acat = Kexi::actionCategories();
foreach (KActionPtrList::ConstIterator, it, sharedActions) {
@@ -142,9 +142,9 @@ void KActionsListViewBase::init()
if (!isActionVisible((*it)->name(), actionCategories))
continue;
ActionSelectorDialogListItem *pitem = new ActionSelectorDialogListItem((*it)->name(),
- this, (*it)->toolTip().isEmpty() ? (*it)->text().replace("&", "") : (*it)->toolTip() );
+ this, (*it)->toolTip().isEmpty() ? (*it)->text().tqreplace("&", "") : (*it)->toolTip() );
pitem->fifoSorting = false; //alpha sort
- pitem->setPixmap( 0, (*it)->iconSet( KIcon::Small, 16 ).pixmap( QIconSet::Small, QIconSet::Active ) );
+ pitem->setPixmap( 0, (*it)->iconSet( KIcon::Small, 16 ).pixmap( TQIconSet::Small, TQIconSet::Active ) );
if (!pitem->pixmap(0) || pitem->pixmap(0)->isNull())
pitem->setPixmap( 0, noIcon );
}
@@ -156,8 +156,8 @@ void KActionsListViewBase::init()
class KActionsListView : public KActionsListViewBase
{
public:
- KActionsListView(QWidget* parent, KexiMainWindow* mainWin)
- : KActionsListViewBase(parent, mainWin)
+ KActionsListView(TQWidget* tqparent, KexiMainWindow* mainWin)
+ : KActionsListViewBase(tqparent, mainWin)
{
}
virtual ~KActionsListView() {}
@@ -172,8 +172,8 @@ public:
class CurrentFormActionsListView : public KActionsListViewBase
{
public:
- CurrentFormActionsListView(QWidget* parent, KexiMainWindow* mainWin)
- : KActionsListViewBase(parent, mainWin)
+ CurrentFormActionsListView(TQWidget* tqparent, KexiMainWindow* mainWin)
+ : KActionsListViewBase(tqparent, mainWin)
{
}
virtual ~CurrentFormActionsListView() {}
@@ -188,11 +188,11 @@ public:
class ActionCategoriesListView : public ActionsListViewBase
{
public:
- ActionCategoriesListView(QWidget* parent) //, KexiProject& project)
- : ActionsListViewBase(parent)
+ ActionCategoriesListView(TQWidget* tqparent) //, KexiProject& project)
+ : ActionsListViewBase(tqparent)
{
- QListViewItem *item = new ActionSelectorDialogListItem("noaction", this, i18n("No action") );
- const QPixmap noIcon( KexiUtils::emptyIcon(KIcon::Small) );
+ TQListViewItem *item = new ActionSelectorDialogListItem("noaction", this, i18n("No action") );
+ const TQPixmap noIcon( KexiUtils::emptyIcon(KIcon::Small) );
item->setPixmap(0, noIcon);
item = new ActionSelectorDialogListItem("kaction", this, i18n("Application actions") );
item->setPixmap(0, SmallIcon("form_action"));
@@ -205,7 +205,7 @@ public:
item = new KexiBrowserItem(this, info);
item->setText(0, part->instanceCaption());
}
- QListViewItem *formItem = itemForAction("form");
+ TQListViewItem *formItem = itemForAction("form");
if (formItem) {
item = new ActionSelectorDialogListItem("currentForm", formItem,
i18n("Current form's actions", "Current"));
@@ -219,9 +219,9 @@ public:
}
//! \return item for action \a actionName, reimplemented to support KexiBrowserItem items
- virtual QListViewItem *itemForAction(const QString& actionName)
+ virtual TQListViewItem *itemForAction(const TQString& actionName)
{
- for (QListViewItemIterator it(this); it.current(); ++it) {
+ for (TQListViewItemIterator it(this); it.current(); ++it) {
//simple case
ActionSelectorDialogListItem* item = dynamic_cast<ActionSelectorDialogListItem*>(it.current());
if (item) {
@@ -243,8 +243,8 @@ public:
class ActionToExecuteListView : public ActionsListViewBase
{
public:
- ActionToExecuteListView(QWidget* parent)
- : ActionsListViewBase(parent)
+ ActionToExecuteListView(TQWidget* tqparent)
+ : ActionsListViewBase(tqparent)
{
}
@@ -253,7 +253,7 @@ class ActionToExecuteListView : public ActionsListViewBase
}
//! Updates actions
- void showActionsForMimeType(const QString& mimeType) {
+ void showActionsForMimeType(const TQString& mimeType) {
if (m_currentMimeType == mimeType)
return;
m_currentMimeType = mimeType;
@@ -263,7 +263,7 @@ class ActionToExecuteListView : public ActionsListViewBase
return;
int supportedViewModes = part->supportedViewModes();
ActionSelectorDialogListItem *item;
- const QPixmap noIcon( KexiUtils::emptyIcon(KIcon::Small) );
+ const TQPixmap noIcon( KexiUtils::emptyIcon(KIcon::Small) );
if (supportedViewModes & Kexi::DataViewMode) {
item = new ActionSelectorDialogListItem("open", this, i18n("Open in Data View"));
item->setPixmap(0, SmallIcon("fileopen"));
@@ -278,7 +278,7 @@ class ActionToExecuteListView : public ActionsListViewBase
printItem->setPixmap(0, SmallIcon("fileprint"));
KAction *a = KStdAction::printPreview(0, 0, 0);
item = new ActionSelectorDialogListItem("printPreview", printItem,
- a->text().replace("&", "").replace("...", ""));
+ a->text().tqreplace("&", "").tqreplace("...", ""));
item->setPixmap(0, SmallIcon(a->icon()));
delete a;
item = new ActionSelectorDialogListItem("pageSetup", printItem, i18n("Show Page Setup"));
@@ -321,7 +321,7 @@ class ActionToExecuteListView : public ActionsListViewBase
setMinimumWidth( columnWidth(0) );
}
- QString m_currentMimeType;
+ TQString m_currentMimeType;
};
//-------------------------------------
@@ -339,25 +339,25 @@ public:
{
}
- void raiseWidget(QWidget *w)
+ void raiseWidget(TQWidget *w)
{
secondAnd3rdColumnStack->raiseWidget( w );
selectActionToBeExecutedLbl->setBuddy(w);
}
- void updateSelectActionToBeExecutedMessage(const QString& actionType)
+ void updateSelectActionToBeExecutedMessage(const TQString& actionType)
{
- QString msg;
+ TQString msg;
if (actionType=="noaction")
- msg = QString::null;
+ msg = TQString();
// hardcoded, but it's not that bad
else if (actionType=="macro")
- msg = i18n("&Select macro to be executed after clicking \"%1\" button:").arg(actionWidgetName);
+ msg = i18n("&Select macro to be executed after clicking \"%1\" button:").tqarg(actionWidgetName);
else if (actionType=="script")
- msg = i18n("&Select script to be executed after clicking \"%1\" button:").arg(actionWidgetName);
+ msg = i18n("&Select script to be executed after clicking \"%1\" button:").tqarg(actionWidgetName);
//default: table/query/form/report...
else
- msg = i18n("&Select object to be opened after clicking \"%1\" button:").arg(actionWidgetName);
+ msg = i18n("&Select object to be opened after clicking \"%1\" button:").tqarg(actionWidgetName);
selectActionToBeExecutedLbl->setText(msg);
}
@@ -374,29 +374,29 @@ public:
}
KexiMainWindow* mainWin;
- QString actionWidgetName;
+ TQString actionWidgetName;
ActionCategoriesListView* actionCategoriesListView; //!< for column #1
- QWidget *kactionPageWidget;
+ TQWidget *kactionPageWidget;
KActionsListView* kactionListView; //!< for column #2
KexiBrowser* objectsListView; //!< for column #2
- QWidget *currentFormActionsPageWidget; //!< for column #2
+ TQWidget *currentFormActionsPageWidget; //!< for column #2
CurrentFormActionsListView* currentFormActionsListView; //!< for column #2
- QWidget *emptyWidget;
- QLabel* selectActionToBeExecutedLbl;
+ TQWidget *emptyWidget;
+ TQLabel* selectActionToBeExecutedLbl;
ActionToExecuteListView* actionToExecuteListView;
- QLabel *actionToExecuteLbl;
- QWidget *secondAnd3rdColumnMainWidget;
- QGridLayout *glyr;
- QGridLayout *secondAnd3rdColumnGrLyr;
- QWidgetStack *secondAnd3rdColumnStack, *secondColumnStack;
+ TQLabel *actionToExecuteLbl;
+ TQWidget *secondAnd3rdColumnMainWidget;
+ TQGridLayout *glyr;
+ TQGridLayout *secondAnd3rdColumnGrLyr;
+ TQWidgetStack *secondAnd3rdColumnStack, *secondColumnStack;
bool hideActionToExecuteListView;
};
//-------------------------------------
-KexiActionSelectionDialog::KexiActionSelectionDialog(KexiMainWindow* mainWin, QWidget *parent,
- const KexiFormEventAction::ActionData& action, const QCString& actionWidgetName)
- : KDialogBase(parent, "actionSelectorDialog", true, i18n("Assigning Action to Command Button"),
+KexiActionSelectionDialog::KexiActionSelectionDialog(KexiMainWindow* mainWin, TQWidget *tqparent,
+ const KexiFormEventAction::ActionData& action, const TQCString& actionWidgetName)
+ : KDialogBase(tqparent, "actionSelectorDialog", true, i18n("Assigning Action to Command Button"),
KDialogBase::Ok | KDialogBase::Cancel )
, d( new KexiActionSelectionDialogPrivate() )
{
@@ -404,8 +404,8 @@ KexiActionSelectionDialog::KexiActionSelectionDialog(KexiMainWindow* mainWin, QW
d->actionWidgetName = actionWidgetName;
setButtonOK( KGuiItem(i18n("Assign action", "&Assign"), "button_ok", i18n("Assign action")) );
- QWidget *mainWidget = new QWidget( this );
- mainWidget->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum);
+ TQWidget *mainWidget = new TQWidget( this );
+ mainWidget->tqsetSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Minimum);
setMainWidget(mainWidget);
/* lbl 1
@@ -418,80 +418,80 @@ KexiActionSelectionDialog::KexiActionSelectionDialog(KexiMainWindow* mainWin, QW
+------------+ +-------------------------------+
\______________________________________________/
glyr
- [a]- QWidgetStack *secondAnd3rdColumnStack,
- - for displaying KActions, the stack contains d->kactionPageWidget QWidget
- - for displaying objects, the stack contains secondAnd3rdColumnMainWidget QWidget and QGridLayout *secondAnd3rdColumnGrLyr
- - kactionPageWidget contains only a QVBoxLayout and label+kactionListView
+ [a]- TQWidgetStack *secondAnd3rdColumnStack,
+ - for displaying KActions, the stack contains d->kactionPageWidget TQWidget
+ - for displaying objects, the stack contains secondAnd3rdColumnMainWidget TQWidget and TQGridLayout *secondAnd3rdColumnGrLyr
+ - kactionPageWidget contains only a TQVBoxLayout and label+kactionListView
*/
- d->glyr = new QGridLayout(mainWidget, 2, 2, KDialog::marginHint(), KDialog::spacingHint());
+ d->glyr = new TQGridLayout(mainWidget, 2, 2, KDialog::marginHint(), KDialog::spacingHint());
d->glyr->setRowStretch(1, 1);
// 1st column: action types
d->actionCategoriesListView = new ActionCategoriesListView(mainWidget);
- d->actionCategoriesListView->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Minimum);
+ d->actionCategoriesListView->tqsetSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Minimum);
d->glyr->addWidget(d->actionCategoriesListView, 1, 0);
- connect( d->actionCategoriesListView, SIGNAL(selectionChanged(QListViewItem*)),
- this, SLOT(slotActionCategorySelected(QListViewItem*)));
+ connect( d->actionCategoriesListView, TQT_SIGNAL(selectionChanged(TQListViewItem*)),
+ this, TQT_SLOT(slotActionCategorySelected(TQListViewItem*)));
- QLabel *lbl = new QLabel(d->actionCategoriesListView, i18n("Action category:"), mainWidget);
+ TQLabel *lbl = new TQLabel(d->actionCategoriesListView, i18n("Action category:"), mainWidget);
lbl->setMinimumHeight(lbl->fontMetrics().height()*2);
- lbl->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
- lbl->setAlignment(Qt::AlignTop|Qt::AlignLeft|Qt::WordBreak);
- d->glyr->addWidget(lbl, 0, 0, Qt::AlignTop|Qt::AlignLeft);
+ lbl->tqsetSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed);
+ lbl->tqsetAlignment(TQt::AlignTop|TQt::AlignLeft|TQt::WordBreak);
+ d->glyr->addWidget(lbl, 0, 0, TQt::AlignTop|TQt::AlignLeft);
// widget stack for 2nd and 3rd column
- d->secondAnd3rdColumnStack = new QWidgetStack(mainWidget);
- d->secondAnd3rdColumnStack->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum);
- d->glyr->addMultiCellWidget(d->secondAnd3rdColumnStack, 0, 1, 1, 1);//, Qt::AlignTop|Qt::AlignLeft);
+ d->secondAnd3rdColumnStack = new TQWidgetStack(mainWidget);
+ d->secondAnd3rdColumnStack->tqsetSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Minimum);
+ d->glyr->addMultiCellWidget(d->secondAnd3rdColumnStack, 0, 1, 1, 1);//, TQt::AlignTop|TQt::AlignLeft);
- d->secondAnd3rdColumnMainWidget = new QWidget(d->secondAnd3rdColumnStack);
- d->secondAnd3rdColumnMainWidget->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum);
- d->secondAnd3rdColumnGrLyr = new QGridLayout(d->secondAnd3rdColumnMainWidget, 2, 2, 0, KDialog::spacingHint());
+ d->secondAnd3rdColumnMainWidget = new TQWidget(d->secondAnd3rdColumnStack);
+ d->secondAnd3rdColumnMainWidget->tqsetSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Minimum);
+ d->secondAnd3rdColumnGrLyr = new TQGridLayout(d->secondAnd3rdColumnMainWidget, 2, 2, 0, KDialog::spacingHint());
d->secondAnd3rdColumnGrLyr->setRowStretch(1, 2);
d->secondAnd3rdColumnStack->addWidget(d->secondAnd3rdColumnMainWidget);
// 2nd column: list of actions/objects
d->objectsListView = new KexiBrowser(d->secondAnd3rdColumnMainWidget, d->mainWin, 0/*features*/);
d->secondAnd3rdColumnGrLyr->addWidget(d->objectsListView, 1, 0);
- connect(d->objectsListView, SIGNAL(selectionChanged(KexiPart::Item*)),
- this, SLOT(slotItemForOpeningOrExecutingSelected(KexiPart::Item*)));
+ connect(d->objectsListView, TQT_SIGNAL(selectionChanged(KexiPart::Item*)),
+ this, TQT_SLOT(slotItemForOpeningOrExecutingSelected(KexiPart::Item*)));
- d->selectActionToBeExecutedLbl = new QLabel(d->secondAnd3rdColumnMainWidget);
- d->selectActionToBeExecutedLbl->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed);
- d->selectActionToBeExecutedLbl->setAlignment(Qt::AlignTop|Qt::AlignLeft|Qt::WordBreak);
+ d->selectActionToBeExecutedLbl = new TQLabel(d->secondAnd3rdColumnMainWidget);
+ d->selectActionToBeExecutedLbl->tqsetSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Fixed);
+ d->selectActionToBeExecutedLbl->tqsetAlignment(TQt::AlignTop|TQt::AlignLeft|TQt::WordBreak);
d->selectActionToBeExecutedLbl->setMinimumHeight(d->selectActionToBeExecutedLbl->fontMetrics().height()*2);
- d->secondAnd3rdColumnGrLyr->addWidget(d->selectActionToBeExecutedLbl, 0, 0, Qt::AlignTop|Qt::AlignLeft);
+ d->secondAnd3rdColumnGrLyr->addWidget(d->selectActionToBeExecutedLbl, 0, 0, TQt::AlignTop|TQt::AlignLeft);
- d->emptyWidget = new QWidget(d->secondAnd3rdColumnStack);
+ d->emptyWidget = new TQWidget(d->secondAnd3rdColumnStack);
d->secondAnd3rdColumnStack->addWidget(d->emptyWidget);
// 3rd column: actions to execute
d->actionToExecuteListView = new ActionToExecuteListView(d->secondAnd3rdColumnMainWidget);
d->actionToExecuteListView->installEventFilter(this); //to be able to disable painting
d->actionToExecuteListView->viewport()->installEventFilter(this); //to be able to disable painting
- d->actionToExecuteListView->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Minimum);
- connect(d->actionToExecuteListView, SIGNAL(executed(QListViewItem*)),
- this, SLOT(slotActionToExecuteItemExecuted(QListViewItem*)));
- connect(d->actionToExecuteListView, SIGNAL(selectionChanged(QListViewItem*)),
- this, SLOT(slotActionToExecuteItemSelected(QListViewItem*)));
+ d->actionToExecuteListView->tqsetSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Minimum);
+ connect(d->actionToExecuteListView, TQT_SIGNAL(executed(TQListViewItem*)),
+ this, TQT_SLOT(slotActionToExecuteItemExecuted(TQListViewItem*)));
+ connect(d->actionToExecuteListView, TQT_SIGNAL(selectionChanged(TQListViewItem*)),
+ this, TQT_SLOT(slotActionToExecuteItemSelected(TQListViewItem*)));
d->secondAnd3rdColumnGrLyr->addWidget(d->actionToExecuteListView, 1, 1);
- d->actionToExecuteLbl = new QLabel(d->actionToExecuteListView,
+ d->actionToExecuteLbl = new TQLabel(d->actionToExecuteListView,
i18n("Action to execute:"), d->secondAnd3rdColumnMainWidget);
d->actionToExecuteLbl->installEventFilter(this); //to be able to disable painting
- d->actionToExecuteLbl->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed);
- d->actionToExecuteLbl->setAlignment(Qt::AlignTop|Qt::AlignLeft|Qt::WordBreak);
- d->secondAnd3rdColumnGrLyr->addWidget(d->actionToExecuteLbl, 0, 1, Qt::AlignTop|Qt::AlignLeft);
+ d->actionToExecuteLbl->tqsetSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Fixed);
+ d->actionToExecuteLbl->tqsetAlignment(TQt::AlignTop|TQt::AlignLeft|TQt::WordBreak);
+ d->secondAnd3rdColumnGrLyr->addWidget(d->actionToExecuteLbl, 0, 1, TQt::AlignTop|TQt::AlignLeft);
// temporary show all sections to avoid resizing the dialog in the future
d->actionCategoriesListView->selectAction("table");
d->setActionToExecuteSectionVisible(true);
adjustSize();
- resize(QMAX(700, width()), QMAX(450, height()));
+ resize(TQMAX(700, width()), TQMAX(450, height()));
d->actionToExecuteListView->updateWidth();
bool ok;
- QString actionType, actionArg;
+ TQString actionType, actionArg;
KexiPart::Info* partInfo = action.decodeString(actionType, actionArg, ok);
if (ok) {
d->actionCategoriesListView->selectAction(actionType);
@@ -511,7 +511,7 @@ KexiActionSelectionDialog::KexiActionSelectionDialog(KexiMainWindow* mainWin, QW
KexiPart::Item *item = d->mainWin->project()->item(partInfo, actionArg);
if (d->objectsListView && item) {
d->objectsListView->selectItem(*item);
- QString actionOption( action.option );
+ TQString actionOption( action.option );
if (actionOption.isEmpty())
actionOption = "open"; // for backward compatibility
d->actionToExecuteListView->selectAction(actionOption);
@@ -530,26 +530,26 @@ KexiActionSelectionDialog::~KexiActionSelectionDialog()
delete d;
}
-void KexiActionSelectionDialog::slotKActionItemExecuted(QListViewItem*)
+void KexiActionSelectionDialog::slotKActionItemExecuted(TQListViewItem*)
{
accept();
}
-void KexiActionSelectionDialog::slotKActionItemSelected(QListViewItem*)
+void KexiActionSelectionDialog::slotKActionItemSelected(TQListViewItem*)
{
d->setActionToExecuteSectionVisible(false);
- updateOKButtonStatus();
+ updateOKButtontqStatus();
}
-void KexiActionSelectionDialog::slotCurrentFormActionItemExecuted(QListViewItem*)
+void KexiActionSelectionDialog::slotCurrentFormActionItemExecuted(TQListViewItem*)
{
accept();
}
-void KexiActionSelectionDialog::slotCurrentFormActionItemSelected(QListViewItem*)
+void KexiActionSelectionDialog::slotCurrentFormActionItemSelected(TQListViewItem*)
{
d->setActionToExecuteSectionVisible(false);
- updateOKButtonStatus();
+ updateOKButtontqStatus();
}
void KexiActionSelectionDialog::slotItemForOpeningOrExecutingSelected(KexiPart::Item* item)
@@ -557,7 +557,7 @@ void KexiActionSelectionDialog::slotItemForOpeningOrExecutingSelected(KexiPart::
d->setActionToExecuteSectionVisible(item);
}
-void KexiActionSelectionDialog::slotActionToExecuteItemExecuted(QListViewItem* item)
+void KexiActionSelectionDialog::slotActionToExecuteItemExecuted(TQListViewItem* item)
{
if (!item)
return;
@@ -566,38 +566,38 @@ void KexiActionSelectionDialog::slotActionToExecuteItemExecuted(QListViewItem* i
accept();
}
-void KexiActionSelectionDialog::slotActionToExecuteItemSelected(QListViewItem*)
+void KexiActionSelectionDialog::slotActionToExecuteItemSelected(TQListViewItem*)
{
- updateOKButtonStatus();
+ updateOKButtontqStatus();
}
-void KexiActionSelectionDialog::slotActionCategorySelected(QListViewItem* item)
+void KexiActionSelectionDialog::slotActionCategorySelected(TQListViewItem* item)
{
ActionSelectorDialogListItem *simpleItem = dynamic_cast<ActionSelectorDialogListItem*>(item);
// simple case: part-less item, e.g. kaction:
if (simpleItem) {
d->updateSelectActionToBeExecutedMessage(simpleItem->data);
- QString selectActionToBeExecutedMsg(
+ TQString selectActionToBeExecutedMsg(
i18n("&Select action to be executed after clicking \"%1\" button:")); // msg for a label
if (simpleItem->data == "kaction") {
if (!d->kactionPageWidget) {
- //create lbl+list view with a vlayout
- d->kactionPageWidget = new QWidget();
- d->kactionPageWidget->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum);
- QVBoxLayout *vlyr = new QVBoxLayout(d->kactionPageWidget, 0, KDialog::spacingHint());
+ //create lbl+list view with a vtqlayout
+ d->kactionPageWidget = new TQWidget();
+ d->kactionPageWidget->tqsetSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Minimum);
+ TQVBoxLayout *vlyr = new TQVBoxLayout(d->kactionPageWidget, 0, KDialog::spacingHint());
d->kactionListView = new KActionsListView(d->kactionPageWidget, d->mainWin);
d->kactionListView->init();
- QLabel *lbl = new QLabel(d->kactionListView, selectActionToBeExecutedMsg.arg(d->actionWidgetName),
+ TQLabel *lbl = new TQLabel(d->kactionListView, selectActionToBeExecutedMsg.tqarg(d->actionWidgetName),
d->kactionPageWidget);
- lbl->setAlignment(Qt::AlignTop|Qt::AlignLeft|Qt::WordBreak);
+ lbl->tqsetAlignment(TQt::AlignTop|TQt::AlignLeft|TQt::WordBreak);
lbl->setMinimumHeight(lbl->fontMetrics().height()*2);
vlyr->addWidget(lbl);
vlyr->addWidget(d->kactionListView);
d->secondAnd3rdColumnStack->addWidget(d->kactionPageWidget);
- connect(d->kactionListView, SIGNAL(executed(QListViewItem*)),
- this, SLOT(slotKActionItemExecuted(QListViewItem*)));
- connect( d->kactionListView, SIGNAL(selectionChanged(QListViewItem*)),
- this, SLOT(slotKActionItemSelected(QListViewItem*)));
+ connect(d->kactionListView, TQT_SIGNAL(executed(TQListViewItem*)),
+ this, TQT_SLOT(slotKActionItemExecuted(TQListViewItem*)));
+ connect( d->kactionListView, TQT_SIGNAL(selectionChanged(TQListViewItem*)),
+ this, TQT_SLOT(slotKActionItemSelected(TQListViewItem*)));
}
d->setActionToExecuteSectionVisible(false);
d->raiseWidget(d->kactionPageWidget);
@@ -605,24 +605,24 @@ void KexiActionSelectionDialog::slotActionCategorySelected(QListViewItem* item)
}
else if (simpleItem->data == "currentForm") {
if (!d->currentFormActionsPageWidget) {
- //create lbl+list view with a vlayout
- d->currentFormActionsPageWidget = new QWidget();
- d->currentFormActionsPageWidget->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum);
- QVBoxLayout *vlyr = new QVBoxLayout(d->currentFormActionsPageWidget, 0, KDialog::spacingHint());
+ //create lbl+list view with a vtqlayout
+ d->currentFormActionsPageWidget = new TQWidget();
+ d->currentFormActionsPageWidget->tqsetSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Minimum);
+ TQVBoxLayout *vlyr = new TQVBoxLayout(d->currentFormActionsPageWidget, 0, KDialog::spacingHint());
d->currentFormActionsListView = new CurrentFormActionsListView(
d->currentFormActionsPageWidget, d->mainWin);
d->currentFormActionsListView->init();
- QLabel *lbl = new QLabel(d->currentFormActionsListView,
- selectActionToBeExecutedMsg.arg(d->actionWidgetName), d->currentFormActionsPageWidget);
- lbl->setAlignment(Qt::AlignTop|Qt::AlignLeft|Qt::WordBreak);
+ TQLabel *lbl = new TQLabel(d->currentFormActionsListView,
+ selectActionToBeExecutedMsg.tqarg(d->actionWidgetName), d->currentFormActionsPageWidget);
+ lbl->tqsetAlignment(TQt::AlignTop|TQt::AlignLeft|TQt::WordBreak);
lbl->setMinimumHeight(lbl->fontMetrics().height()*2);
vlyr->addWidget(lbl);
vlyr->addWidget(d->currentFormActionsListView);
d->secondAnd3rdColumnStack->addWidget(d->currentFormActionsPageWidget);
- connect(d->currentFormActionsListView, SIGNAL(executed(QListViewItem*)),
- this, SLOT(slotCurrentFormActionItemExecuted(QListViewItem*)));
- connect( d->currentFormActionsListView, SIGNAL(selectionChanged(QListViewItem*)),
- this, SLOT(slotCurrentFormActionItemSelected(QListViewItem*)));
+ connect(d->currentFormActionsListView, TQT_SIGNAL(executed(TQListViewItem*)),
+ this, TQT_SLOT(slotCurrentFormActionItemExecuted(TQListViewItem*)));
+ connect( d->currentFormActionsListView, TQT_SIGNAL(selectionChanged(TQListViewItem*)),
+ this, TQT_SLOT(slotCurrentFormActionItemSelected(TQListViewItem*)));
}
d->setActionToExecuteSectionVisible(false);
d->raiseWidget(d->currentFormActionsPageWidget);
@@ -635,7 +635,7 @@ void KexiActionSelectionDialog::slotActionCategorySelected(QListViewItem* item)
d->setActionToExecuteSectionVisible(false);
}
d->actionCategoriesListView->update();
- updateOKButtonStatus();
+ updateOKButtontqStatus();
return;
}
// other case
@@ -656,7 +656,7 @@ void KexiActionSelectionDialog::slotActionCategorySelected(QListViewItem* item)
d->raiseWidget( d->secondAnd3rdColumnMainWidget );
}
d->actionCategoriesListView->update();
- updateOKButtonStatus();
+ updateOKButtontqStatus();
}
KexiMainWindow* KexiActionSelectionDialog::mainWin() const
@@ -673,14 +673,14 @@ KexiFormEventAction::ActionData KexiActionSelectionDialog::currentAction() const
if (simpleItem) {
if (simpleItem->data == "kaction") {
if (d->kactionListView->selectedItem()) {
- data.string = QString("kaction:")
+ data.string = TQString("kaction:")
+ dynamic_cast<ActionSelectorDialogListItem*>( d->kactionListView->selectedItem() )->data;
return data;
}
}
else if (simpleItem->data == "currentForm") {
if (d->currentFormActionsListView->selectedItem()) {
- data.string = QString("currentForm:")
+ data.string = TQString("currentForm:")
+ dynamic_cast<ActionSelectorDialogListItem*>(
d->currentFormActionsListView->selectedItem() )->data;
return data;
@@ -696,7 +696,7 @@ KexiFormEventAction::ActionData KexiActionSelectionDialog::currentAction() const
KexiPart::Info* partInfo = partItem ? Kexi::partManager().infoForMimeType( partItem->mimeType() ) : 0;
if (partInfo) {
// opening or executing: table:name, query:name, form:name, macro:name, script:name, etc.
- data.string = QString("%1:%2").arg(partInfo->objectName()).arg(partItem->name());
+ data.string = TQString("%1:%2").tqarg(partInfo->objectName()).tqarg(partItem->name());
data.option = actionToExecute->data;
return data;
}
@@ -705,15 +705,15 @@ KexiFormEventAction::ActionData KexiActionSelectionDialog::currentAction() const
return data; // No Action
}
-void KexiActionSelectionDialog::updateOKButtonStatus()
+void KexiActionSelectionDialog::updateOKButtontqStatus()
{
- QPushButton *btn = actionButton(Ok);
+ TQPushButton *btn = actionButton(Ok);
ActionSelectorDialogListItem *simpleItem = dynamic_cast<ActionSelectorDialogListItem*>(
d->actionCategoriesListView->selectedItem());
btn->setEnabled( (simpleItem && simpleItem->data == "noaction") || !currentAction().isEmpty() );
}
-bool KexiActionSelectionDialog::eventFilter(QObject *o, QEvent *e)
+bool KexiActionSelectionDialog::eventFilter(TQObject *o, TQEvent *e)
{
if (d->hideActionToExecuteListView)
return true;