Use new TQ_METHOD, TQ_SIGNAL, TQ_SLOT defines

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/14/head
Michele Calgaro 4 months ago
parent d343e30ff1
commit fb3d13c23b
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -66,7 +66,7 @@ int main(int argc, char **argv)
MainWindow *win = new MainWindow;
app.setMainWidget(win);
app.connect(&app, TQT_SIGNAL(lastWindowClosed()), TQT_SLOT(quit()));
app.connect(&app, TQ_SIGNAL(lastWindowClosed()), TQ_SLOT(quit()));
win->show();
win->resize(500, 300);

@ -36,8 +36,8 @@ ListView::ListView(TQWidget *parent, const char *name) :
setResizeMode(LastColumn);
setDragEnabled(true);
connect(this, TQT_SIGNAL(contextMenuRequested(TQListViewItem *, const TQPoint &, int)),
TQT_SLOT(rightClicked(TQListViewItem *, const TQPoint &)));
connect(this, TQ_SIGNAL(contextMenuRequested(TQListViewItem *, const TQPoint &, int)),
TQ_SLOT(rightClicked(TQListViewItem *, const TQPoint &)));
}
TQDragObject *ListView::dragObject()
@ -70,8 +70,8 @@ void ListView::enablePopupHandler(bool enable)
m_menu = new TDEPopupMenu(this);
m_removeSingleId = m_menu->insertItem(removeItemString(), this, TQT_SLOT(removeSelected()));
m_removeAllId = m_menu->insertItem("Placeholder", this, TQT_SLOT(removeAllItems()));
m_removeSingleId = m_menu->insertItem(removeItemString(), this, TQ_SLOT(removeSelected()));
m_removeAllId = m_menu->insertItem("Placeholder", this, TQ_SLOT(removeAllItems()));
}
else {
delete m_menu;

@ -233,16 +233,16 @@ Editor::Editor( TQWidget* parent, const char* name ):
setTabChangesFocus( true );
setLinkUnderline( false );
connect( d->completion, TQT_SIGNAL( selectedCompletion( const TQString& ) ),
TQT_SLOT( autoComplete( const TQString& ) ) );
connect( this, TQT_SIGNAL( textChanged() ), TQT_SLOT( checkAutoComplete() ) );
connect( d->completionTimer, TQT_SIGNAL( timeout() ), TQT_SLOT( triggerAutoComplete() ) );
connect( this, TQT_SIGNAL( textChanged() ), TQT_SLOT( checkMatching() ) );
connect( d->matchingTimer, TQT_SIGNAL( timeout() ), TQT_SLOT( doMatchingLeft() ) );
connect( d->matchingTimer, TQT_SIGNAL( timeout() ), TQT_SLOT( doMatchingRight() ) );
connect( this, TQT_SIGNAL( textChanged() ), TQT_SLOT( checkAutoCalc() ) );
connect( d->autoCalcTimer, TQT_SIGNAL( timeout() ), TQT_SLOT( autoCalc() ) );
connect( d->completion, TQ_SIGNAL( selectedCompletion( const TQString& ) ),
TQ_SLOT( autoComplete( const TQString& ) ) );
connect( this, TQ_SIGNAL( textChanged() ), TQ_SLOT( checkAutoComplete() ) );
connect( d->completionTimer, TQ_SIGNAL( timeout() ), TQ_SLOT( triggerAutoComplete() ) );
connect( this, TQ_SIGNAL( textChanged() ), TQ_SLOT( checkMatching() ) );
connect( d->matchingTimer, TQ_SIGNAL( timeout() ), TQ_SLOT( doMatchingLeft() ) );
connect( d->matchingTimer, TQ_SIGNAL( timeout() ), TQ_SLOT( doMatchingRight() ) );
connect( this, TQ_SIGNAL( textChanged() ), TQ_SLOT( checkAutoCalc() ) );
connect( d->autoCalcTimer, TQ_SIGNAL( timeout() ), TQ_SLOT( autoCalc() ) );
d->autoCalcLabel = new CalcResultLabel( 0, "autocalc", WStyle_StaysOnTop |
WStyle_Customize | WStyle_NoBorder | WStyle_Tool | WX11BypassWM );
d->autoCalcLabel->setFrameStyle( TQFrame::Plain | TQFrame::Box );
@ -639,7 +639,7 @@ void Editor::autoCalc()
d->autoCalcLabel->raise();
// do not show it forever
TQTimer::singleShot( 5000, d->autoCalcLabel, TQT_SLOT( hide()) );
TQTimer::singleShot( 5000, d->autoCalcLabel, TQ_SLOT( hide()) );
}
else
{
@ -850,7 +850,7 @@ void EditorCompletion::showCompletion( const TQStringList &choices )
if(!shown)
{
d->completionPopup->show();
TQTimer::singleShot ( 0, this, TQT_SLOT(moveCompletionPopup()) );
TQTimer::singleShot ( 0, this, TQ_SLOT(moveCompletionPopup()) );
}
else
{

@ -82,12 +82,12 @@ MainWindow::MainWindow() : TDEMainWindow(0, "abakus-mainwindow"), m_popup(0), m_
buttonGroup->insert(m_degrees);
buttonGroupLayout->addWidget(m_degrees);
slotDegrees();
connect(m_degrees, TQT_SIGNAL(clicked()), TQT_SLOT(slotDegrees()));
connect(m_degrees, TQ_SIGNAL(clicked()), TQ_SLOT(slotDegrees()));
m_radians = new TQRadioButton(i18n("&Radians"), buttonGroupBox);
buttonGroup->insert(m_radians);
buttonGroupLayout->addWidget(m_radians);
connect(m_radians, TQT_SIGNAL(clicked()), TQT_SLOT(slotRadians()));
connect(m_radians, TQ_SIGNAL(clicked()), TQ_SLOT(slotRadians()));
m_history = new TQVBox(box);
layout->addWidget(m_history);
@ -97,10 +97,10 @@ MainWindow::MainWindow() : TDEMainWindow(0, "abakus-mainwindow"), m_popup(0), m_
m_result = new ResultListView(m_history);
m_result->setSelectionMode(TQListView::NoSelection);
m_result->setHScrollBarMode(ResultListView::AlwaysOff);
connect(m_result, TQT_SIGNAL(signalEntrySelected(const TQString &)),
TQT_SLOT(slotEntrySelected(const TQString &)));
connect(m_result, TQT_SIGNAL(signalResultSelected(const TQString &)),
TQT_SLOT(slotResultSelected(const TQString &)));
connect(m_result, TQ_SIGNAL(signalEntrySelected(const TQString &)),
TQ_SLOT(slotEntrySelected(const TQString &)));
connect(m_result, TQ_SIGNAL(signalResultSelected(const TQString &)),
TQ_SLOT(slotResultSelected(const TQString &)));
m_history->setStretchFactor(m_result, 1);
layout->setStretchFactor(m_history, 1);
@ -115,10 +115,10 @@ MainWindow::MainWindow() : TDEMainWindow(0, "abakus-mainwindow"), m_popup(0), m_
KPushButton *evalButton = new KPushButton(i18n("&Evaluate"), editBox);
connect(evalButton, TQT_SIGNAL(clicked()), TQT_SLOT(slotEvaluate()));
connect(evalButton, TQ_SIGNAL(clicked()), TQ_SLOT(slotEvaluate()));
connect(m_edit, TQT_SIGNAL(returnPressed()), TQT_SLOT(slotReturnPressed()));
connect(m_edit, TQT_SIGNAL(textChanged()), TQT_SLOT(slotTextChanged()));
connect(m_edit, TQ_SIGNAL(returnPressed()), TQ_SLOT(slotReturnPressed()));
connect(m_edit, TQ_SIGNAL(textChanged()), TQ_SLOT(slotTextChanged()));
m_listSplitter = new TQSplitter(TQt::Vertical, m_mainSplitter);
m_fnList = new FunctionListView(m_listSplitter);
@ -129,17 +129,17 @@ MainWindow::MainWindow() : TDEMainWindow(0, "abakus-mainwindow"), m_popup(0), m_
m_varList->addColumn("Variables");
m_varList->addColumn("Value");
connect(FunctionManager::instance(), TQT_SIGNAL(signalFunctionAdded(const TQString &)),
this, TQT_SLOT(slotNewFunction(const TQString &)));
connect(FunctionManager::instance(), TQT_SIGNAL(signalFunctionRemoved(const TQString &)),
this, TQT_SLOT(slotRemoveFunction(const TQString &)));
connect(FunctionManager::instance(), TQ_SIGNAL(signalFunctionAdded(const TQString &)),
this, TQ_SLOT(slotNewFunction(const TQString &)));
connect(FunctionManager::instance(), TQ_SIGNAL(signalFunctionRemoved(const TQString &)),
this, TQ_SLOT(slotRemoveFunction(const TQString &)));
connect(ValueManager::instance(), TQT_SIGNAL(signalValueAdded(const TQString &, Abakus::number_t)),
this, TQT_SLOT(slotNewValue(const TQString &, Abakus::number_t)));
connect(ValueManager::instance(), TQT_SIGNAL(signalValueChanged(const TQString &, Abakus::number_t)),
this, TQT_SLOT(slotChangeValue(const TQString &, Abakus::number_t)));
connect(ValueManager::instance(), TQT_SIGNAL(signalValueRemoved(const TQString &)),
this, TQT_SLOT(slotRemoveValue(const TQString &)));
connect(ValueManager::instance(), TQ_SIGNAL(signalValueAdded(const TQString &, Abakus::number_t)),
this, TQ_SLOT(slotNewValue(const TQString &, Abakus::number_t)));
connect(ValueManager::instance(), TQ_SIGNAL(signalValueChanged(const TQString &, Abakus::number_t)),
this, TQ_SLOT(slotChangeValue(const TQString &, Abakus::number_t)));
connect(ValueManager::instance(), TQ_SIGNAL(signalValueRemoved(const TQString &)),
this, TQ_SLOT(slotRemoveValue(const TQString &)));
setupLayout();
@ -228,7 +228,7 @@ void MainWindow::slotReturnPressed()
// Skip creating list view items if in compact mode.
if(!m_history->isShown()) {
m_edit->setText(resultVal);
TQTimer::singleShot(0, m_edit, TQT_SLOT(selectAll()));
TQTimer::singleShot(0, m_edit, TQ_SLOT(selectAll()));
return;
}
@ -276,7 +276,7 @@ void MainWindow::slotReturnPressed()
// Skip creating list view items if in compact mode.
if(compact) {
m_edit->setText(resultVal);
TQTimer::singleShot(0, m_edit, TQT_SLOT(selectAll()));
TQTimer::singleShot(0, m_edit, TQ_SLOT(selectAll()));
return;
}
@ -287,7 +287,7 @@ void MainWindow::slotReturnPressed()
m_result->setCurrentItem(item);
m_result->ensureItemVisible(item);
TQTimer::singleShot(0, m_edit, TQT_SLOT(selectAll()));
TQTimer::singleShot(0, m_edit, TQ_SLOT(selectAll()));
}
void MainWindow::slotTextChanged()
@ -411,7 +411,7 @@ void MainWindow::loadConfig()
action<TDEToggleAction>("toggleCompactMode")->setChecked(compactMode);
if(compactMode)
TQTimer::singleShot(0, this, TQT_SLOT(slotToggleCompactMode()));
TQTimer::singleShot(0, this, TQ_SLOT(slotToggleCompactMode()));
}
{
@ -503,60 +503,60 @@ void MainWindow::setupLayout()
{
TDEActionCollection *ac = actionCollection();
KStdAction::quit(kapp, TQT_SLOT(quit()), ac);
KStdAction::showMenubar(this, TQT_SLOT(slotToggleMenuBar()), ac);
KStdAction::quit(kapp, TQ_SLOT(quit()), ac);
KStdAction::showMenubar(this, TQ_SLOT(slotToggleMenuBar()), ac);
TDEToggleAction *ta = new TDEToggleAction(i18n("&Degrees"), SHIFT + ALT + Key_D, this, TQT_SLOT(slotDegrees()), ac, "setDegreesMode");
TDEToggleAction *ta = new TDEToggleAction(i18n("&Degrees"), SHIFT + ALT + Key_D, this, TQ_SLOT(slotDegrees()), ac, "setDegreesMode");
ta->setExclusiveGroup("TrigMode");
ta->setChecked(trigMode() == Abakus::Degrees);
ta = new TDEToggleAction(i18n("&Radians"), SHIFT + ALT + Key_R, this, TQT_SLOT(slotRadians()), ac, "setRadiansMode");
ta = new TDEToggleAction(i18n("&Radians"), SHIFT + ALT + Key_R, this, TQ_SLOT(slotRadians()), ac, "setRadiansMode");
ta->setExclusiveGroup("TrigMode");
ta->setChecked(trigMode() == Abakus::Radians);
ta = new TDEToggleAction(i18n("Show &History List"), SHIFT + ALT + Key_H, this, TQT_SLOT(slotToggleHistoryList()), ac, "toggleHistoryList");
ta = new TDEToggleAction(i18n("Show &History List"), SHIFT + ALT + Key_H, this, TQ_SLOT(slotToggleHistoryList()), ac, "toggleHistoryList");
ta->setChecked(true);
ta = new TDEToggleAction(i18n("Show &Variables"), SHIFT + ALT + Key_V, this, TQT_SLOT(slotToggleVariableList()), ac, "toggleVariableList");
ta = new TDEToggleAction(i18n("Show &Variables"), SHIFT + ALT + Key_V, this, TQ_SLOT(slotToggleVariableList()), ac, "toggleVariableList");
ta->setChecked(true);
ta = new TDEToggleAction(i18n("Show &Functions"), SHIFT + ALT + Key_F, this, TQT_SLOT(slotToggleFunctionList()), ac, "toggleFunctionList");
ta = new TDEToggleAction(i18n("Show &Functions"), SHIFT + ALT + Key_F, this, TQ_SLOT(slotToggleFunctionList()), ac, "toggleFunctionList");
ta->setChecked(true);
ta = new TDEToggleAction(i18n("Activate &Compact Mode"), SHIFT + ALT + Key_C, this, TQT_SLOT(slotToggleCompactMode()), ac, "toggleCompactMode");
ta = new TDEToggleAction(i18n("Activate &Compact Mode"), SHIFT + ALT + Key_C, this, TQ_SLOT(slotToggleCompactMode()), ac, "toggleCompactMode");
ta->setChecked(false);
ta = new TDEToggleAction(i18n("Use R&PN Mode"), SHIFT + ALT + Key_P, this, TQT_SLOT(slotToggleExpressionMode()), ac, "toggleExpressionMode");
ta = new TDEToggleAction(i18n("Use R&PN Mode"), SHIFT + ALT + Key_P, this, TQ_SLOT(slotToggleExpressionMode()), ac, "toggleExpressionMode");
ta->setChecked(false);
// Precision actions.
ta = new TDEToggleAction(i18n("&Automatic Precision"), 0, this, TQT_SLOT(slotPrecisionAuto()), ac, "precisionAuto");
ta = new TDEToggleAction(i18n("&Automatic Precision"), 0, this, TQ_SLOT(slotPrecisionAuto()), ac, "precisionAuto");
ta->setExclusiveGroup("Precision");
ta->setChecked(true);
ta = new TDEToggleAction(i18n("&3 Decimal Digits"), 0, this, TQT_SLOT(slotPrecision3()), ac, "precision3");
ta = new TDEToggleAction(i18n("&3 Decimal Digits"), 0, this, TQ_SLOT(slotPrecision3()), ac, "precision3");
ta->setExclusiveGroup("Precision");
ta->setChecked(false);
ta = new TDEToggleAction(i18n("&8 Decimal Digits"), 0, this, TQT_SLOT(slotPrecision8()), ac, "precision8");
ta = new TDEToggleAction(i18n("&8 Decimal Digits"), 0, this, TQ_SLOT(slotPrecision8()), ac, "precision8");
ta->setExclusiveGroup("Precision");
ta->setChecked(false);
ta = new TDEToggleAction(i18n("&15 Decimal Digits"), 0, this, TQT_SLOT(slotPrecision15()), ac, "precision15");
ta = new TDEToggleAction(i18n("&15 Decimal Digits"), 0, this, TQ_SLOT(slotPrecision15()), ac, "precision15");
ta->setExclusiveGroup("Precision");
ta->setChecked(false);
ta = new TDEToggleAction(i18n("&50 Decimal Digits"), 0, this, TQT_SLOT(slotPrecision50()), ac, "precision50");
ta = new TDEToggleAction(i18n("&50 Decimal Digits"), 0, this, TQ_SLOT(slotPrecision50()), ac, "precision50");
ta->setExclusiveGroup("Precision");
ta->setChecked(false);
ta = new TDEToggleAction(i18n("C&ustom Precision..."), 0, this, TQT_SLOT(slotPrecisionCustom()), ac, "precisionCustom");
ta = new TDEToggleAction(i18n("C&ustom Precision..."), 0, this, TQ_SLOT(slotPrecisionCustom()), ac, "precisionCustom");
ta->setExclusiveGroup("Precision");
ta->setChecked(false);
new TDEAction(i18n("Clear &History"), "edit-clear", SHIFT + ALT + Key_L, m_result, TQT_SLOT(clear()), ac, "clearHistory");
new TDEAction(i18n("Clear &History"), "edit-clear", SHIFT + ALT + Key_L, m_result, TQ_SLOT(clear()), ac, "clearHistory");
new TDEAction(i18n("Select Editor"), "goto", Key_F6, m_edit, TQT_SLOT(setFocus()), ac, "select_edit");
new TDEAction(i18n("Select Editor"), "goto", Key_F6, m_edit, TQ_SLOT(setFocus()), ac, "select_edit");
}
void MainWindow::populateListViews()
@ -682,7 +682,7 @@ void MainWindow::slotToggleCompactMode()
m_oldSize = size();
m_newSize = TQSize(0, 0);
TQTimer::singleShot(0, this, TQT_SLOT(slotUpdateSize()));
TQTimer::singleShot(0, this, TQ_SLOT(slotUpdateSize()));
}
else {
m_fnList->setShown(m_wasFnShown);
@ -694,7 +694,7 @@ void MainWindow::slotToggleCompactMode()
action<TDEToggleAction>("toggleHistoryList")->setChecked(m_wasHistoryShown);
m_newSize = m_oldSize;
TQTimer::singleShot(0, this, TQT_SLOT(slotUpdateSize()));
TQTimer::singleShot(0, this, TQ_SLOT(slotUpdateSize()));
}
}

@ -37,8 +37,8 @@ using namespace ResultList;
ResultListView::ResultListView(TQWidget *parent, const char *name) :
TDEListView(parent, name), m_itemRightClicked(0)
{
connect(this, TQT_SIGNAL(doubleClicked(TQListViewItem *, const TQPoint &, int)),
TQT_SLOT(slotDoubleClicked(TQListViewItem *, const TQPoint &, int)));
connect(this, TQ_SIGNAL(doubleClicked(TQListViewItem *, const TQPoint &, int)),
TQ_SLOT(slotDoubleClicked(TQListViewItem *, const TQPoint &, int)));
addColumn(i18n("Expression"));
addColumn(i18n("Result"));
@ -115,9 +115,9 @@ TDEPopupMenu *ResultListView::constructPopupMenu(const ResultListViewText *item)
{
TDEPopupMenu *menu = new TDEPopupMenu(this, "list view context menu");
menu->insertItem(i18n("Clear &History"), this, TQT_SLOT(clear()), ALT+Key_R);
menu->insertItem(i18n("Clear &History"), this, TQ_SLOT(clear()), ALT+Key_R);
int id = menu->insertItem(i18n("Copy Result to Clipboard"), this, TQT_SLOT(slotCopyResult()));
int id = menu->insertItem(i18n("Copy Result to Clipboard"), this, TQ_SLOT(slotCopyResult()));
if(!item || item->wasError())
menu->setItemEnabled(id, false);

Loading…
Cancel
Save