diff options
author | Michele Calgaro <[email protected]> | 2024-01-04 10:28:49 +0900 |
---|---|---|
committer | Michele Calgaro <[email protected]> | 2024-01-06 19:52:52 +0900 |
commit | 31622296062e9eaafb3429eb84f8780fab22e597 (patch) | |
tree | 7220cbbc37f829f7139b672ae1d2a74cfb7a6d36 /src/noteedit.cpp | |
parent | 50245e3df9d78cdd42e9551fb32a3ea032434b0e (diff) | |
download | basket-31622296062e9eaafb3429eb84f8780fab22e597.tar.gz basket-31622296062e9eaafb3429eb84f8780fab22e597.zip |
Use new TQ_METHOD, TQ_SIGNAL, TQ_SLOT defines
Signed-off-by: Michele Calgaro <[email protected]>
(cherry picked from commit bea15ca3009c2f8505bfa10445c1dc2fc43a4ffe)
Diffstat (limited to 'src/noteedit.cpp')
-rw-r--r-- | src/noteedit.cpp | 98 |
1 files changed, 49 insertions, 49 deletions
diff --git a/src/noteedit.cpp b/src/noteedit.cpp index 6261c6c..a3798e3 100644 --- a/src/noteedit.cpp +++ b/src/noteedit.cpp @@ -149,12 +149,12 @@ TextEditor::TextEditor(TextContent *textContent, TQWidget *parent) textEdit->moveCursor(KTextEdit::MoveEnd, false); // FIXME: Sometimes, the cursor flicker at ends before being positionned where clicked (because kapp->processEvents() I think) textEdit->verticalScrollBar()->setCursor(TQt::ArrowCursor); setInlineEditor(textEdit); - connect( textEdit, TQT_SIGNAL(escapePressed()), this, TQT_SIGNAL(askValidation()) ); - connect( textEdit, TQT_SIGNAL(mouseEntered()), this, TQT_SIGNAL(mouseEnteredEditorWidget()) ); + connect( textEdit, TQ_SIGNAL(escapePressed()), this, TQ_SIGNAL(askValidation()) ); + connect( textEdit, TQ_SIGNAL(mouseEntered()), this, TQ_SIGNAL(mouseEnteredEditorWidget()) ); - connect( textEdit, TQT_SIGNAL(cursorPositionChanged(int, int)), textContent->note()->basket(), TQT_SLOT(editorCursorPositionChanged()) ); + connect( textEdit, TQ_SIGNAL(cursorPositionChanged(int, int)), textContent->note()->basket(), TQ_SLOT(editorCursorPositionChanged()) ); // In case it is a very big note, the top is displayed and Enter is pressed: the cursor is on bottom, we should enure it visible: - TQTimer::singleShot( 0, textContent->note()->basket(), TQT_SLOT(editorCursorPositionChanged()) ); + TQTimer::singleShot( 0, textContent->note()->basket(), TQ_SLOT(editorCursorPositionChanged()) ); } TextEditor::~TextEditor() @@ -220,58 +220,58 @@ HtmlEditor::HtmlEditor(HtmlContent *htmlContent, TQWidget *parent) textEdit->verticalScrollBar()->setCursor(TQt::ArrowCursor); setInlineEditor(textEdit); - connect( textEdit, TQT_SIGNAL(mouseEntered()), this, TQT_SIGNAL(mouseEnteredEditorWidget()) ); - connect( textEdit, TQT_SIGNAL(escapePressed()), this, TQT_SIGNAL(askValidation()) ); + connect( textEdit, TQ_SIGNAL(mouseEntered()), this, TQ_SIGNAL(mouseEnteredEditorWidget()) ); + connect( textEdit, TQ_SIGNAL(escapePressed()), this, TQ_SIGNAL(askValidation()) ); - connect( InlineEditors::instance()->richTextFont, TQT_SIGNAL(textChanged(const TQString&)), textEdit, TQT_SLOT(setFamily(const TQString&)) ); - connect( InlineEditors::instance()->richTextFontSize, TQT_SIGNAL(sizeChanged(int)), textEdit, TQT_SLOT(setPointSize(int)) ); - connect( InlineEditors::instance()->richTextColor, TQT_SIGNAL(activated(const TQColor&)), textEdit, TQT_SLOT(setColor(const TQColor&)) ); + connect( InlineEditors::instance()->richTextFont, TQ_SIGNAL(textChanged(const TQString&)), textEdit, TQ_SLOT(setFamily(const TQString&)) ); + connect( InlineEditors::instance()->richTextFontSize, TQ_SIGNAL(sizeChanged(int)), textEdit, TQ_SLOT(setPointSize(int)) ); + connect( InlineEditors::instance()->richTextColor, TQ_SIGNAL(activated(const TQColor&)), textEdit, TQ_SLOT(setColor(const TQColor&)) ); - connect( InlineEditors::instance()->richTextFont, TQT_SIGNAL(escapePressed()), textEdit, TQT_SLOT(setFocus()) ); - connect( InlineEditors::instance()->richTextFont, TQT_SIGNAL(returnPressed2()), textEdit, TQT_SLOT(setFocus()) ); - connect( InlineEditors::instance()->richTextFont, TQT_SIGNAL(activated(int)), textEdit, TQT_SLOT(setFocus()) ); + connect( InlineEditors::instance()->richTextFont, TQ_SIGNAL(escapePressed()), textEdit, TQ_SLOT(setFocus()) ); + connect( InlineEditors::instance()->richTextFont, TQ_SIGNAL(returnPressed2()), textEdit, TQ_SLOT(setFocus()) ); + connect( InlineEditors::instance()->richTextFont, TQ_SIGNAL(activated(int)), textEdit, TQ_SLOT(setFocus()) ); - connect( InlineEditors::instance()->richTextFontSize, TQT_SIGNAL(escapePressed()), textEdit, TQT_SLOT(setFocus()) ); - connect( InlineEditors::instance()->richTextFontSize, TQT_SIGNAL(returnPressed2()), textEdit, TQT_SLOT(setFocus()) ); - connect( InlineEditors::instance()->richTextFontSize, TQT_SIGNAL(activated(int)), textEdit, TQT_SLOT(setFocus()) ); + connect( InlineEditors::instance()->richTextFontSize, TQ_SIGNAL(escapePressed()), textEdit, TQ_SLOT(setFocus()) ); + connect( InlineEditors::instance()->richTextFontSize, TQ_SIGNAL(returnPressed2()), textEdit, TQ_SLOT(setFocus()) ); + connect( InlineEditors::instance()->richTextFontSize, TQ_SIGNAL(activated(int)), textEdit, TQ_SLOT(setFocus()) ); - connect( InlineEditors::instance()->richTextColor, TQT_SIGNAL(escapePressed()), textEdit, TQT_SLOT(setFocus()) ); - connect( InlineEditors::instance()->richTextColor, TQT_SIGNAL(returnPressed2()), textEdit, TQT_SLOT(setFocus()) ); + connect( InlineEditors::instance()->richTextColor, TQ_SIGNAL(escapePressed()), textEdit, TQ_SLOT(setFocus()) ); + connect( InlineEditors::instance()->richTextColor, TQ_SIGNAL(returnPressed2()), textEdit, TQ_SLOT(setFocus()) ); - connect( textEdit, TQT_SIGNAL(cursorPositionChanged(int, int)), this, TQT_SLOT(cursorPositionChanged()) ); - connect( textEdit, TQT_SIGNAL(clicked(int, int)), this, TQT_SLOT(cursorPositionChanged()) ); - connect( textEdit, TQT_SIGNAL(currentFontChanged(const TQFont&)), this, TQT_SLOT(fontChanged(const TQFont&)) ); -// connect( textEdit, TQT_SIGNAL(currentVerticalAlignmentChanged(TQTextEdit::VerticalAlignment)), this, TQT_SLOT(slotVerticalAlignmentChanged()) ); + connect( textEdit, TQ_SIGNAL(cursorPositionChanged(int, int)), this, TQ_SLOT(cursorPositionChanged()) ); + connect( textEdit, TQ_SIGNAL(clicked(int, int)), this, TQ_SLOT(cursorPositionChanged()) ); + connect( textEdit, TQ_SIGNAL(currentFontChanged(const TQFont&)), this, TQ_SLOT(fontChanged(const TQFont&)) ); +// connect( textEdit, TQ_SIGNAL(currentVerticalAlignmentChanged(TQTextEdit::VerticalAlignment)), this, TQ_SLOT(slotVerticalAlignmentChanged()) ); - connect( InlineEditors::instance()->richTextBold, TQT_SIGNAL(toggled(bool)), textEdit, TQT_SLOT(setBold(bool)) ); - connect( InlineEditors::instance()->richTextItalic, TQT_SIGNAL(toggled(bool)), textEdit, TQT_SLOT(setItalic(bool)) ); - connect( InlineEditors::instance()->richTextUnderline, TQT_SIGNAL(toggled(bool)), textEdit, TQT_SLOT(setUnderline(bool)) ); + connect( InlineEditors::instance()->richTextBold, TQ_SIGNAL(toggled(bool)), textEdit, TQ_SLOT(setBold(bool)) ); + connect( InlineEditors::instance()->richTextItalic, TQ_SIGNAL(toggled(bool)), textEdit, TQ_SLOT(setItalic(bool)) ); + connect( InlineEditors::instance()->richTextUnderline, TQ_SIGNAL(toggled(bool)), textEdit, TQ_SLOT(setUnderline(bool)) ); //REMOVE: - //connect( InlineEditors::instance()->richTextBold, TQT_SIGNAL(activated()), this, TQT_SLOT(setBold()) ); - //connect( InlineEditors::instance()->richTextItalic, TQT_SIGNAL(activated()), this, TQT_SLOT(setItalic()) ); - //connect( InlineEditors::instance()->richTextUnderline, TQT_SIGNAL(activated()), this, TQT_SLOT(setUnderline()) ); - connect( InlineEditors::instance()->richTextLeft, TQT_SIGNAL(activated()), this, TQT_SLOT(setLeft()) ); - connect( InlineEditors::instance()->richTextCenter, TQT_SIGNAL(activated()), this, TQT_SLOT(setCentered()) ); - connect( InlineEditors::instance()->richTextRight, TQT_SIGNAL(activated()), this, TQT_SLOT(setRight()) ); - connect( InlineEditors::instance()->richTextJustified, TQT_SIGNAL(activated()), this, TQT_SLOT(setBlock()) ); + //connect( InlineEditors::instance()->richTextBold, TQ_SIGNAL(activated()), this, TQ_SLOT(setBold()) ); + //connect( InlineEditors::instance()->richTextItalic, TQ_SIGNAL(activated()), this, TQ_SLOT(setItalic()) ); + //connect( InlineEditors::instance()->richTextUnderline, TQ_SIGNAL(activated()), this, TQ_SLOT(setUnderline()) ); + connect( InlineEditors::instance()->richTextLeft, TQ_SIGNAL(activated()), this, TQ_SLOT(setLeft()) ); + connect( InlineEditors::instance()->richTextCenter, TQ_SIGNAL(activated()), this, TQ_SLOT(setCentered()) ); + connect( InlineEditors::instance()->richTextRight, TQ_SIGNAL(activated()), this, TQ_SLOT(setRight()) ); + connect( InlineEditors::instance()->richTextJustified, TQ_SIGNAL(activated()), this, TQ_SLOT(setBlock()) ); // InlineEditors::instance()->richTextToolBar()->show(); cursorPositionChanged(); fontChanged(textEdit->currentFont()); - //TQTimer::singleShot( 0, this, TQT_SLOT(cursorPositionChanged()) ); + //TQTimer::singleShot( 0, this, TQ_SLOT(cursorPositionChanged()) ); InlineEditors::instance()->enableRichTextToolBar(); - connect( InlineEditors::instance()->richTextUndo, TQT_SIGNAL(activated()), textEdit, TQT_SLOT(undo()) ); - connect( InlineEditors::instance()->richTextRedo, TQT_SIGNAL(activated()), textEdit, TQT_SLOT(redo()) ); - connect( textEdit, TQT_SIGNAL(undoAvailable(bool)), InlineEditors::instance()->richTextUndo, TQT_SLOT(setEnabled(bool)) ); - connect( textEdit, TQT_SIGNAL(redoAvailable(bool)), InlineEditors::instance()->richTextRedo, TQT_SLOT(setEnabled(bool)) ); - connect( textEdit, TQT_SIGNAL(textChanged()), this, TQT_SLOT(textChanged())); + connect( InlineEditors::instance()->richTextUndo, TQ_SIGNAL(activated()), textEdit, TQ_SLOT(undo()) ); + connect( InlineEditors::instance()->richTextRedo, TQ_SIGNAL(activated()), textEdit, TQ_SLOT(redo()) ); + connect( textEdit, TQ_SIGNAL(undoAvailable(bool)), InlineEditors::instance()->richTextUndo, TQ_SLOT(setEnabled(bool)) ); + connect( textEdit, TQ_SIGNAL(redoAvailable(bool)), InlineEditors::instance()->richTextRedo, TQ_SLOT(setEnabled(bool)) ); + connect( textEdit, TQ_SIGNAL(textChanged()), this, TQ_SLOT(textChanged())); InlineEditors::instance()->richTextUndo->setEnabled(false); InlineEditors::instance()->richTextRedo->setEnabled(false); - connect( textEdit, TQT_SIGNAL(cursorPositionChanged(int, int)), htmlContent->note()->basket(), TQT_SLOT(editorCursorPositionChanged()) ); + connect( textEdit, TQ_SIGNAL(cursorPositionChanged(int, int)), htmlContent->note()->basket(), TQ_SLOT(editorCursorPositionChanged()) ); // In case it is a very big note, the top is displayed and Enter is pressed: the cursor is on bottom, we should enure it visible: - TQTimer::singleShot( 0, htmlContent->note()->basket(), TQT_SLOT(editorCursorPositionChanged()) ); + TQTimer::singleShot( 0, htmlContent->note()->basket(), TQ_SLOT(editorCursorPositionChanged()) ); } void HtmlEditor::cursorPositionChanged() @@ -426,9 +426,9 @@ FileEditor::FileEditor(FileContent *fileContent, TQWidget *parent) lineEdit->setText(m_fileContent->fileName()); lineEdit->selectAll(); setInlineEditor(lineEdit); - connect( lineEdit, TQT_SIGNAL(returnPressed()), this, TQT_SIGNAL(askValidation()) ); - connect( lineEdit, TQT_SIGNAL(escapePressed()), this, TQT_SIGNAL(askValidation()) ); - connect( lineEdit, TQT_SIGNAL(mouseEntered()), this, TQT_SIGNAL(mouseEnteredEditorWidget()) ); + connect( lineEdit, TQ_SIGNAL(returnPressed()), this, TQ_SIGNAL(askValidation()) ); + connect( lineEdit, TQ_SIGNAL(escapePressed()), this, TQ_SIGNAL(askValidation()) ); + connect( lineEdit, TQ_SIGNAL(mouseEntered()), this, TQ_SIGNAL(mouseEnteredEditorWidget()) ); } FileEditor::~FileEditor() @@ -590,11 +590,11 @@ LinkEditDialog::LinkEditDialog(LinkContent *contentNote, TQWidget *parent/*, TQK layout->addWidget(wid, 2, 1, TQt::AlignVCenter); m_isAutoModified = false; - connect( m_url, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(urlChanged(const TQString&)) ); - connect( m_title, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(doNotAutoTitle(const TQString&)) ); - connect( m_icon, TQT_SIGNAL(iconChanged(TQString)) , this, TQT_SLOT(doNotAutoIcon(TQString)) ); - connect( m_autoTitle, TQT_SIGNAL(clicked()), this, TQT_SLOT(guessTitle()) ); - connect( m_autoIcon, TQT_SIGNAL(clicked()), this, TQT_SLOT(guessIcon()) ); + connect( m_url, TQ_SIGNAL(textChanged(const TQString&)), this, TQ_SLOT(urlChanged(const TQString&)) ); + connect( m_title, TQ_SIGNAL(textChanged(const TQString&)), this, TQ_SLOT(doNotAutoTitle(const TQString&)) ); + connect( m_icon, TQ_SIGNAL(iconChanged(TQString)) , this, TQ_SLOT(doNotAutoIcon(TQString)) ); + connect( m_autoTitle, TQ_SIGNAL(clicked()), this, TQ_SLOT(guessTitle()) ); + connect( m_autoIcon, TQ_SIGNAL(clicked()), this, TQ_SLOT(guessIcon()) ); TQWidget *stretchWidget = new TQWidget(page); stretchWidget->setSizePolicy(TQSizePolicy(/*hor=*/TQSizePolicy::Fixed, /*ver=*/TQSizePolicy::Expanding, /*hStretch=*/1, /*vStretch=*/255)); // Make it fill ALL vertical space @@ -741,7 +741,7 @@ LauncherEditDialog::LauncherEditDialog(LauncherContent *contentNote, TQWidget *p stretchWidget->setSizePolicy(TQSizePolicy(/*hor=*/TQSizePolicy::Fixed, /*ver=*/TQSizePolicy::Expanding, /*hStretch=*/1, /*vStretch=*/255)); // Make it fill ALL vertical space layout->addWidget(stretchWidget, 3, 1, TQt::AlignVCenter); - connect( guessButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(guessIcon()) ); + connect( guessButton, TQ_SIGNAL(clicked()), this, TQ_SLOT(guessIcon()) ); } LauncherEditDialog::~LauncherEditDialog() @@ -822,7 +822,7 @@ void InlineEditors::initToolBars(TDEActionCollection *actionCollection) richTextColor = new FocusedColorCombo(Global::mainWindow()); richTextColor->setFixedWidth(richTextColor->sizeHint().height() * 2); richTextColor->setColor(textColor); - action = new KWidgetAction(richTextColor, i18n("Color"), TDEShortcut(), 0, TQT_SLOT(), actionCollection, "richtext_color"); + action = new KWidgetAction(richTextColor, i18n("Color"), TDEShortcut(), 0, TQ_SLOT(), actionCollection, "richtext_color"); richTextBold = new TDEToggleAction( i18n("Bold"), "format-text-bold", "Ctrl+B", actionCollection, "richtext_bold" ); richTextItalic = new TDEToggleAction( i18n("Italic"), "format-text-italic", "Ctrl+I", actionCollection, "richtext_italic" ); |