diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-25 05:28:35 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-25 05:28:35 +0000 |
commit | f008adb5a77e094eaf6abf3fc0f36958e66896a5 (patch) | |
tree | 8e9244c4d4957c36be81e15b566b4aa5ea26c982 /kword/KWConfig.cpp | |
parent | 1210f27b660efb7b37ff43ec68763e85a403471f (diff) | |
download | koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.tar.gz koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.zip |
TQt4 port koffice
This should enable compilation under both Qt3 and Qt4; fixes for any missed components will be forthcoming
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1238284 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kword/KWConfig.cpp')
-rw-r--r-- | kword/KWConfig.cpp | 360 |
1 files changed, 180 insertions, 180 deletions
diff --git a/kword/KWConfig.cpp b/kword/KWConfig.cpp index 3819bd61..e7f2f8f2 100644 --- a/kword/KWConfig.cpp +++ b/kword/KWConfig.cpp @@ -27,16 +27,16 @@ #include <kfontdialog.h> #include <kdebug.h> -#include <qcheckbox.h> -#include <qlabel.h> -#include <qvbox.h> -#include <qcombobox.h> -#include <qwhatsthis.h> -#include <qvgroupbox.h> -#include <qpushbutton.h> -#include <qlistbox.h> -#include <qlineedit.h> -#include <qlayout.h> +#include <tqcheckbox.h> +#include <tqlabel.h> +#include <tqvbox.h> +#include <tqcombobox.h> +#include <tqwhatsthis.h> +#include <tqvgroupbox.h> +#include <tqpushbutton.h> +#include <tqlistbox.h> +#include <tqlineedit.h> +#include <tqlayout.h> #include "KWConfig.h" #include "KWView.h" @@ -67,60 +67,60 @@ using namespace KSpell2; #include <kglobal.h> #include <kurlrequesterdlg.h> #include <kfiledialog.h> -#include <qtabwidget.h> +#include <tqtabwidget.h> #include <keditlistbox.h> #include <KoGlobal.h> // little helper stolen from kmail -// (Note: KDialogBase should have version of the methods that take a QString for the icon name) -static inline QPixmap loadIcon( const char * name ) { +// (Note: KDialogBase should have version of the methods that take a TQString for the icon name) +static inline TQPixmap loadIcon( const char * name ) { return KGlobal::instance()->iconLoader() - ->loadIcon( QString::fromLatin1(name), KIcon::NoGroup, KIcon::SizeMedium ); + ->loadIcon( TQString::tqfromLatin1(name), KIcon::NoGroup, KIcon::SizeMedium ); } -KWConfig::KWConfig( KWView* parent ) +KWConfig::KWConfig( KWView* tqparent ) : KDialogBase(KDialogBase::IconList,i18n("Configure KWord") , KDialogBase::Ok | KDialogBase::Apply | KDialogBase::Cancel| KDialogBase::Default, - KDialogBase::Ok, parent) + KDialogBase::Ok, tqparent) { - QVBox *page2 = addVBoxPage( i18n("Interface"), i18n("Interface Settings"), + TQVBox *page2 = addVBoxPage( i18n("Interface"), i18n("Interface Settings"), loadIcon("configure") ); - m_interfacePage=new ConfigureInterfacePage(parent, page2); + m_interfacePage=new ConfigureInterfacePage(tqparent, page2); - QVBox *page4 = addVBoxPage( i18n("Document"), i18n("Document Settings"), + TQVBox *page4 = addVBoxPage( i18n("Document"), i18n("Document Settings"), loadIcon("kword_kwd") ); - m_defaultDocPage=new ConfigureDefaultDocPage(parent, page4); + m_defaultDocPage=new ConfigureDefaultDocPage(tqparent, page4); - QVBox *page = addVBoxPage( i18n("Spelling"), i18n("Spell Checker Behavior"), + TQVBox *page = addVBoxPage( i18n("Spelling"), i18n("Spell Checker Behavior"), loadIcon("spellcheck") ); - m_spellPage = new ConfigureSpellPage(parent, page); + m_spellPage = new ConfigureSpellPage(tqparent, page); - QVBox *page5 = addVBoxPage( i18n("Formula"), i18n("Formula Defaults"), + TQVBox *page5 = addVBoxPage( i18n("Formula"), i18n("Formula Defaults"), loadIcon("kformula") ); - m_formulaPage=new KFormula::ConfigurePage( parent->kWordDocument()->formulaDocument( false ), + m_formulaPage=new KFormula::ConfigurePage( tqparent->kWordDocument()->formulaDocument( false ), this, KWFactory::instance()->config(), page5 ); - QVBox *page3 = addVBoxPage( i18n("Misc"), i18n("Misc Settings"), + TQVBox *page3 = addVBoxPage( i18n("Misc"), i18n("Misc Settings"), loadIcon("misc") ); - m_miscPage=new ConfigureMiscPage(parent, page3); + m_miscPage=new ConfigureMiscPage(tqparent, page3); - QVBox *page6 = addVBoxPage( i18n("Path"), i18n("Path Settings"), + TQVBox *page6 = addVBoxPage( i18n("Path"), i18n("Path Settings"), loadIcon("path") ); - m_pathPage=new ConfigurePathPage(parent, page6); + m_pathPage=new ConfigurePathPage(tqparent, page6); if (KoSpeaker::isKttsdInstalled()) { - QVBox *page7 = addVBoxPage( i18n("Abbreviation for Text-to-Speech", "TTS"), + TQVBox *page7 = addVBoxPage( i18n("Abbreviation for Text-to-Speech", "TTS"), i18n("Text-to-Speech Settings"), loadIcon("access") ); - m_ttsPage=new ConfigureTTSPage(parent, page7); + m_ttsPage=new ConfigureTTSPage(tqparent, page7); } else m_ttsPage = 0; - m_doc = parent->kWordDocument(); - connect(this, SIGNAL(okClicked()),this,SLOT(slotApply())); + m_doc = tqparent->kWordDocument(); + connect(this, TQT_SIGNAL(okClicked()),this,TQT_SLOT(slotApply())); - connect( m_interfacePage, SIGNAL( unitChanged( int ) ), SLOT( unitChanged( int ) ) ); - unitChanged( parent->kWordDocument()->unit() ); + connect( m_interfacePage, TQT_SIGNAL( unitChanged( int ) ), TQT_SLOT( unitChanged( int ) ) ); + unitChanged( tqparent->kWordDocument()->unit() ); } void KWConfig::unitChanged( int u ) @@ -210,14 +210,14 @@ void KWConfig::slotDefault() //// -ConfigureSpellPage::ConfigureSpellPage( KWView *view, QVBox *box, char *name ) - : QObject( box->parent(), name ) +ConfigureSpellPage::ConfigureSpellPage( KWView *view, TQVBox *box, char *name ) + : TQObject( box->tqparent(), name ) { m_pView=view; config = KWFactory::instance()->config(); m_spellConfigWidget = new ConfigWidget( view->broker(), box ); m_spellConfigWidget->setBackgroundCheckingButtonShown( true ); - m_spellConfigWidget->layout()->setMargin( 0 ); + m_spellConfigWidget->tqlayout()->setMargin( 0 ); } void ConfigureSpellPage::apply() @@ -238,12 +238,12 @@ void ConfigureSpellPage::slotDefault() m_spellConfigWidget->slotDefault(); } -ConfigureInterfacePage::ConfigureInterfacePage( KWView *view, QVBox *box, char *name ) - : QObject( box->parent(), name ) +ConfigureInterfacePage::ConfigureInterfacePage( KWView *view, TQVBox *box, char *name ) + : TQObject( box->tqparent(), name ) { m_pView=view; config = KWFactory::instance()->config(); - QVGroupBox* gbInterfaceGroup = new QVGroupBox( i18n("Interface"), box, "GroupBox" ); + TQVGroupBox* gbInterfaceGroup = new TQVGroupBox( i18n("Interface"), box, "GroupBox" ); gbInterfaceGroup->setMargin( KDialog::marginHint() ); gbInterfaceGroup->setInsideSpacing( KDialog::spacingHint() ); @@ -269,51 +269,51 @@ ConfigureInterfacePage::ConfigureInterfacePage( KWView *view, QVBox *box, char * oldShowScrollBar = config->readBoolEntry("ShowScrollBar", true); } - QHBox *hbUnit = new QHBox(gbInterfaceGroup); + TQHBox *hbUnit = new TQHBox(gbInterfaceGroup); hbUnit->setSpacing(KDialog::spacingHint()); - QLabel *unitLabel= new QLabel(i18n("&Units:"),hbUnit); + TQLabel *unitLabel= new TQLabel(i18n("&Units:"),hbUnit); - m_unitCombo = new QComboBox( hbUnit ); + m_unitCombo = new TQComboBox( hbUnit ); m_unitCombo->insertStringList( KoUnit::listOfUnitName() ); - connect(m_unitCombo, SIGNAL(activated(int)), this, SIGNAL(unitChanged(int))); + connect(m_unitCombo, TQT_SIGNAL(activated(int)), this, TQT_SIGNAL(unitChanged(int))); unitLabel->setBuddy( m_unitCombo ); - QString unitHelp = i18n("Select the unit type used every time a distance or width/height " + TQString unitHelp = i18n("Select the unit type used every time a distance or width/height " "is displayed or entered. This one setting is for the whole of KWord: all dialogs, the rulers etc. " "Note that KWord documents specify the unit which was used to create them, so this setting " "only affects this document and all documents that will be created later."); - QWhatsThis::add( unitLabel, unitHelp ); - QWhatsThis::add( m_unitCombo, unitHelp ); + TQWhatsThis::add( unitLabel, unitHelp ); + TQWhatsThis::add( m_unitCombo, unitHelp ); - showStatusBar = new QCheckBox(i18n("Show &status bar"),gbInterfaceGroup); + showStatusBar = new TQCheckBox(i18n("Show &status bar"),gbInterfaceGroup); showStatusBar->setChecked(oldShowStatusBar); - QWhatsThis::add( showStatusBar, i18n("Show or hide the status bar. If enabled, the status bar is shown at the bottom, which displays various information.")); + TQWhatsThis::add( showStatusBar, i18n("Show or hide the status bar. If enabled, the status bar is shown at the bottom, which displays various information.")); - showScrollBar = new QCheckBox( i18n("Show s&crollbar"), gbInterfaceGroup); + showScrollBar = new TQCheckBox( i18n("Show s&crollbar"), gbInterfaceGroup); showScrollBar->setChecked(oldShowScrollBar); - QWhatsThis::add( showScrollBar, i18n("Show or hide the scroll bar. If enabled, the scroll bar is shown on the right and lets you scroll up and down, which is useful for navigating through the document.")); + TQWhatsThis::add( showScrollBar, i18n("Show or hide the scroll bar. If enabled, the scroll bar is shown on the right and lets you scroll up and down, which is useful for navigating through the document.")); - pgUpDownMovesCaret = new QCheckBox(i18n("PageUp/PageDown &moves the caret"),gbInterfaceGroup); + pgUpDownMovesCaret = new TQCheckBox(i18n("PageUp/PageDown &moves the caret"),gbInterfaceGroup); pgUpDownMovesCaret->setChecked(oldPgUpDownMovesCaret); - QWhatsThis::add( pgUpDownMovesCaret, i18n( + TQWhatsThis::add( pgUpDownMovesCaret, i18n( "If this option is enabled, the PageUp and PageDown keys " "move the text caret, as in other KDE applications. " "If it is disabled, they move the scrollbars, as in most other word processors." ) ); - QHBox* hbRecent = new QHBox( gbInterfaceGroup ); - QString recentHelp = i18n("The number of files remembered in the file open dialog and in the " + TQHBox* hbRecent = new TQHBox( gbInterfaceGroup ); + TQString recentHelp = i18n("The number of files remembered in the file open dialog and in the " "recent files menu item."); - QLabel* labelRecent = new QLabel( i18n("Number of recent &files:"), hbRecent ); - QWhatsThis::add( labelRecent, recentHelp ); + TQLabel* labelRecent = new TQLabel( i18n("Number of recent &files:"), hbRecent ); + TQWhatsThis::add( labelRecent, recentHelp ); recentFiles=new KIntNumInput( oldNbRecentFiles, hbRecent ); recentFiles->setRange(1, 20, 1); labelRecent->setBuddy( recentFiles ); - QWhatsThis::add( recentFiles, recentHelp ); + TQWhatsThis::add( recentFiles, recentHelp ); - QHBox* hbGridX = new QHBox( gbInterfaceGroup ); - QString gridxHelp = i18n("The grid size on which frames, tabs and other content snaps while " + TQHBox* hbGridX = new TQHBox( gbInterfaceGroup ); + TQString gridxHelp = i18n("The grid size on which frames, tabs and other content snaps while " "moving and scaling."); - QLabel* labelGridX = new QLabel( i18n("&Horizontal grid size:"), hbGridX ); - QWhatsThis::add( labelGridX, gridxHelp ); + TQLabel* labelGridX = new TQLabel( i18n("&Horizontal grid size:"), hbGridX ); + TQWhatsThis::add( labelGridX, gridxHelp ); gridX=new KoUnitDoubleSpinBox( hbGridX, 0.1, 50, @@ -321,13 +321,13 @@ ConfigureInterfacePage::ConfigureInterfacePage( KWView *view, QVBox *box, char * ptGridX, unit ); labelGridX->setBuddy( gridX ); - QWhatsThis::add( gridX, gridxHelp ); + TQWhatsThis::add( gridX, gridxHelp ); - QHBox* hbGridY = new QHBox( gbInterfaceGroup ); - QString gridyHelp = i18n("The grid size on which frames and other content snaps while " + TQHBox* hbGridY = new TQHBox( gbInterfaceGroup ); + TQString gridyHelp = i18n("The grid size on which frames and other content snaps while " "moving and scaling."); - QLabel* labelGridY = new QLabel( i18n("&Vertical grid size:"), hbGridY ); - QWhatsThis::add( labelGridY, gridyHelp ); + TQLabel* labelGridY = new TQLabel( i18n("&Vertical grid size:"), hbGridY ); + TQWhatsThis::add( labelGridY, gridyHelp ); gridY=new KoUnitDoubleSpinBox( hbGridY, 0.1, 50, @@ -336,15 +336,15 @@ ConfigureInterfacePage::ConfigureInterfacePage( KWView *view, QVBox *box, char * unit ); labelGridY->setBuddy( gridY ); - QWhatsThis::add( gridY, gridyHelp ); + TQWhatsThis::add( gridY, gridyHelp ); - QHBox* hbIndent = new QHBox( gbInterfaceGroup ); - QString indentHelp = i18n("Configure the indent width used when using the 'Increase' " + TQHBox* hbIndent = new TQHBox( gbInterfaceGroup ); + TQString indentHelp = i18n("Configure the indent width used when using the 'Increase' " "or 'Decrease' indentation buttons on a paragraph.<p>The lower the value, " "the more often the buttons will have to be pressed to gain the same " "indentation."); - QLabel* labelIndent = new QLabel( i18n("&Paragraph indent by toolbar buttons:"), hbIndent ); - QWhatsThis::add( labelIndent, indentHelp ); + TQLabel* labelIndent = new TQLabel( i18n("&Paragraph indent by toolbar buttons:"), hbIndent ); + TQWhatsThis::add( labelIndent, indentHelp ); indent = new KoUnitDoubleSpinBox( hbIndent, 0.1, 5000, @@ -352,26 +352,26 @@ ConfigureInterfacePage::ConfigureInterfacePage( KWView *view, QVBox *box, char * ptIndent, unit ); labelIndent->setBuddy( indent ); - QWhatsThis::add( indent, indentHelp ); + TQWhatsThis::add( indent, indentHelp ); - QHBox* hbPagePerRow = new QHBox( gbInterfaceGroup ); - QString pagePerRowHelp = i18n("After selecting Preview Mode (from the \"View\" menu,) " + TQHBox* hbPagePerRow = new TQHBox( gbInterfaceGroup ); + TQString pagePerRowHelp = i18n("After selecting Preview Mode (from the \"View\" menu,) " "this is the number of pages KWord will " "position on one horizontal row."); - QLabel* labelPagePerRow = new QLabel( i18n("Number of pa&ges per row in preview mode:" ), hbPagePerRow ); - QWhatsThis::add( labelPagePerRow, pagePerRowHelp ); + TQLabel* labelPagePerRow = new TQLabel( i18n("Number of pa&ges per row in preview mode:" ), hbPagePerRow ); + TQWhatsThis::add( labelPagePerRow, pagePerRowHelp ); m_nbPagePerRow=new KIntNumInput( 0, nbPagePerRow, hbPagePerRow ); m_nbPagePerRow->setRange(1, 10, 1); labelPagePerRow->setBuddy( m_nbPagePerRow ); hbPagePerRow->setStretchFactor( m_nbPagePerRow, 1 ); - QWhatsThis::add(m_nbPagePerRow , pagePerRowHelp ); + TQWhatsThis::add(m_nbPagePerRow , pagePerRowHelp ); } void ConfigureInterfacePage::apply() { KWDocument * doc = m_pView->kWordDocument(); - double valX = QMAX( 0.1, gridX->value() ); - double valY = QMAX( 0.1, gridY->value() ); + double valX = TQMAX( 0.1, gridX->value() ); + double valY = TQMAX( 0.1, gridY->value() ); int nbRecent=recentFiles->value(); bool statusBar=showStatusBar->isChecked(); @@ -446,7 +446,7 @@ void ConfigureInterfacePage::apply() // It's already been set in the document, see unitChanged config->writeEntry( "Units", KoUnit::unitName( unit ) ); if ( updateView ) - doc->repaintAllViews(false); + doc->tqrepaintAllViews(false); } void ConfigureInterfacePage::setUnit( KoUnit::Unit unit ) @@ -480,12 +480,12 @@ void ConfigureInterfacePage::slotDefault() //// -ConfigureMiscPage::ConfigureMiscPage( KWView *view, QVBox *box, char *name ) - : QObject( box->parent(), name ) +ConfigureMiscPage::ConfigureMiscPage( KWView *view, TQVBox *box, char *name ) + : TQObject( box->tqparent(), name ) { m_pView=view; config = KWFactory::instance()->config(); - QVGroupBox* gbMiscGroup = new QVGroupBox( i18n("Misc"), box, "GroupBox" ); + TQVGroupBox* gbMiscGroup = new TQVGroupBox( i18n("Misc"), box, "GroupBox" ); gbMiscGroup->setMargin( KDialog::marginHint() ); gbMiscGroup->setInsideSpacing( KDialog::spacingHint() ); @@ -500,41 +500,41 @@ ConfigureMiscPage::ConfigureMiscPage( KWView *view, QVBox *box, char *name ) m_oldNbRedo=config->readNumEntry("UndoRedo",m_oldNbRedo); } - QHBox* hbUndoRedo = new QHBox( gbMiscGroup ); - QLabel* labelUndoRedo = new QLabel( i18n("Undo/&redo limit:"), hbUndoRedo ); - QString undoHelp = i18n("Limit the number of undo/redo actions remembered. " + TQHBox* hbUndoRedo = new TQHBox( gbMiscGroup ); + TQLabel* labelUndoRedo = new TQLabel( i18n("Undo/&redo limit:"), hbUndoRedo ); + TQString undoHelp = i18n("Limit the number of undo/redo actions remembered. " "A lower value helps to save memory, a higher value allows " "you to undo and redo more editing steps."); m_undoRedoLimit=new KIntNumInput( m_oldNbRedo, hbUndoRedo ); m_undoRedoLimit->setRange(1, 100, 1); labelUndoRedo->setBuddy( m_undoRedoLimit ); - QWhatsThis::add( m_undoRedoLimit, undoHelp ); - QWhatsThis::add( labelUndoRedo, undoHelp ); + TQWhatsThis::add( m_undoRedoLimit, undoHelp ); + TQWhatsThis::add( labelUndoRedo, undoHelp ); KWDocument* doc = m_pView->kWordDocument(); - m_displayLink=new QCheckBox(i18n("Display &links"),gbMiscGroup); + m_displayLink=new TQCheckBox(i18n("Display &links"),gbMiscGroup); m_displayLink->setChecked(doc->variableCollection()->variableSetting()->displayLink()); - QWhatsThis::add( m_displayLink, i18n("If enabled, a link is highlighted as such and is clickable.\n\n" + TQWhatsThis::add( m_displayLink, i18n("If enabled, a link is highlighted as such and is clickable.\n\n" "You can insert a link from the Insert menu.")); - m_underlineLink=new QCheckBox(i18n("&Underline all links"),gbMiscGroup); + m_underlineLink=new TQCheckBox(i18n("&Underline all links"),gbMiscGroup); m_underlineLink->setChecked(doc->variableCollection()->variableSetting()->underlineLink()); - QWhatsThis::add( m_underlineLink, i18n("If enabled, a link is underlined.")); + TQWhatsThis::add( m_underlineLink, i18n("If enabled, a link is underlined.")); - m_displayComment=new QCheckBox(i18n("Display c&omments"),gbMiscGroup); + m_displayComment=new TQCheckBox(i18n("Display c&omments"),gbMiscGroup); m_displayComment->setChecked(doc->variableCollection()->variableSetting()->displayComment()); - QWhatsThis::add( m_displayComment, i18n("If enabled, comments are indicated by a small yellow box.\n\n" + TQWhatsThis::add( m_displayComment, i18n("If enabled, comments are indicated by a small yellow box.\n\n" "You can show and edit a comment from the context menu.")); - m_displayFieldCode=new QCheckBox(i18n("Display field code"),gbMiscGroup); + m_displayFieldCode=new TQCheckBox(i18n("Display field code"),gbMiscGroup); m_displayFieldCode->setChecked(doc->variableCollection()->variableSetting()->displayFieldCode()); - QWhatsThis::add( m_displayFieldCode, i18n("If enabled, the type of link is displayed instead " + TQWhatsThis::add( m_displayFieldCode, i18n("If enabled, the type of link is displayed instead " "of displaying the link text.\n\n" "There are various types of link that can be inserted, " "such as hyperlinks, files, mail, news and bookmarks.")); - QVGroupBox* gbViewFormatting = new QVGroupBox( i18n("View Formatting"), box, "view_formatting" ); - QWhatsThis::add( gbViewFormatting, i18n("These settings can be used to select the formatting " + TQVGroupBox* gbViewFormatting = new TQVGroupBox( i18n("View Formatting"), box, "view_formatting" ); + TQWhatsThis::add( gbViewFormatting, i18n("These settings can be used to select the formatting " "characters that should be shown.\n\n" "Note that the selected formatting characters are only " "shown if formatting characters are enabled in general, " @@ -547,16 +547,16 @@ ConfigureMiscPage::ConfigureMiscPage( KWView *view, QVBox *box, char *name ) m_oldFormattingTabs = doc->viewFormattingTabs(); m_oldFormattingBreak = doc->viewFormattingBreak(); - m_cbViewFormattingEndParag = new QCheckBox( i18n("View formatting end paragraph"), gbViewFormatting); + m_cbViewFormattingEndParag = new TQCheckBox( i18n("View formatting end paragraph"), gbViewFormatting); m_cbViewFormattingEndParag->setChecked(m_oldFormattingEndParag); - m_cbViewFormattingSpace = new QCheckBox( i18n("View formatting space"), gbViewFormatting); + m_cbViewFormattingSpace = new TQCheckBox( i18n("View formatting space"), gbViewFormatting); m_cbViewFormattingSpace->setChecked(m_oldFormattingSpace); - m_cbViewFormattingTabs = new QCheckBox( i18n("View formatting tabs"), gbViewFormatting); + m_cbViewFormattingTabs = new TQCheckBox( i18n("View formatting tabs"), gbViewFormatting); m_cbViewFormattingTabs->setChecked(m_oldFormattingTabs); - m_cbViewFormattingBreak = new QCheckBox( i18n("View formatting break"), gbViewFormatting); + m_cbViewFormattingBreak = new TQCheckBox( i18n("View formatting break"), gbViewFormatting); m_cbViewFormattingBreak->setChecked(m_oldFormattingBreak); } @@ -655,8 +655,8 @@ KCommand *ConfigureMiscPage::apply() } if ( needRepaint ) { - doc->layout(); - doc->repaintAllViews(); + doc->tqlayout(); + doc->tqrepaintAllViews(); } return macroCmd; } @@ -680,13 +680,13 @@ void ConfigureMiscPage::setUnit( KoUnit::Unit ) //// -ConfigureDefaultDocPage::ConfigureDefaultDocPage( KWView *view, QVBox *box, char *name ) - : QObject( box->parent(), name ) +ConfigureDefaultDocPage::ConfigureDefaultDocPage( KWView *view, TQVBox *box, char *name ) + : TQObject( box->tqparent(), name ) { m_pView=view; KWDocument * doc = m_pView->kWordDocument(); config = KWFactory::instance()->config(); - QVGroupBox* gbDocumentDefaults = new QVGroupBox( i18n("Document Defaults"), box, "GroupBox" ); + TQVGroupBox* gbDocumentDefaults = new TQVGroupBox( i18n("Document Defaults"), box, "GroupBox" ); gbDocumentDefaults->setMargin( KDialog::marginHint() ); gbDocumentDefaults->setInsideSpacing( KDialog::spacingHint() ); @@ -700,8 +700,8 @@ ConfigureDefaultDocPage::ConfigureDefaultDocPage( KWView *view, QVBox *box, char } - QHBox* hbColumnSpacing = new QHBox( gbDocumentDefaults ); - QLabel* columnSpacingLabel = new QLabel( i18n("Default column spacing:"), hbColumnSpacing ); + TQHBox* hbColumnSpacing = new TQHBox( gbDocumentDefaults ); + TQLabel* columnSpacingLabel = new TQLabel( i18n("Default column spacing:"), hbColumnSpacing ); m_columnSpacing = new KoUnitDoubleSpinBox( hbColumnSpacing, 0.1, 50, @@ -709,29 +709,29 @@ ConfigureDefaultDocPage::ConfigureDefaultDocPage( KWView *view, QVBox *box, char ptColumnSpacing, unit ); columnSpacingLabel->setBuddy( m_columnSpacing ); - QWhatsThis::add( m_columnSpacing, i18n("When setting a document to use more than one column " + TQWhatsThis::add( m_columnSpacing, i18n("When setting a document to use more than one column " "this distance will be used to separate the columns. This value is merely a default " "setting as the column spacing can be changed per document") ); - QWidget *fontContainer = new QWidget(gbDocumentDefaults); - QGridLayout * fontLayout = new QGridLayout(fontContainer, 1, 3); + TQWidget *fontContainer = new TQWidget(gbDocumentDefaults); + TQGridLayout * fontLayout = new TQGridLayout(fontContainer, 1, 3); fontLayout->setSpacing(KDialog::spacingHint()); fontLayout->setColStretch(0, 0); fontLayout->setColStretch(1, 1); fontLayout->setColStretch(2, 0); - QLabel *fontTitle = new QLabel(i18n("Default font:"), fontContainer); + TQLabel *fontTitle = new TQLabel(i18n("Default font:"), fontContainer); - font= new QFont( doc->defaultFont() ); + font= new TQFont( doc->defaultFont() ); - QString labelName = font->family() + ' ' + QString::number(font->pointSize()); - fontName = new QLabel(labelName, fontContainer); + TQString labelName = font->family() + ' ' + TQString::number(font->pointSize()); + fontName = new TQLabel(labelName, fontContainer); fontName->setFont(*font); - fontName->setFrameStyle(QFrame::StyledPanel | QFrame::Sunken); + fontName->setFrameStyle(TQFrame::StyledPanel | TQFrame::Sunken); - QPushButton *chooseButton = new QPushButton(i18n("Choose..."), fontContainer); - connect(chooseButton, SIGNAL(clicked()), this, SLOT(selectNewDefaultFont())); + TQPushButton *chooseButton = new TQPushButton(i18n("Choose..."), fontContainer); + connect(chooseButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(selectNewDefaultFont())); fontLayout->addWidget(fontTitle, 0, 0); fontLayout->addWidget(fontName, 0, 1); @@ -750,35 +750,35 @@ ConfigureDefaultDocPage::ConfigureDefaultDocPage( KWView *view, QVBox *box, char } - QWidget *languageContainer = new QWidget(gbDocumentDefaults); - QGridLayout * languageLayout = new QGridLayout(languageContainer, 1, 3); + TQWidget *languageContainer = new TQWidget(gbDocumentDefaults); + TQGridLayout * languageLayout = new TQGridLayout(languageContainer, 1, 3); languageLayout->setSpacing(KDialog::spacingHint()); languageLayout->setColStretch(0, 0); languageLayout->setColStretch(1, 1); - QLabel *languageTitle = new QLabel(i18n("Global language:"), languageContainer); + TQLabel *languageTitle = new TQLabel(i18n("Global language:"), languageContainer); - m_globalLanguage = new QComboBox( languageContainer ); + m_globalLanguage = new TQComboBox( languageContainer ); m_globalLanguage->insertStringList( KoGlobal::listOfLanguages() ); m_globalLanguage->setCurrentText( KoGlobal::languageFromTag( m_oldLanguage ) ); languageLayout->addWidget(languageTitle, 0, 0); languageLayout->addWidget(m_globalLanguage, 0, 1); - m_autoHyphenation = new QCheckBox( i18n("Automatic hyphenation"), gbDocumentDefaults); + m_autoHyphenation = new TQCheckBox( i18n("Automatic hyphenation"), gbDocumentDefaults); m_autoHyphenation->setChecked( m_oldHyphenation ); - QVGroupBox* gbDocumentSettings = new QVGroupBox( i18n("Document Settings"), box ); + TQVGroupBox* gbDocumentSettings = new TQVGroupBox( i18n("Document Settings"), box ); gbDocumentSettings->setMargin( KDialog::marginHint() ); gbDocumentSettings->setInsideSpacing( KDialog::spacingHint() ); - QHBox* hbAutoSave = new QHBox( gbDocumentSettings ); - QLabel* labelAutoSave = new QLabel( i18n("Autosave every (min):"), hbAutoSave ); + TQHBox* hbAutoSave = new TQHBox( gbDocumentSettings ); + TQLabel* labelAutoSave = new TQLabel( i18n("Autosave every (min):"), hbAutoSave ); autoSave = new KIntNumInput( oldAutoSaveValue, hbAutoSave ); autoSave->setRange(0, 60, 1); labelAutoSave->setBuddy(autoSave); - QWhatsThis::add( autoSave, i18n("A backup copy of the current document is created when a change " + TQWhatsThis::add( autoSave, i18n("A backup copy of the current document is created when a change " "has been made. The interval used to create backup documents is set here.") ); autoSave->setSpecialValueText(i18n("No autosave")); autoSave->setSuffix(i18n(" min")); @@ -790,11 +790,11 @@ ConfigureDefaultDocPage::ConfigureDefaultDocPage( KWView *view, QVBox *box, char m_oldBackupFile=config->readBoolEntry("BackupFile",m_oldBackupFile); } - m_createBackupFile = new QCheckBox( i18n("Create backup file"), gbDocumentSettings); + m_createBackupFile = new TQCheckBox( i18n("Create backup file"), gbDocumentSettings); m_createBackupFile->setChecked( m_oldBackupFile ); - QHBox* hbStartingPage = new QHBox( gbDocumentSettings ); - QLabel* labelStartingPage = new QLabel(i18n("Starting page number:"), hbStartingPage); + TQHBox* hbStartingPage = new TQHBox( gbDocumentSettings ); + TQLabel* labelStartingPage = new TQLabel(i18n("Starting page number:"), hbStartingPage); m_oldStartingPage=doc->variableCollection()->variableSetting()->startingPageNumber(); m_variableNumberOffset=new KIntNumInput(hbStartingPage); @@ -802,8 +802,8 @@ ConfigureDefaultDocPage::ConfigureDefaultDocPage( KWView *view, QVBox *box, char m_variableNumberOffset->setValue(m_oldStartingPage); labelStartingPage->setBuddy( m_variableNumberOffset ); - QHBox* hbTabStop = new QHBox( gbDocumentSettings ); - tabStop = new QLabel(i18n("Tab stop (%1):").arg(doc->unitName()), hbTabStop); + TQHBox* hbTabStop = new TQHBox( gbDocumentSettings ); + tabStop = new TQLabel(i18n("Tab stop (%1):").tqarg(doc->unitName()), hbTabStop); m_tabStopWidth = new KoUnitDoubleSpinBox( hbTabStop, MM_TO_POINT(2), doc->pageManager()->page(doc->startPage())->width(), @@ -812,14 +812,14 @@ ConfigureDefaultDocPage::ConfigureDefaultDocPage( KWView *view, QVBox *box, char unit ); m_oldTabStopWidth = doc->tabStopValue(); - QVGroupBox* gbDocumentCursor = new QVGroupBox( i18n("Cursor"), box ); + TQVGroupBox* gbDocumentCursor = new TQVGroupBox( i18n("Cursor"), box ); gbDocumentCursor->setMargin( KDialog::marginHint() ); gbDocumentCursor->setInsideSpacing( KDialog::spacingHint() ); - m_cursorInProtectedArea= new QCheckBox(i18n("Cursor in protected area"),gbDocumentCursor); + m_cursorInProtectedArea= new TQCheckBox(i18n("Cursor in protected area"),gbDocumentCursor); m_cursorInProtectedArea->setChecked(doc->cursorInProtectedArea()); -// m_directInsertCursor= new QCheckBox(i18n("Direct insert cursor"),gbDocumentCursor); +// m_directInsertCursor= new TQCheckBox(i18n("Direct insert cursor"),gbDocumentCursor); // m_directInsertCursor->setChecked(doc->insertDirectCursor()); } @@ -833,7 +833,7 @@ KCommand *ConfigureDefaultDocPage::apply() config->writeEntry( "ColumnSpacing", colSpacing , true, false, 'g', DBL_DIG ); doc->setDefaultColumnSpacing(colSpacing); } - config->writeEntry("DefaultFont",font->toString()); + config->writeEntry("DefaultFont",TQString(font->toString())); config->setGroup( "Interface" ); int autoSaveVal=autoSave->value(); @@ -865,7 +865,7 @@ KCommand *ConfigureDefaultDocPage::apply() //Laurent Todo add a message box to inform user that //global language will change after re-launch kword - QString lang = KoGlobal::tagOfLanguage( m_globalLanguage->currentText() ); + TQString lang = KoGlobal::tagOfLanguage( m_globalLanguage->currentText() ); config->writeEntry( "language" , lang); m_oldLanguage = lang; //don't call this fiunction otherwise we can have a textobject with @@ -916,15 +916,15 @@ void ConfigureDefaultDocPage::slotDefault() } void ConfigureDefaultDocPage::selectNewDefaultFont() { - QStringList list; + TQStringList list; KFontChooser::getFontList(list, KFontChooser::SmoothScalableFonts); - KFontDialog dlg( (QWidget *)this->parent(), "Font Selector", false, true, list, true ); + KFontDialog dlg( (TQWidget *)this->tqparent(), "Font Selector", false, true, list, true ); dlg.setFont(*font); int result = dlg.exec(); if (KDialog::Accepted == result) { delete font; - font = new QFont(dlg.font()); - fontName->setText(font->family() + ' ' + QString::number(font->pointSize())); + font = new TQFont(dlg.font()); + fontName->setText(font->family() + ' ' + TQString::number(font->pointSize())); fontName->setFont(*font); m_pView->kWordDocument()->setDefaultFont( *font ); } @@ -939,38 +939,38 @@ void ConfigureDefaultDocPage::setUnit( KoUnit::Unit unit ) //// -ConfigurePathPage::ConfigurePathPage( KWView *view, QVBox *box, char *name ) - : QObject( box->parent(), name ) +ConfigurePathPage::ConfigurePathPage( KWView *view, TQVBox *box, char *name ) + : TQObject( box->tqparent(), name ) { m_pView=view; KWDocument * doc = m_pView->kWordDocument(); config = KWFactory::instance()->config(); - QVGroupBox* gbPathGroup = new QVGroupBox( i18n("Path"), box, "GroupBox" ); + TQVGroupBox* gbPathGroup = new TQVGroupBox( i18n("Path"), box, "GroupBox" ); gbPathGroup->setMargin( KDialog::marginHint() ); gbPathGroup->setInsideSpacing( KDialog::spacingHint() ); m_pPathView = new KListView( gbPathGroup ); - m_pPathView->setResizeMode(QListView::NoColumn); + m_pPathView->setResizeMode(TQListView::NoColumn); m_pPathView->addColumn( i18n( "Type" ) ); m_pPathView->addColumn( i18n( "Path" ), 400 ); // not too big by default - (void) new QListViewItem( m_pPathView, i18n("Personal Expression"), doc->personalExpressionPath().join(";") ); - (void) new QListViewItem( m_pPathView, i18n("Backup Path"),doc->backupPath() ); + (void) new TQListViewItem( m_pPathView, i18n("Personal Expression"), doc->personalExpressionPath().join(";") ); + (void) new TQListViewItem( m_pPathView, i18n("Backup Path"),doc->backupPath() ); - m_modifyPath = new QPushButton( i18n("Modify Path..."), gbPathGroup); - connect( m_modifyPath, SIGNAL( clicked ()), this, SLOT( slotModifyPath())); - connect( m_pPathView, SIGNAL( doubleClicked (QListViewItem *, const QPoint &, int )), this, SLOT( slotModifyPath())); - connect( m_pPathView, SIGNAL( selectionChanged ( QListViewItem * )), this, SLOT( slotSelectionChanged(QListViewItem * ))); + m_modifyPath = new TQPushButton( i18n("Modify Path..."), gbPathGroup); + connect( m_modifyPath, TQT_SIGNAL( clicked ()), this, TQT_SLOT( slotModifyPath())); + connect( m_pPathView, TQT_SIGNAL( doubleClicked (TQListViewItem *, const TQPoint &, int )), this, TQT_SLOT( slotModifyPath())); + connect( m_pPathView, TQT_SIGNAL( selectionChanged ( TQListViewItem * )), this, TQT_SLOT( slotSelectionChanged(TQListViewItem * ))); slotSelectionChanged(m_pPathView->currentItem()); } -void ConfigurePathPage::slotSelectionChanged(QListViewItem * item) +void ConfigurePathPage::slotSelectionChanged(TQListViewItem * item) { m_modifyPath->setEnabled( item ); } void ConfigurePathPage::slotModifyPath() { - QListViewItem *item = m_pPathView->currentItem (); + TQListViewItem *item = m_pPathView->currentItem (); if ( item ) { if ( item->text(0)==i18n("Personal Expression")) @@ -992,20 +992,20 @@ void ConfigurePathPage::slotModifyPath() void ConfigurePathPage::slotDefault() { - QListViewItem * item = m_pPathView->findItem(i18n("Personal Expression"), 0); + TQListViewItem * item = m_pPathView->tqfindItem(i18n("Personal Expression"), 0); if ( item ) item->setText(1, KWFactory::instance()->dirs()->resourceDirs("expression").join(";")); - item = m_pPathView->findItem(i18n("Backup Path"), 0); + item = m_pPathView->tqfindItem(i18n("Backup Path"), 0); if ( item ) - item->setText(1, QString::null ); + item->setText(1, TQString() ); } void ConfigurePathPage::apply() { - QListViewItem * item = m_pPathView->findItem(i18n("Personal Expression"), 0); + TQListViewItem * item = m_pPathView->tqfindItem(i18n("Personal Expression"), 0); if ( item ) { - QStringList lst = QStringList::split(QString(";"), item->text(1)); + TQStringList lst = TQStringList::split(TQString(";"), item->text(1)); if ( lst != m_pView->kWordDocument()->personalExpressionPath()) { m_pView->kWordDocument()->setPersonalExpressionPath(lst); @@ -1013,10 +1013,10 @@ void ConfigurePathPage::apply() config->writePathEntry( "expression path", lst); } } - item = m_pPathView->findItem(i18n("Backup Path"), 0); + item = m_pPathView->tqfindItem(i18n("Backup Path"), 0); if ( item ) { - QString res = item->text(1 ); + TQString res = item->text(1 ); if ( res != m_pView->kWordDocument()->backupPath()) { config->setGroup( "Kword Path" ); @@ -1029,35 +1029,35 @@ void ConfigurePathPage::apply() //// -ConfigureTTSPage::ConfigureTTSPage( KWView *view, QVBox *box, char *name ) - : QObject( box->parent(), name ) +ConfigureTTSPage::ConfigureTTSPage( KWView *view, TQVBox *box, char *name ) + : TQObject( box->tqparent(), name ) { Q_UNUSED(view); // m_pView=_view; // KWDocument * doc = m_pView->kWordDocument(); - m_cbSpeakPointerWidget = new QCheckBox(i18n("Speak widget under &mouse pointer"), box); - m_cbSpeakFocusWidget = new QCheckBox(i18n("Speak widget with &focus"), box); - m_gbScreenReaderOptions = new QVGroupBox("", box); + m_cbSpeakPointerWidget = new TQCheckBox(i18n("Speak widget under &mouse pointer"), box); + m_cbSpeakFocusWidget = new TQCheckBox(i18n("Speak widget with &focus"), box); + m_gbScreenReaderOptions = new TQVGroupBox("", box); m_gbScreenReaderOptions->setMargin( KDialog::marginHint() ); m_gbScreenReaderOptions->setInsideSpacing( KDialog::spacingHint() ); - m_cbSpeakTooltips = new QCheckBox(i18n("Speak &tool tips"), m_gbScreenReaderOptions); - m_cbSpeakWhatsThis = new QCheckBox(i18n("Speak &What's This"), m_gbScreenReaderOptions); - m_cbSpeakDisabled = new QCheckBox(i18n("Verbal indication if widget is disabled (grayed)", + m_cbSpeakTooltips = new TQCheckBox(i18n("Speak &tool tips"), m_gbScreenReaderOptions); + m_cbSpeakWhatsThis = new TQCheckBox(i18n("Speak &What's This"), m_gbScreenReaderOptions); + m_cbSpeakDisabled = new TQCheckBox(i18n("Verbal indication if widget is disabled (grayed)", "&Say whether disabled"), m_gbScreenReaderOptions); - m_cbSpeakAccelerators = new QCheckBox(i18n("Spea&k accelerators"), m_gbScreenReaderOptions); - QHBox* hbAcceleratorPrefix = new QHBox(m_gbScreenReaderOptions); - QWidget* spacer = new QWidget(hbAcceleratorPrefix); + m_cbSpeakAccelerators = new TQCheckBox(i18n("Spea&k accelerators"), m_gbScreenReaderOptions); + TQHBox* hbAcceleratorPrefix = new TQHBox(m_gbScreenReaderOptions); + TQWidget* spacer = new TQWidget(hbAcceleratorPrefix); spacer->setMinimumWidth(2 * KDialog::marginHint()); m_lblAcceleratorPrefix = - new QLabel(i18n("A word spoken before another word", "Pr&efaced by the word:"), + new TQLabel(i18n("A word spoken before another word", "Pr&efaced by the word:"), hbAcceleratorPrefix); - m_leAcceleratorPrefixWord = new QLineEdit(i18n("Keyboard accelerator, such as Alt+F", "Accelerator"), + m_leAcceleratorPrefixWord = new TQLineEdit(i18n("Keyboard accelerator, such as Alt+F", "Accelerator"), hbAcceleratorPrefix); m_lblAcceleratorPrefix->setBuddy(m_leAcceleratorPrefixWord); - QHBox* hbPollingInterval = new QHBox(m_gbScreenReaderOptions); + TQHBox* hbPollingInterval = new TQHBox(m_gbScreenReaderOptions); hbPollingInterval->setMargin( 0 ); - QLabel* lblPollingInterval = new QLabel(i18n("&Polling interval:"), hbPollingInterval); + TQLabel* lblPollingInterval = new TQLabel(i18n("&Polling interval:"), hbPollingInterval); m_iniPollingInterval = new KIntNumInput(hbPollingInterval); m_iniPollingInterval->setSuffix(" ms"); m_iniPollingInterval->setRange(100, 5000, 100, true); @@ -1076,9 +1076,9 @@ ConfigureTTSPage::ConfigureTTSPage( KWView *view, QVBox *box, char *name ) m_iniPollingInterval->setValue(config->readNumEntry("PollingInterval", 600)); screenReaderOptionChanged(); - connect(m_cbSpeakPointerWidget, SIGNAL(toggled(bool)), this, SLOT(screenReaderOptionChanged())); - connect(m_cbSpeakFocusWidget, SIGNAL(toggled(bool)), this, SLOT(screenReaderOptionChanged())); - connect(m_cbSpeakAccelerators, SIGNAL(toggled(bool)), this, SLOT(screenReaderOptionChanged())); + connect(m_cbSpeakPointerWidget, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(screenReaderOptionChanged())); + connect(m_cbSpeakFocusWidget, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(screenReaderOptionChanged())); + connect(m_cbSpeakAccelerators, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(screenReaderOptionChanged())); } void ConfigureTTSPage::slotDefault() |