Use new TQ_METHOD, TQ_SIGNAL, TQ_SLOT defines

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/6/head
Michele Calgaro 11 months ago
parent e867c97d48
commit ad963f6e62
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -48,17 +48,17 @@ ApplicationWindow::ApplicationWindow()
openIcon = TQPixmap( fileopen ); openIcon = TQPixmap( fileopen );
TQToolButton * fileOpen TQToolButton * fileOpen
= new TQToolButton( openIcon, "Open File", TQString(), = new TQToolButton( openIcon, "Open File", TQString(),
this, TQT_SLOT(choose()), fileTools, "open file" ); this, TQ_SLOT(choose()), fileTools, "open file" );
saveIcon = TQPixmap( filesave ); saveIcon = TQPixmap( filesave );
TQToolButton * fileSave TQToolButton * fileSave
= new TQToolButton( saveIcon, "Save File", TQString(), = new TQToolButton( saveIcon, "Save File", TQString(),
this, TQT_SLOT(save()), fileTools, "save file" ); this, TQ_SLOT(save()), fileTools, "save file" );
printIcon = TQPixmap( fileprint ); printIcon = TQPixmap( fileprint );
TQToolButton * filePrint TQToolButton * filePrint
= new TQToolButton( printIcon, "Print File", TQString(), = new TQToolButton( printIcon, "Print File", TQString(),
this, TQT_SLOT(print()), fileTools, "print file" ); this, TQ_SLOT(print()), fileTools, "print file" );
(void)TQWhatsThis::whatsThisButton( fileTools ); (void)TQWhatsThis::whatsThisButton( fileTools );
@ -91,41 +91,41 @@ ApplicationWindow::ApplicationWindow()
menuBar()->insertItem( "&File", file ); menuBar()->insertItem( "&File", file );
file->insertItem( "&New", this, TQT_SLOT(newDoc()), CTRL+Key_N ); file->insertItem( "&New", this, TQ_SLOT(newDoc()), CTRL+Key_N );
int id; int id;
id = file->insertItem( openIcon, "&Open...", id = file->insertItem( openIcon, "&Open...",
this, TQT_SLOT(choose()), CTRL+Key_O ); this, TQ_SLOT(choose()), CTRL+Key_O );
file->setWhatsThis( id, fileOpenText ); file->setWhatsThis( id, fileOpenText );
id = file->insertItem( saveIcon, "&Save", id = file->insertItem( saveIcon, "&Save",
this, TQT_SLOT(save()), CTRL+Key_S ); this, TQ_SLOT(save()), CTRL+Key_S );
file->setWhatsThis( id, fileSaveText ); file->setWhatsThis( id, fileSaveText );
id = file->insertItem( "Save &As...", this, TQT_SLOT(saveAs()) ); id = file->insertItem( "Save &As...", this, TQ_SLOT(saveAs()) );
file->setWhatsThis( id, fileSaveText ); file->setWhatsThis( id, fileSaveText );
file->insertSeparator(); file->insertSeparator();
id = file->insertItem( printIcon, "&Print...", id = file->insertItem( printIcon, "&Print...",
this, TQT_SLOT(print()), CTRL+Key_P ); this, TQ_SLOT(print()), CTRL+Key_P );
file->setWhatsThis( id, filePrintText ); file->setWhatsThis( id, filePrintText );
file->insertSeparator(); file->insertSeparator();
file->insertItem( "&Close", this, TQT_SLOT(close()), CTRL+Key_W ); file->insertItem( "&Close", this, TQ_SLOT(close()), CTRL+Key_W );
file->insertItem( "&Quit", tqApp, TQT_SLOT( closeAllWindows() ), CTRL+Key_Q ); file->insertItem( "&Quit", tqApp, TQ_SLOT( closeAllWindows() ), CTRL+Key_Q );
menuBar()->insertSeparator(); menuBar()->insertSeparator();
TQPopupMenu * help = new TQPopupMenu( this ); TQPopupMenu * help = new TQPopupMenu( this );
menuBar()->insertItem( "&Help", help ); menuBar()->insertItem( "&Help", help );
help->insertItem( "&About", this, TQT_SLOT(about()), Key_F1 ); help->insertItem( "&About", this, TQ_SLOT(about()), Key_F1 );
help->insertItem( "About &TQt", this, TQT_SLOT(aboutTQt()) ); help->insertItem( "About &TQt", this, TQ_SLOT(aboutTQt()) );
help->insertSeparator(); help->insertSeparator();
help->insertItem( "What's &This", this, TQT_SLOT(whatsThis()), SHIFT+Key_F1 ); help->insertItem( "What's &This", this, TQ_SLOT(whatsThis()), SHIFT+Key_F1 );
e = new TQextScintilla( this, "editor" ); e = new TQextScintilla( this, "editor" );
e->setFocus(); e->setFocus();

@ -16,6 +16,6 @@ int main( int argc, char ** argv ) {
ApplicationWindow *mw = new ApplicationWindow(); ApplicationWindow *mw = new ApplicationWindow();
mw->setCaption( "TQScintilla Example - Application" ); mw->setCaption( "TQScintilla Example - Application" );
mw->show(); mw->show();
a.connect( &a, TQT_SIGNAL(lastWindowClosed()), &a, TQT_SLOT(quit()) ); a.connect( &a, TQ_SIGNAL(lastWindowClosed()), &a, TQ_SLOT(quit()) );
return a.exec(); return a.exec();
} }

@ -308,11 +308,11 @@ SciListBox::SciListBox(TQWidget *parent,ListBoxX *lbx_)
setFrameShadow(Plain); setFrameShadow(Plain);
setHScrollBarMode(AlwaysOff); setHScrollBarMode(AlwaysOff);
connect(this,TQT_SIGNAL(doubleClicked(TQListBoxItem *)), connect(this,TQ_SIGNAL(doubleClicked(TQListBoxItem *)),
TQT_SLOT(handleDoubleClick(TQListBoxItem *))); TQ_SLOT(handleDoubleClick(TQListBoxItem *)));
connect(this,TQT_SIGNAL(highlighted(TQListBoxItem *)), connect(this,TQ_SIGNAL(highlighted(TQListBoxItem *)),
TQT_SLOT(ensureCurrentVisible())); TQ_SLOT(ensureCurrentVisible()));
} }

@ -93,7 +93,7 @@ ScintillaTQt::ScintillaTQt(TQextScintillaBase *tqsb_) :
// We aren't a TQObject so we use the API class to do TQObject related // We aren't a TQObject so we use the API class to do TQObject related
// things for us. // things for us.
tqsb -> connect(&qtimer,TQT_SIGNAL(timeout()),TQT_SLOT(handleTimer())); tqsb -> connect(&qtimer,TQ_SIGNAL(timeout()),TQ_SLOT(handleTimer()));
Initialise(); Initialise();
} }
@ -595,7 +595,7 @@ void ScintillaTQt::AddToPopUp(const char *label,int cmd,bool enabled)
{ {
TQString tr_label = tqApp -> translate("ContextMenu",label); TQString tr_label = tqApp -> translate("ContextMenu",label);
pm -> insertItem(tr_label,tqsb,TQT_SLOT(handlePopUp(int)),0,cmd); pm -> insertItem(tr_label,tqsb,TQ_SLOT(handlePopUp(int)),0,cmd);
pm -> setItemEnabled(cmd,enabled); pm -> setItemEnabled(cmd,enabled);
} }
else else

@ -57,27 +57,27 @@ TQextScintilla::TQextScintilla(TQWidget *parent,const char *name,WFlags f)
showSingle(FALSE), modified(FALSE), explicit_fillups(FALSE), showSingle(FALSE), modified(FALSE), explicit_fillups(FALSE),
fillups_enabled(FALSE), saved_fillups("") fillups_enabled(FALSE), saved_fillups("")
{ {
connect(this,TQT_SIGNAL(SCN_MODIFYATTEMPTRO()), connect(this,TQ_SIGNAL(SCN_MODIFYATTEMPTRO()),
TQT_SIGNAL(modificationAttempted())); TQ_SIGNAL(modificationAttempted()));
connect(this,TQT_SIGNAL(SCN_MODIFIED(int,int,const char *,int,int,int,int,int)), connect(this,TQ_SIGNAL(SCN_MODIFIED(int,int,const char *,int,int,int,int,int)),
TQT_SLOT(handleModified(int,int,const char *,int,int,int,int,int))); TQ_SLOT(handleModified(int,int,const char *,int,int,int,int,int)));
connect(this,TQT_SIGNAL(SCN_CALLTIPCLICK(int)), connect(this,TQ_SIGNAL(SCN_CALLTIPCLICK(int)),
TQT_SLOT(handleCallTipClick(int))); TQ_SLOT(handleCallTipClick(int)));
connect(this,TQT_SIGNAL(SCN_CHARADDED(int)), connect(this,TQ_SIGNAL(SCN_CHARADDED(int)),
TQT_SLOT(handleCharAdded(int))); TQ_SLOT(handleCharAdded(int)));
connect(this,TQT_SIGNAL(SCN_MARGINCLICK(int,int,int)), connect(this,TQ_SIGNAL(SCN_MARGINCLICK(int,int,int)),
TQT_SLOT(handleMarginClick(int,int,int))); TQ_SLOT(handleMarginClick(int,int,int)));
connect(this,TQT_SIGNAL(SCN_SAVEPOINTREACHED()), connect(this,TQ_SIGNAL(SCN_SAVEPOINTREACHED()),
TQT_SLOT(handleSavePointReached())); TQ_SLOT(handleSavePointReached()));
connect(this,TQT_SIGNAL(SCN_SAVEPOINTLEFT()), connect(this,TQ_SIGNAL(SCN_SAVEPOINTLEFT()),
TQT_SLOT(handleSavePointLeft())); TQ_SLOT(handleSavePointLeft()));
connect(this,TQT_SIGNAL(SCN_UPDATEUI()), connect(this,TQ_SIGNAL(SCN_UPDATEUI()),
TQT_SLOT(handleUpdateUI())); TQ_SLOT(handleUpdateUI()));
connect(this,TQT_SIGNAL(TQSCN_SELCHANGED(bool)), connect(this,TQ_SIGNAL(TQSCN_SELCHANGED(bool)),
TQT_SLOT(handleSelectionChanged(bool))); TQ_SLOT(handleSelectionChanged(bool)));
connect(this,TQT_SIGNAL(SCN_USERLISTSELECTION(const char *,int)), connect(this,TQ_SIGNAL(SCN_USERLISTSELECTION(const char *,int)),
TQT_SLOT(handleUserListSelection(const char *,int))); TQ_SLOT(handleUserListSelection(const char *,int)));
// Set the default font. // Set the default font.
setFont(TQApplication::font()); setFont(TQApplication::font());
@ -2412,16 +2412,16 @@ void TQextScintilla::setLexer(TQextScintillaLexer *lexer)
SendScintilla(SCI_SETSTYLEBITS,bits); SendScintilla(SCI_SETSTYLEBITS,bits);
connect(lex,TQT_SIGNAL(colorChanged(const TQColor &,int)), connect(lex,TQ_SIGNAL(colorChanged(const TQColor &,int)),
TQT_SLOT(handleStyleColorChange(const TQColor &,int))); TQ_SLOT(handleStyleColorChange(const TQColor &,int)));
connect(lex,TQT_SIGNAL(eolFillChanged(bool,int)), connect(lex,TQ_SIGNAL(eolFillChanged(bool,int)),
TQT_SLOT(handleStyleEolFillChange(bool,int))); TQ_SLOT(handleStyleEolFillChange(bool,int)));
connect(lex,TQT_SIGNAL(fontChanged(const TQFont &,int)), connect(lex,TQ_SIGNAL(fontChanged(const TQFont &,int)),
TQT_SLOT(handleStyleFontChange(const TQFont &,int))); TQ_SLOT(handleStyleFontChange(const TQFont &,int)));
connect(lex,TQT_SIGNAL(paperChanged(const TQColor &,int)), connect(lex,TQ_SIGNAL(paperChanged(const TQColor &,int)),
TQT_SLOT(handleStylePaperChange(const TQColor &,int))); TQ_SLOT(handleStylePaperChange(const TQColor &,int)));
connect(lex,TQT_SIGNAL(propertyChanged(const char *,const char *)), connect(lex,TQ_SIGNAL(propertyChanged(const char *,const char *)),
TQT_SLOT(handlePropertyChange(const char *,const char *))); TQ_SLOT(handlePropertyChange(const char *,const char *)));
SendScintilla(SCI_SETLEXERLANGUAGE,lex -> lexer()); SendScintilla(SCI_SETLEXERLANGUAGE,lex -> lexer());

@ -86,11 +86,11 @@ TQextScintillaBase::TQextScintillaBase(TQWidget *parent,const char *name,WFlags
vsb = new TQScrollBar(TQt::Vertical,this); vsb = new TQScrollBar(TQt::Vertical,this);
layout -> addWidget(vsb,0,1); layout -> addWidget(vsb,0,1);
connect(vsb,TQT_SIGNAL(valueChanged(int)),TQT_SLOT(handleVSb(int))); connect(vsb,TQ_SIGNAL(valueChanged(int)),TQ_SLOT(handleVSb(int)));
hsb = new TQScrollBar(TQt::Horizontal,this); hsb = new TQScrollBar(TQt::Horizontal,this);
layout -> addWidget(hsb,1,0); layout -> addWidget(hsb,1,0);
connect(hsb,TQT_SIGNAL(valueChanged(int)),TQT_SLOT(handleHSb(int))); connect(hsb,TQ_SIGNAL(valueChanged(int)),TQ_SLOT(handleHSb(int)));
txtarea -> installEventFilter(this); txtarea -> installEventFilter(this);
@ -111,7 +111,7 @@ TQextScintillaBase::TQextScintillaBase(TQWidget *parent,const char *name,WFlags
TQClipboard *cb = TQApplication::clipboard(); TQClipboard *cb = TQApplication::clipboard();
if (cb -> supportsSelection()) if (cb -> supportsSelection())
connect(cb,TQT_SIGNAL(selectionChanged()),TQT_SLOT(handleSelection())); connect(cb,TQ_SIGNAL(selectionChanged()),TQ_SLOT(handleSelection()));
// Add it to the pool. // Add it to the pool.
poolList.append(this); poolList.append(this);

@ -220,8 +220,8 @@ void TQextScintillaMacro::startRecording()
macro.clear(); macro.clear();
connect(tqsci, connect(tqsci,
TQT_SIGNAL(SCN_MACRORECORD(unsigned int,unsigned long,long)), TQ_SIGNAL(SCN_MACRORECORD(unsigned int,unsigned long,long)),
TQT_SLOT(record(unsigned int,unsigned long,long))); TQ_SLOT(record(unsigned int,unsigned long,long)));
tqsci -> SendScintilla(TQextScintillaBase::SCI_STARTRECORD); tqsci -> SendScintilla(TQextScintillaBase::SCI_STARTRECORD);
} }

Loading…
Cancel
Save