diff options
Diffstat (limited to 'src/noteedit.cpp')
-rw-r--r-- | src/noteedit.cpp | 78 |
1 files changed, 39 insertions, 39 deletions
diff --git a/src/noteedit.cpp b/src/noteedit.cpp index 0ad5dcf..e47933a 100644 --- a/src/noteedit.cpp +++ b/src/noteedit.cpp @@ -19,7 +19,7 @@ ***************************************************************************/ #include <tqlabel.h> -#include <layout.h> +#include <tqlayout.h> #include <tqlineedit.h> #include <klineedit.h> #include <kurlrequester.h> @@ -279,7 +279,7 @@ void HtmlEditor::cursorPositionChanged() InlineEditors::instance()->richTextItalic->setChecked( textEdit()->italic() ); InlineEditors::instance()->richTextUnderline->setChecked( textEdit()->underline() ); - switch (textEdit()->alignment()) { + switch (textEdit()->tqalignment()) { default: case 1/*TQt::AlignLeft*/: InlineEditors::instance()->richTextLeft->setChecked(true); break; case 4/*TQt::AlignCenter*/: InlineEditors::instance()->richTextCenter->setChecked(true); break; @@ -337,10 +337,10 @@ void HtmlEditor::fontChanged(const TQFont &font) //void HtmlEditor::setBold() { textEdit()->setBold( InlineEditors::instance()->richTextBold->isChecked() ); } //void HtmlEditor::setItalic() { textEdit()->setItalic( InlineEditors::instance()->richTextItalic->isChecked() ); } //void HtmlEditor::setUnderline() { textEdit()->setUnderline( InlineEditors::instance()->richTextUnderline->isChecked() ); } -void HtmlEditor::setLeft() { textEdit()->setAlignment(TQt::AlignLeft); } -void HtmlEditor::setCentered() { textEdit()->setAlignment(TQt::AlignCenter); } -void HtmlEditor::setRight() { textEdit()->setAlignment(TQt::AlignRight); } -void HtmlEditor::setBlock() { textEdit()->setAlignment(TQt::AlignJustify); } +void HtmlEditor::setLeft() { textEdit()->tqsetAlignment(TQt::AlignLeft); } +void HtmlEditor::setCentered() { textEdit()->tqsetAlignment(TQt::AlignCenter); } +void HtmlEditor::setRight() { textEdit()->tqsetAlignment(TQt::AlignRight); } +void HtmlEditor::setBlock() { textEdit()->tqsetAlignment(TQt::AlignJustify); } HtmlEditor::~HtmlEditor() { @@ -536,7 +536,7 @@ LinkEditDialog::LinkEditDialog(LinkContent *contentNote, TQWidget *parent/*, TQK m_noteContent(contentNote) { TQWidget *page = plainPage(); - TQGridLayout *layout = new TQGridLayout(page, /*nRows=*/4, /*nCols=*/2, /*margin=*/0, spacingHint()); + TQGridLayout *tqlayout = new TQGridLayout(page, /*nRows=*/4, /*nCols=*/2, /*margin=*/0, spacingHint()); m_url = new KURLRequester(m_noteContent->url().url(), page); @@ -559,12 +559,12 @@ LinkEditDialog::LinkEditDialog(LinkContent *contentNote, TQWidget *parent/*, TQK m_autoIcon = new TQPushButton(i18n("Auto"), wid); // Create before to know size here: /* Icon button: */ m_icon->setIcon(m_noteContent->icon()); - int minSize = m_autoIcon->sizeHint().height(); - // Make the icon button at least the same heigh than the other buttons for a better alignment (nicer to the eyes): - if (m_icon->sizeHint().height() < minSize) + int minSize = m_autoIcon->tqsizeHint().height(); + // Make the icon button at least the same heigh than the other buttons for a better tqalignment (nicer to the eyes): + if (m_icon->tqsizeHint().height() < minSize) m_icon->setFixedSize(minSize, minSize); else - m_icon->setFixedSize(m_icon->sizeHint().height(), m_icon->sizeHint().height()); // Make it square + m_icon->setFixedSize(m_icon->tqsizeHint().height(), m_icon->tqsizeHint().height()); // Make it square /* Auto button: */ m_autoIcon->setToggleButton(true); m_autoIcon->setOn(m_noteContent->autoIcon()); @@ -578,12 +578,12 @@ LinkEditDialog::LinkEditDialog(LinkContent *contentNote, TQWidget *parent/*, TQK //m_url->setShowLocalProtocol(true); TQLabel *label1 = new TQLabel(m_url, i18n("Ta&rget:"), page); TQLabel *label2 = new TQLabel(m_title, i18n("&Title:"), page); - layout->addWidget(label1, 0, 0, TQt::AlignVCenter); - layout->addWidget(label2, 1, 0, TQt::AlignVCenter); - layout->addWidget(label3, 2, 0, TQt::AlignVCenter); - layout->addWidget(m_url, 0, 1, TQt::AlignVCenter); - layout->addWidget(wid1, 1, 1, TQt::AlignVCenter); - layout->addWidget(wid, 2, 1, TQt::AlignVCenter); + tqlayout->addWidget(label1, 0, 0, TQt::AlignVCenter); + tqlayout->addWidget(label2, 1, 0, TQt::AlignVCenter); + tqlayout->addWidget(label3, 2, 0, TQt::AlignVCenter); + tqlayout->addWidget(m_url, 0, 1, TQt::AlignVCenter); + tqlayout->addWidget(wid1, 1, 1, TQt::AlignVCenter); + tqlayout->addWidget(wid, 2, 1, TQt::AlignVCenter); m_isAutoModified = false; connect( m_url, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(urlChanged(const TQString&)) ); @@ -593,8 +593,8 @@ LinkEditDialog::LinkEditDialog(LinkContent *contentNote, TQWidget *parent/*, TQK connect( m_autoIcon, TQT_SIGNAL(clicked()), this, TQT_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 - layout->addWidget(stretchWidget, 3, 1, TQt::AlignVCenter); + stretchWidget->tqsetSizePolicy(TQSizePolicy(/*hor=*/TQSizePolicy::Fixed, /*ver=*/TQSizePolicy::Expanding, /*hStretch=*/1, /*vStretch=*/255)); // Make it fill ALL vertical space + tqlayout->addWidget(stretchWidget, 3, 1, TQt::AlignVCenter); urlChanged(""); @@ -674,15 +674,15 @@ void LinkEditDialog::slotOk() /* Change icon size if link look have changed */ LinkLook *linkLook = LinkLook::lookForURL(filteredURL); TQString icon = m_icon->icon(); // When we change size, icon isn't changed and keep it's old size - m_icon->setSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Minimum); // Reset size policy + m_icon->tqsetSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Minimum); // Reset size policy m_icon->setIconSize(linkLook->iconSize()); // So I store it's name and reload it after size change ! m_icon->setIcon(icon); - int minSize = m_autoIcon->sizeHint().height(); - // Make the icon button at least the same heigh than the other buttons for a better alignment (nicer to the eyes): - if (m_icon->sizeHint().height() < minSize) + int minSize = m_autoIcon->tqsizeHint().height(); + // Make the icon button at least the same heigh than the other buttons for a better tqalignment (nicer to the eyes): + if (m_icon->tqsizeHint().height() < minSize) m_icon->setFixedSize(minSize, minSize); else - m_icon->setFixedSize(m_icon->sizeHint().height(), m_icon->sizeHint().height()); // Make it square + m_icon->setFixedSize(m_icon->tqsizeHint().height(), m_icon->tqsizeHint().height()); // Make it square KDialogBase::slotOk(); } @@ -695,7 +695,7 @@ LauncherEditDialog::LauncherEditDialog(LauncherContent *contentNote, TQWidget *p m_noteContent(contentNote) { TQWidget *page = plainPage(); - TQGridLayout *layout = new TQGridLayout(page, /*nRows=*/4, /*nCols=*/2, /*margin=*/0, spacingHint()); + TQGridLayout *tqlayout = new TQGridLayout(page, /*nRows=*/4, /*nCols=*/2, /*margin=*/0, spacingHint()); KService service(contentNote->fullPath()); @@ -711,12 +711,12 @@ LauncherEditDialog::LauncherEditDialog(LauncherContent *contentNote, TQWidget *p TQPushButton *guessButton = new TQPushButton(i18n("&Guess"), wid); /* Icon button: */ m_icon->setIcon(service.icon()); - int minSize = guessButton->sizeHint().height(); - // Make the icon button at least the same heigh than the other buttons for a better alignment (nicer to the eyes): - if (m_icon->sizeHint().height() < minSize) + int minSize = guessButton->tqsizeHint().height(); + // Make the icon button at least the same heigh than the other buttons for a better tqalignment (nicer to the eyes): + if (m_icon->tqsizeHint().height() < minSize) m_icon->setFixedSize(minSize, minSize); else - m_icon->setFixedSize(m_icon->sizeHint().height(), m_icon->sizeHint().height()); // Make it square + m_icon->setFixedSize(m_icon->tqsizeHint().height(), m_icon->tqsizeHint().height()); // Make it square /* Guess button: */ hLay->addWidget(m_icon); hLay->addWidget(guessButton); @@ -726,16 +726,16 @@ LauncherEditDialog::LauncherEditDialog(LauncherContent *contentNote, TQWidget *p TQLabel *label1 = new TQLabel(m_command->lineEdit(), i18n("Comman&d:"), page); TQLabel *label2 = new TQLabel(m_name, i18n("&Name:"), page); - layout->addWidget(label1, 0, 0, TQt::AlignVCenter); - layout->addWidget(label2, 1, 0, TQt::AlignVCenter); - layout->addWidget(label, 2, 0, TQt::AlignVCenter); - layout->addWidget(m_command, 0, 1, TQt::AlignVCenter); - layout->addWidget(m_name, 1, 1, TQt::AlignVCenter); - layout->addWidget(wid, 2, 1, TQt::AlignVCenter); + tqlayout->addWidget(label1, 0, 0, TQt::AlignVCenter); + tqlayout->addWidget(label2, 1, 0, TQt::AlignVCenter); + tqlayout->addWidget(label, 2, 0, TQt::AlignVCenter); + tqlayout->addWidget(m_command, 0, 1, TQt::AlignVCenter); + tqlayout->addWidget(m_name, 1, 1, TQt::AlignVCenter); + tqlayout->addWidget(wid, 2, 1, TQt::AlignVCenter); TQWidget *stretchWidget = new TQWidget(page); - 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); + stretchWidget->tqsetSizePolicy(TQSizePolicy(/*hor=*/TQSizePolicy::Fixed, /*ver=*/TQSizePolicy::Expanding, /*hStretch=*/1, /*vStretch=*/255)); // Make it fill ALL vertical space + tqlayout->addWidget(stretchWidget, 3, 1, TQt::AlignVCenter); connect( guessButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(guessIcon()) ); } @@ -805,7 +805,7 @@ void InlineEditors::initToolBars(KActionCollection *actionCollection) // Init the RichTextEditor Toolbar: richTextFont = new FocusedFontCombo(Global::mainWindow()); - richTextFont->setFixedWidth(richTextFont->sizeHint().width() * 2 / 3); + richTextFont->setFixedWidth(richTextFont->tqsizeHint().width() * 2 / 3); richTextFont->setCurrentFont(defaultFont.family()); KWidgetAction *action = new KWidgetAction(richTextFont, i18n("Font"), TQt::Key_F6, /*receiver=*/0, /*slot=*/"", actionCollection, "richtext_font"); @@ -816,7 +816,7 @@ void InlineEditors::initToolBars(KActionCollection *actionCollection) /*receiver=*/0, /*slot=*/"", actionCollection, "richtext_font_size"); richTextColor = new FocusedColorCombo(Global::mainWindow()); - richTextColor->setFixedWidth(richTextColor->sizeHint().height() * 2); + richTextColor->setFixedWidth(richTextColor->tqsizeHint().height() * 2); richTextColor->setColor(textColor); action = new KWidgetAction(richTextColor, i18n("Color"), KShortcut(), 0, TQT_SLOT(), actionCollection, "richtext_color"); |