diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-22 00:30:31 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-22 00:30:31 +0000 |
commit | 69cac65817d949cda2672ec4f0aa73d5e66a0ba1 (patch) | |
tree | 073fde0496ea90eb5bf5cffe66a8da43a9f55fbc /kdict/matchview.cpp | |
parent | 3467e6464beac3a162839bf7078e22e3a74d73e7 (diff) | |
download | tdenetwork-69cac65817d949cda2672ec4f0aa73d5e66a0ba1.tar.gz tdenetwork-69cac65817d949cda2672ec4f0aa73d5e66a0ba1.zip |
TQt4 port kdenetwork
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1237912 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kdict/matchview.cpp')
-rw-r--r-- | kdict/matchview.cpp | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/kdict/matchview.cpp b/kdict/matchview.cpp index 869ea383..e633c2a2 100644 --- a/kdict/matchview.cpp +++ b/kdict/matchview.cpp @@ -96,22 +96,22 @@ void MatchViewItem::setOpen(bool o) } -void MatchViewItem::paintCell(TQPainter *p, const TQColorGroup &cg, int column, int width, int alignment) +void MatchViewItem::paintCell(TQPainter *p, const TQColorGroup &cg, int column, int width, int tqalignment) { if(command.isEmpty()) { TQFont font=p->font(); font.setBold(true); p->setFont(font); } - TQListViewItem::paintCell(p,cg,column,width,alignment); + TQListViewItem::paintCell(p,cg,column,width,tqalignment); } //********* MatchView ****************************************** -MatchView::MatchView(TQWidget *parent, const char *name) - : TQWidget(parent,name),getOn(false),getAllOn(false) +MatchView::MatchView(TQWidget *tqparent, const char *name) + : TQWidget(tqparent,name),getOn(false),getAllOn(false) { setCaption(kapp->makeStdCaption(i18n("Match List"))); @@ -119,13 +119,13 @@ MatchView::MatchView(TQWidget *parent, const char *name) boxLayout->addSpacing(1); w_strat = new TQComboBox(false,this); - w_strat->setFixedHeight(w_strat->sizeHint().height()); + w_strat->setFixedHeight(w_strat->tqsizeHint().height()); connect(w_strat,TQT_SIGNAL(activated(int)),this,TQT_SLOT(strategySelected(int))); boxLayout->addWidget(w_strat,0); boxLayout->addSpacing(1); w_list = new TQListView(this); - w_list->setFocusPolicy(TQWidget::StrongFocus); + w_list->setFocusPolicy(TQ_StrongFocus); w_list->header()->hide(); w_list->addColumn("foo"); w_list->setColumnWidthMode(0,TQListView::Maximum); @@ -133,7 +133,7 @@ MatchView::MatchView(TQWidget *parent, const char *name) w_list->setSelectionMode(TQListView::Extended); w_list->setTreeStepSize(18); w_list->setSorting(-1); // disable sorting - w_list->setMinimumHeight(w_strat->sizeHint().height()); + w_list->setMinimumHeight(w_strat->tqsizeHint().height()); connect(w_list,TQT_SIGNAL(selectionChanged()),TQT_SLOT(enableGetButton())); connect(w_list,TQT_SIGNAL(returnPressed(TQListViewItem *)),TQT_SLOT(returnPressed(TQListViewItem *))); connect(w_list,TQT_SIGNAL(doubleClicked(TQListViewItem *)),TQT_SLOT(getOneItem(TQListViewItem *))); @@ -144,15 +144,15 @@ MatchView::MatchView(TQWidget *parent, const char *name) boxLayout->addSpacing(1); w_get = new TQPushButton(i18n("&Get Selected"),this); - w_get->setFixedHeight(w_get->sizeHint().height()-3); - w_get->setMinimumWidth(w_get->sizeHint().width()-20); + w_get->setFixedHeight(w_get->tqsizeHint().height()-3); + w_get->setMinimumWidth(w_get->tqsizeHint().width()-20); w_get->setEnabled(false); connect(w_get, TQT_SIGNAL(clicked()), this, TQT_SLOT(getSelected())); boxLayout->addWidget(w_get,0); w_getAll = new TQPushButton(i18n("Get &All"),this); - w_getAll->setFixedHeight(w_getAll->sizeHint().height()-3); - w_getAll->setMinimumWidth(w_getAll->sizeHint().width()-20); + w_getAll->setFixedHeight(w_getAll->tqsizeHint().height()-3); + w_getAll->setMinimumWidth(w_getAll->tqsizeHint().width()-20); w_getAll->setEnabled(false); connect(w_getAll, TQT_SIGNAL(clicked()), this, TQT_SLOT(getAll())); boxLayout->addWidget(w_getAll,0); @@ -176,7 +176,7 @@ void MatchView::updateStrategyCombo() bool MatchView::selectStrategy(const TQString &strategy) const { - int newCurrent = global->strategies.findIndex(strategy); + int newCurrent = global->strategies.tqfindIndex(strategy); if (newCurrent == -1) return false; else { @@ -217,7 +217,7 @@ void MatchView::enableGetButton() void MatchView::mouseButtonPressed(int button, TQListViewItem *, const TQPoint &, int) { - if (button == MidButton) + if (button == Qt::MidButton) emit(clipboardRequested()); } @@ -232,7 +232,7 @@ void MatchView::getOneItem(TQListViewItem *i) { TQStringList defines; - if ((!i->childCount())&&(i->parent())) + if ((!i->childCount())&&(i->tqparent())) defines.append(((MatchViewItem *)(i))->command); else { i = i->firstChild(); @@ -310,7 +310,7 @@ void MatchView::doGet(TQStringList &defines) if (defines.count() > 0) { if (defines.count() > global->maxDefinitions) { KMessageBox::sorry(global->topLevel,i18n("You have selected %1 definitions,\nbut Kdict will fetch only the first %2 definitions.\nYou can modify this limit in the Preferences Dialog.") - .arg(defines.count()).arg(global->maxDefinitions)); + .tqarg(defines.count()).tqarg(global->maxDefinitions)); while (defines.count()>global->maxDefinitions) defines.pop_back(); } @@ -368,7 +368,7 @@ void MatchView::newList(const TQStringList &matches) } w_list->setUpdatesEnabled(true); - w_list->repaint(); + w_list->tqrepaint(); w_list->setFocus(); } @@ -378,7 +378,7 @@ void MatchView::buildPopupMenu(TQListViewItem *i, const TQPoint &_point, int) { rightBtnMenu->clear(); - if ((i!=0L)&&(i->isExpandable()||i->parent())) { + if ((i!=0L)&&(i->isExpandable()||i->tqparent())) { popupCurrent = (MatchViewItem *)(i); rightBtnMenu->insertItem(i18n("&Get"),this,TQT_SLOT(popupGetCurrent())); if (!i->isExpandable()) { // toplevel item -> only "get" @@ -388,14 +388,14 @@ void MatchView::buildPopupMenu(TQListViewItem *i, const TQPoint &_point, int) rightBtnMenu->insertSeparator(); } - kapp->clipboard()->setSelectionMode(false); - TQString text = kapp->clipboard()->text(); + kapp->tqclipboard()->setSelectionMode(false); + TQString text = kapp->tqclipboard()->text(); if (text.isEmpty()) { - kapp->clipboard()->setSelectionMode(true); - text = kapp->clipboard()->text(); + kapp->tqclipboard()->setSelectionMode(true); + text = kapp->tqclipboard()->text(); } if (!text.isEmpty()) { - popupClip = kapp->clipboard()->text(); + popupClip = kapp->tqclipboard()->text(); rightBtnMenu->insertItem(i18n("Match &Clipboard Content"),this,TQT_SLOT(popupMatchClip())); rightBtnMenu->insertItem(SmallIcon("define_clip"),i18n("D&efine Clipboard Content"),this,TQT_SLOT(popupDefineClip())); rightBtnMenu->insertSeparator(); |