diff options
Diffstat (limited to 'src/settings.cpp')
-rw-r--r-- | src/settings.cpp | 432 |
1 files changed, 216 insertions, 216 deletions
diff --git a/src/settings.cpp b/src/settings.cpp index 218dd0a..e9c1f0a 100644 --- a/src/settings.cpp +++ b/src/settings.cpp @@ -19,31 +19,31 @@ ***************************************************************************/ #include <config.h> -#include <qlayout.h> -#include <qlineedit.h> -#include <qhbox.h> -#include <qvbox.h> -#include <qtabwidget.h> -#include <qgroupbox.h> -#include <qlabel.h> -#include <qpushbutton.h> +#include <tqlayout.h> +#include <tqlineedit.h> +#include <tqhbox.h> +#include <tqvbox.h> +#include <tqtabwidget.h> +#include <tqgroupbox.h> +#include <tqlabel.h> +#include <tqpushbutton.h> #include <knuminput.h> #include <kcolorcombo.h> #include <kiconloader.h> #include <kconfig.h> #include <kglobal.h> #include <klocale.h> -#include <qwhatsthis.h> -#include <qbuttongroup.h> -#include <qradiobutton.h> -#include <qvbuttongroup.h> +#include <tqwhatsthis.h> +#include <tqbuttongroup.h> +#include <tqradiobutton.h> +#include <tqvbuttongroup.h> #include <kapplication.h> #include <kaboutdata.h> #include <kmimetype.h> #include <kstandarddirs.h> #include <kgpgme.h> #include <kdebug.h> -#include <qdatetime.h> +#include <tqdatetime.h> #include "basket.h" #include "linklabel.h" @@ -79,10 +79,10 @@ bool Settings::s_htmlUseProg = false; // TODO: RENAME: s_*App (with bool Settings::s_imageUseProg = true; bool Settings::s_animationUseProg = true; bool Settings::s_soundUseProg = false; -QString Settings::s_htmlProg = "quanta"; -QString Settings::s_imageProg = "kolourpaint"; -QString Settings::s_animationProg = "gimp"; -QString Settings::s_soundProg = ""; +TQString Settings::s_htmlProg = "quanta"; +TQString Settings::s_imageProg = "kolourpaint"; +TQString Settings::s_animationProg = "gimp"; +TQString Settings::s_soundProg = ""; // Addictive Features: bool Settings::s_groupOnInsertionLine = false; int Settings::s_middleAction = 0; @@ -97,10 +97,10 @@ bool Settings::s_blinkedFilter = false; bool Settings::s_startDocked = false; int Settings::s_basketTreeWidth = -1; bool Settings::s_welcomeBasketsAdded = false; -QString Settings::s_dataFolder = ""; -QDate Settings::s_lastBackup = QDate(); -QPoint Settings::s_mainWindowPosition = QPoint(); -QSize Settings::s_mainWindowSize = QSize(); +TQString Settings::s_dataFolder = ""; +TQDate Settings::s_lastBackup = TQDate(); +TQPoint Settings::s_mainWindowPosition = TQPoint(); +TQSize Settings::s_mainWindowSize = TQSize(); bool Settings::s_showEmptyBasketInfo = true; bool Settings::s_spellCheckTextNotes = true; @@ -111,11 +111,11 @@ void Settings::loadConfig() LinkLook defaultLocalLinkLook; LinkLook defaultNetworkLinkLook; LinkLook defaultLauncherLook; /* italic bold underlining color hoverColor iconSize preview */ - defaultSoundLook.setLook( false, false, LinkLook::Never, QColor(), QColor(), 32, LinkLook::None ); - defaultFileLook.setLook( false, false, LinkLook::Never, QColor(), QColor(), 32, LinkLook::TwiceIconSize ); - defaultLocalLinkLook.setLook( true, false, LinkLook::OnMouseHover, QColor(), QColor(), 22, LinkLook::TwiceIconSize ); - defaultNetworkLinkLook.setLook( false, false, LinkLook::OnMouseOutside, QColor(), QColor(), 16, LinkLook::None ); - defaultLauncherLook.setLook( false, true, LinkLook::Never, QColor(), QColor(), 48, LinkLook::None ); + defaultSoundLook.setLook( false, false, LinkLook::Never, TQColor(), TQColor(), 32, LinkLook::None ); + defaultFileLook.setLook( false, false, LinkLook::Never, TQColor(), TQColor(), 32, LinkLook::TwiceIconSize ); + defaultLocalLinkLook.setLook( true, false, LinkLook::OnMouseHover, TQColor(), TQColor(), 22, LinkLook::TwiceIconSize ); + defaultNetworkLinkLook.setLook( false, false, LinkLook::OnMouseOutside, TQColor(), TQColor(), 16, LinkLook::None ); + defaultLauncherLook.setLook( false, true, LinkLook::Never, TQColor(), TQColor(), 48, LinkLook::None ); loadLinkLook(LinkLook::soundLook, "Sound Look", defaultSoundLook ); loadLinkLook(LinkLook::fileLook, "File Look", defaultFileLook ); @@ -151,7 +151,7 @@ void Settings::loadConfig() setUsePassivePopup( config->readBoolEntry("usePassivePopup", true) ); setWelcomeBasketsAdded( config->readBoolEntry("welcomeBasketsAdded", false) ); setDataFolder( config->readPathEntry("dataFolder", "") ); - setLastBackup( config->readDateTimeEntry("lastBackup", new QDateTime()).date()); + setLastBackup( config->readDateTimeEntry("lastBackup", new TQDateTime()).date()); setMainWindowPosition( config->readPointEntry("position" ) ); setMainWindowSize( config->readSizeEntry( "size" ) ); @@ -238,7 +238,7 @@ void Settings::saveConfig() config->writeEntry( "usePassivePopup", usePassivePopup() ); config->writeEntry( "welcomeBasketsAdded", welcomeBasketsAdded() ); config->writePathEntry("dataFolder", dataFolder() ); - config->writeEntry( "lastBackup", QDateTime(lastBackup())); + config->writeEntry( "lastBackup", TQDateTime(lastBackup())); config->writeEntry( "position", mainWindowPosition() ); config->writeEntry( "size", mainWindowSize() ); @@ -270,24 +270,24 @@ void Settings::saveConfig() config->sync(); } -void Settings::loadLinkLook(LinkLook *look, const QString &name, const LinkLook &defaultLook) +void Settings::loadLinkLook(LinkLook *look, const TQString &name, const LinkLook &defaultLook) { KConfig* config = Global::config(); config->setGroup(name); - QString underliningStrings[] = { "Always", "Never", "OnMouseHover", "OnMouseOutside" }; - QString defaultUnderliningString = underliningStrings[defaultLook.underlining()]; + TQString underliningStrings[] = { "Always", "Never", "OnMouseHover", "OnMouseOutside" }; + TQString defaultUnderliningString = underliningStrings[defaultLook.underlining()]; - QString previewStrings[] = { "None", "IconSize", "TwiceIconSize", "ThreeIconSize" }; - QString defaultPreviewString = previewStrings[defaultLook.preview()]; + TQString previewStrings[] = { "None", "IconSize", "TwiceIconSize", "ThreeIconSize" }; + TQString defaultPreviewString = previewStrings[defaultLook.preview()]; bool italic = config->readBoolEntry( "italic", defaultLook.italic() ); bool bold = config->readBoolEntry( "bold", defaultLook.bold() ); - QString underliningString = config->readEntry( "underlining", defaultUnderliningString ); - QColor color = config->readPropertyEntry( "color", defaultLook.color() ).asColor(); - QColor hoverColor = config->readPropertyEntry( "hoverColor", defaultLook.hoverColor() ).asColor(); + TQString underliningString = config->readEntry( "underlining", defaultUnderliningString ); + TQColor color = config->readPropertyEntry( "color", defaultLook.color() ).asColor(); + TQColor hoverColor = config->readPropertyEntry( "hoverColor", defaultLook.hoverColor() ).asColor(); int iconSize = config->readNumEntry( "iconSize", defaultLook.iconSize() ); - QString previewString = config->readEntry( "preview", defaultPreviewString ); + TQString previewString = config->readEntry( "preview", defaultPreviewString ); int underlining = 0; if (underliningString == underliningStrings[1]) underlining = 1; @@ -302,16 +302,16 @@ void Settings::loadLinkLook(LinkLook *look, const QString &name, const LinkLook look->setLook(italic, bold, underlining, color, hoverColor, iconSize, preview); } -void Settings::saveLinkLook(LinkLook *look, const QString &name) +void Settings::saveLinkLook(LinkLook *look, const TQString &name) { KConfig* config = Global::config(); config->setGroup(name); - QString underliningStrings[] = { "Always", "Never", "OnMouseHover", "OnMouseOutside" }; - QString underliningString = underliningStrings[look->underlining()]; + TQString underliningStrings[] = { "Always", "Never", "OnMouseHover", "OnMouseOutside" }; + TQString underliningString = underliningStrings[look->underlining()]; - QString previewStrings[] = { "None", "IconSize", "TwiceIconSize", "ThreeIconSize" }; - QString previewString = previewStrings[look->preview()]; + TQString previewStrings[] = { "None", "IconSize", "TwiceIconSize", "ThreeIconSize" }; + TQString previewString = previewStrings[look->preview()]; config->writeEntry( "italic", look->italic() ); config->writeEntry( "bold", look->bold() ); @@ -341,7 +341,7 @@ void Settings::setBigNotes(bool big) Note::MIN_HEIGHT = 2*Note::NOTE_MARGIN + Note::EMBLEM_SIZE; if (Global::bnpView) - Global::bnpView->relayoutAllBaskets(); + Global::bnpView->retqlayoutAllBaskets(); } void Settings::setAutoBullet(bool yes) @@ -354,39 +354,39 @@ void Settings::setAutoBullet(bool yes) /** GeneralPage */ -GeneralPage::GeneralPage(QWidget * parent, const char * name) - : KCModule(parent, name) +GeneralPage::GeneralPage(TQWidget * tqparent, const char * name) + : KCModule(tqparent, name) { - QVBoxLayout *layout = new QVBoxLayout(this, /*margin=*/0, KDialogBase::spacingHint()); - QHBoxLayout *hLay; - QLabel *label; + TQVBoxLayout *tqlayout = new TQVBoxLayout(this, /*margin=*/0, KDialogBase::spacingHint()); + TQHBoxLayout *hLay; + TQLabel *label; HelpLabel *hLabel; - QGridLayout *gl = new QGridLayout(layout, /*nRows=*/3, /*nCols=*/3); - gl->addItem(new QSpacerItem(0, 0, QSizePolicy::Expanding), 0, 2); + TQGridLayout *gl = new TQGridLayout(tqlayout, /*nRows=*/3, /*nCols=*/3); + gl->addItem(new TQSpacerItem(0, 0, TQSizePolicy::Expanding), 0, 2); // Basket Tree Position: - m_treeOnLeft = new QComboBox(this); + m_treeOnLeft = new TQComboBox(this); m_treeOnLeft->insertItem(i18n("On left")); m_treeOnLeft->insertItem(i18n("On right")); - label = new QLabel(m_treeOnLeft, i18n("&Basket tree position:"), this); + label = new TQLabel(m_treeOnLeft, i18n("&Basket tree position:"), this); gl->addWidget(label, 0, 0); gl->addWidget(m_treeOnLeft, 0, 1); - connect( m_treeOnLeft, SIGNAL(activated(int)), this, SLOT(changed()) ); + connect( m_treeOnLeft, TQT_SIGNAL(activated(int)), this, TQT_SLOT(changed()) ); // Filter Bar Position: - m_filterOnTop = new QComboBox(this); + m_filterOnTop = new TQComboBox(this); m_filterOnTop->insertItem(i18n("On top")); m_filterOnTop->insertItem(i18n("On bottom")); - label = new QLabel(m_filterOnTop, i18n("&Filter bar position:"), this); + label = new TQLabel(m_filterOnTop, i18n("&Filter bar position:"), this); gl->addWidget(label, 1, 0); gl->addWidget(m_filterOnTop, 1, 1); - connect( m_filterOnTop, SIGNAL(activated(int)), this, SLOT(changed()) ); + connect( m_filterOnTop, TQT_SIGNAL(activated(int)), this, TQT_SLOT(changed()) ); // Use Baloons to Report Results of Global Actions: - hLay = new QHBoxLayout(0L, /*margin=*/0, KDialogBase::spacingHint()); - m_usePassivePopup = new QCheckBox(i18n("&Use balloons to report results of global actions"), this); - connect( m_usePassivePopup, SIGNAL(stateChanged(int)), this, SLOT(changed()) ); + hLay = new TQHBoxLayout(0L, /*margin=*/0, KDialogBase::spacingHint()); + m_usePassivePopup = new TQCheckBox(i18n("&Use balloons to report results of global actions"), this); + connect( m_usePassivePopup, TQT_SIGNAL(stateChanged(int)), this, TQT_SLOT(changed()) ); hLabel = new HelpLabel( i18n("What are global actions?"), ("<p>" + i18n("You can configure global shortcuts to do some actions without having to show the main window. For instance, you can paste the clipboard content, take a color from " @@ -394,63 +394,63 @@ GeneralPage::GeneralPage(QWidget * parent, const char * name) "on that icon to paste the current selection.") + "</p>" + "<p>" + i18n("When doing so, %1 pops up a little balloon message to inform you the action has been successfully done. You can disable that balloon.") + "</p>" + "<p>" + i18n("Note that those messages are smart enough to not appear if the main window is visible. This is because you already see the result of your actions in the main window.") + "</p>") - .arg(kapp->aboutData()->programName()), + .tqarg(kapp->aboutData()->programName()), this); hLay->addWidget(m_usePassivePopup); hLay->addWidget(hLabel); hLay->addStretch(); - layout->addLayout(hLay); + tqlayout->addLayout(hLay); // System Tray Icon: - QGroupBox *gbSys = new QGroupBox(3, Qt::Vertical, i18n("System Tray Icon"), this); - layout->addWidget(gbSys); - QVBoxLayout *sysLay = new QVBoxLayout(gbSys, /*margin=*/0, KDialogBase::spacingHint()); + TQGroupBox *gbSys = new TQGroupBox(3, Qt::Vertical, i18n("System Tray Icon"), this); + tqlayout->addWidget(gbSys); + TQVBoxLayout *sysLay = new TQVBoxLayout(gbSys, /*margin=*/0, KDialogBase::spacingHint()); // Dock in System Tray: - m_useSystray = new QCheckBox(i18n("&Dock in system tray"), gbSys); + m_useSystray = new TQCheckBox(i18n("&Dock in system tray"), gbSys); sysLay->addWidget(m_useSystray); - connect( m_useSystray, SIGNAL(stateChanged(int)), this, SLOT(changed()) ); + connect( m_useSystray, TQT_SIGNAL(stateChanged(int)), this, TQT_SLOT(changed()) ); - m_systray = new QWidget(gbSys); - QVBoxLayout *subSysLay = new QVBoxLayout(m_systray, /*margin=*/0, KDialogBase::spacingHint()); + m_systray = new TQWidget(gbSys); + TQVBoxLayout *subSysLay = new TQVBoxLayout(m_systray, /*margin=*/0, KDialogBase::spacingHint()); sysLay->addWidget(m_systray); // Show Current Basket Icon in System Tray Icon: - m_showIconInSystray = new QCheckBox(i18n("&Show current basket icon in system tray icon"), m_systray); + m_showIconInSystray = new TQCheckBox(i18n("&Show current basket icon in system tray icon"), m_systray); subSysLay->addWidget(m_showIconInSystray); - connect(m_showIconInSystray, SIGNAL(stateChanged(int)), this, SLOT(changed())); + connect(m_showIconInSystray, TQT_SIGNAL(stateChanged(int)), this, TQT_SLOT(changed())); - QGridLayout *gs = new QGridLayout(0, /*nRows=*/2, /*nCols=*/3); + TQGridLayout *gs = new TQGridLayout(0, /*nRows=*/2, /*nCols=*/3); subSysLay->addLayout(gs); - gs->addItem(new QSpacerItem(0, 0, QSizePolicy::Expanding), 0, 2); + gs->addItem(new TQSpacerItem(0, 0, TQSizePolicy::Expanding), 0, 2); // Hide Main Window when Mouse Goes out of it for Some Time: m_timeToHideOnMouseOut = new KIntNumInput(0, m_systray); - m_hideOnMouseOut = new QCheckBox(i18n("&Hide main window when mouse leaves it for"), m_systray); + m_hideOnMouseOut = new TQCheckBox(i18n("&Hide main window when mouse leaves it for"), m_systray); m_timeToHideOnMouseOut->setRange(0, 600, 1, false); m_timeToHideOnMouseOut->setSuffix(i18n(" tenths of seconds")); gs->addWidget(m_hideOnMouseOut, 0, 0); gs->addWidget(m_timeToHideOnMouseOut, 0, 1); - connect(m_hideOnMouseOut, SIGNAL(stateChanged(int)), this, SLOT(changed())); - connect(m_timeToHideOnMouseOut, SIGNAL(valueChanged (int)), this, SLOT(changed())); + connect(m_hideOnMouseOut, TQT_SIGNAL(stateChanged(int)), this, TQT_SLOT(changed())); + connect(m_timeToHideOnMouseOut, TQT_SIGNAL(valueChanged (int)), this, TQT_SLOT(changed())); // subSysLay->addWidget( // Show Main Window when Mouse Hovers over the System Tray Icon for Some Time: m_timeToShowOnMouseIn = new KIntNumInput(0, m_systray); - m_showOnMouseIn = new QCheckBox(i18n("Show &main window when mouse hovers over the system tray icon for"), m_systray); + m_showOnMouseIn = new TQCheckBox(i18n("Show &main window when mouse hovers over the system tray icon for"), m_systray); m_timeToShowOnMouseIn->setRange(0, 600, 1, false); m_timeToShowOnMouseIn->setSuffix(i18n(" tenths of seconds")); gs->addWidget(m_showOnMouseIn, 1, 0); gs->addWidget(m_timeToShowOnMouseIn, 1, 1); - connect(m_showOnMouseIn, SIGNAL(stateChanged(int)), this, SLOT(changed())); - connect(m_timeToShowOnMouseIn, SIGNAL(valueChanged (int)), this, SLOT(changed())); + connect(m_showOnMouseIn, TQT_SIGNAL(stateChanged(int)), this, TQT_SLOT(changed())); + connect(m_timeToShowOnMouseIn, TQT_SIGNAL(valueChanged (int)), this, TQT_SLOT(changed())); - connect( m_hideOnMouseOut, SIGNAL(toggled(bool)), m_timeToHideOnMouseOut, SLOT(setEnabled(bool)) ); - connect( m_showOnMouseIn, SIGNAL(toggled(bool)), m_timeToShowOnMouseIn, SLOT(setEnabled(bool)) ); + connect( m_hideOnMouseOut, TQT_SIGNAL(toggled(bool)), m_timeToHideOnMouseOut, TQT_SLOT(setEnabled(bool)) ); + connect( m_showOnMouseIn, TQT_SIGNAL(toggled(bool)), m_timeToShowOnMouseIn, TQT_SLOT(setEnabled(bool)) ); - connect( m_useSystray, SIGNAL(toggled(bool)), m_systray, SLOT(setEnabled(bool)) ); + connect( m_useSystray, TQT_SIGNAL(toggled(bool)), m_systray, TQT_SLOT(setEnabled(bool)) ); - layout->insertStretch(-1); + tqlayout->insertStretch(-1); load(); } @@ -499,45 +499,45 @@ void GeneralPage::defaults() /** BasketsPage */ -BasketsPage::BasketsPage(QWidget * parent, const char * name) - : KCModule(parent, name) +BasketsPage::BasketsPage(TQWidget * tqparent, const char * name) + : KCModule(tqparent, name) { - QVBoxLayout *layout = new QVBoxLayout(this, /*margin=*/0, KDialogBase::spacingHint()); - QHBoxLayout *hLay; + TQVBoxLayout *tqlayout = new TQVBoxLayout(this, /*margin=*/0, KDialogBase::spacingHint()); + TQHBoxLayout *hLay; HelpLabel *hLabel; // Appearance: - QGroupBox *appearanceBox = new QGroupBox(3, Qt::Vertical, i18n("Appearance"), this); - layout->addWidget(appearanceBox); + TQGroupBox *appearanceBox = new TQGroupBox(3, Qt::Vertical, i18n("Appearance"), this); + tqlayout->addWidget(appearanceBox); - m_playAnimations = new QCheckBox(i18n("Ani&mate changes in baskets"), appearanceBox); - connect( m_playAnimations, SIGNAL(stateChanged(int)), this, SLOT(changed()) ); + m_playAnimations = new TQCheckBox(i18n("Ani&mate changes in baskets"), appearanceBox); + connect( m_playAnimations, TQT_SIGNAL(stateChanged(int)), this, TQT_SLOT(changed()) ); - m_showNotesToolTip = new QCheckBox(i18n("&Show tooltips in baskets"), appearanceBox); - connect( m_showNotesToolTip, SIGNAL(stateChanged(int)), this, SLOT(changed()) ); + m_showNotesToolTip = new TQCheckBox(i18n("&Show tooltips in baskets"), appearanceBox); + connect( m_showNotesToolTip, TQT_SIGNAL(stateChanged(int)), this, TQT_SLOT(changed()) ); - m_bigNotes = new QCheckBox(i18n("&Big notes"), appearanceBox); - connect( m_bigNotes, SIGNAL(stateChanged(int)), this, SLOT(changed()) ); + m_bigNotes = new TQCheckBox(i18n("&Big notes"), appearanceBox); + connect( m_bigNotes, TQT_SIGNAL(stateChanged(int)), this, TQT_SLOT(changed()) ); // Behavior: - QGroupBox *behaviorBox = new QGroupBox(5, Qt::Vertical, i18n("Behavior"), this); - layout->addWidget(behaviorBox); + TQGroupBox *behaviorBox = new TQGroupBox(5, Qt::Vertical, i18n("Behavior"), this); + tqlayout->addWidget(behaviorBox); - m_autoBullet = new QCheckBox(i18n("&Transform lines starting with * or - to lists in text editors"), behaviorBox); - connect( m_autoBullet, SIGNAL(stateChanged(int)), this, SLOT(changed()) ); + m_autoBullet = new TQCheckBox(i18n("&Transform lines starting with * or - to lists in text editors"), behaviorBox); + connect( m_autoBullet, TQT_SIGNAL(stateChanged(int)), this, TQT_SLOT(changed()) ); - m_confirmNoteDeletion = new QCheckBox(i18n("Ask confirmation before &deleting notes"), behaviorBox); - connect( m_confirmNoteDeletion, SIGNAL(stateChanged(int)), this, SLOT(changed()) ); + m_confirmNoteDeletion = new TQCheckBox(i18n("Ask confirmation before &deleting notes"), behaviorBox); + connect( m_confirmNoteDeletion, TQT_SIGNAL(stateChanged(int)), this, TQT_SLOT(changed()) ); - QWidget *widget = new QWidget(behaviorBox); - hLay = new QHBoxLayout(widget, /*margin=*/0, KDialogBase::spacingHint()); - m_exportTextTags = new QCheckBox(i18n("&Export tags in texts"), widget); - connect( m_exportTextTags, SIGNAL(stateChanged(int)), this, SLOT(changed()) ); + TQWidget *widget = new TQWidget(behaviorBox); + hLay = new TQHBoxLayout(widget, /*margin=*/0, KDialogBase::spacingHint()); + m_exportTextTags = new TQCheckBox(i18n("&Export tags in texts"), widget); + connect( m_exportTextTags, TQT_SIGNAL(stateChanged(int)), this, TQT_SLOT(changed()) ); - QPixmap pixmapHelp(KGlobal::dirs()->findResource("data", "basket/images/tag_export_help.png")); - QMimeSourceFactory::defaultFactory()->setPixmap("__resource_help_tag_export.png", pixmapHelp); + TQPixmap pixmapHelp(KGlobal::dirs()->findResource("data", "basket/images/tag_export_help.png")); + TQMimeSourceFactory::defaultFactory()->setPixmap("__resource_help_tag_export.png", pixmapHelp); hLabel = new HelpLabel( i18n("When does this apply?"), "<p>" + i18n("It does apply when you copy and paste, or drag and drop notes to a text editor.") + "</p>" + @@ -550,11 +550,11 @@ BasketsPage::BasketsPage(QWidget * parent, const char * name) hLay->addWidget(hLabel); hLay->addStretch(); - m_groupOnInsertionLineWidget = new QWidget(behaviorBox); - QHBoxLayout *hLayV = new QHBoxLayout(m_groupOnInsertionLineWidget, /*margin=*/0, KDialogBase::spacingHint()); - m_groupOnInsertionLine = new QCheckBox(i18n("&Group a new note when clicking on the right of the insertion line"), m_groupOnInsertionLineWidget); - QPixmap pixmap(KGlobal::dirs()->findResource("data", "basket/images/insertion_help.png")); - QMimeSourceFactory::defaultFactory()->setPixmap("__resource_help_insertion_line.png", pixmap); + m_groupOnInsertionLineWidget = new TQWidget(behaviorBox); + TQHBoxLayout *hLayV = new TQHBoxLayout(m_groupOnInsertionLineWidget, /*margin=*/0, KDialogBase::spacingHint()); + m_groupOnInsertionLine = new TQCheckBox(i18n("&Group a new note when clicking on the right of the insertion line"), m_groupOnInsertionLineWidget); + TQPixmap pixmap(KGlobal::dirs()->findResource("data", "basket/images/insertion_help.png")); + TQMimeSourceFactory::defaultFactory()->setPixmap("__resource_help_insertion_line.png", pixmap); HelpLabel *helpV = new HelpLabel( i18n("How to group a new note?"), i18n("<p>When this option is enabled, the insertion-line not only allows you to insert notes at the cursor position, but also allows you to group a new note with the one under the cursor:</p>") + @@ -566,14 +566,14 @@ BasketsPage::BasketsPage(QWidget * parent, const char * name) hLayV->addWidget(m_groupOnInsertionLine); hLayV->addWidget(helpV); hLayV->insertStretch(-1); - layout->addWidget(m_groupOnInsertionLineWidget); - connect(m_groupOnInsertionLine, SIGNAL(stateChanged(int)), this, SLOT(changed())); + tqlayout->addWidget(m_groupOnInsertionLineWidget); + connect(m_groupOnInsertionLine, TQT_SIGNAL(stateChanged(int)), this, TQT_SLOT(changed())); - widget = new QWidget(behaviorBox); - QGridLayout *ga = new QGridLayout(widget, /*nRows=*/3, /*nCols=*/4, /*margin=*/0, KDialogBase::spacingHint()); - ga->addItem(new QSpacerItem(0, 0, QSizePolicy::Expanding), 0, 3); + widget = new TQWidget(behaviorBox); + TQGridLayout *ga = new TQGridLayout(widget, /*nRows=*/3, /*nCols=*/4, /*margin=*/0, KDialogBase::spacingHint()); + ga->addItem(new TQSpacerItem(0, 0, TQSizePolicy::Expanding), 0, 3); - m_middleAction = new QComboBox(widget); + m_middleAction = new TQComboBox(widget); m_middleAction->insertItem( i18n("Do nothing") ); m_middleAction->insertItem( i18n("Paste clipboard") ); m_middleAction->insertItem( i18n("Insert image note") ); @@ -585,41 +585,41 @@ BasketsPage::BasketsPage(QWidget * parent, const char * name) m_middleAction->insertItem( i18n("Load note from file") ); m_middleAction->insertItem( i18n("Import Launcher from KDE Menu") ); m_middleAction->insertItem( i18n("Import icon") ); - QLabel *labelM = new QLabel(m_middleAction, i18n("&Shift+middle-click anywhere:"), widget); + TQLabel *labelM = new TQLabel(m_middleAction, i18n("&Shift+middle-click anywhere:"), widget); ga->addWidget(labelM, 0, 0); ga->addWidget(m_middleAction, 0, 1); - ga->addWidget(new QLabel(i18n("at cursor position"), widget), 0, 2); - connect( m_middleAction, SIGNAL(activated(int)), this, SLOT(changed()) ); + ga->addWidget(new TQLabel(i18n("at cursor position"), widget), 0, 2); + connect( m_middleAction, TQT_SIGNAL(activated(int)), this, TQT_SLOT(changed()) ); // Protection: - QGroupBox *protectionBox = new QGroupBox(3, Qt::Vertical, i18n("Password Protection"), this); - layout->addWidget(protectionBox); - widget = new QWidget(protectionBox); + TQGroupBox *protectionBox = new TQGroupBox(3, Qt::Vertical, i18n("Password Protection"), this); + tqlayout->addWidget(protectionBox); + widget = new TQWidget(protectionBox); // Re-Lock timeout configuration - hLay = new QHBoxLayout(widget, /*margin=*/0, KDialogBase::spacingHint()); - m_enableReLockTimeoutMinutes = new QCheckBox(i18n("A&utomatically lock protected baskets when closed for"), widget); + hLay = new TQHBoxLayout(widget, /*margin=*/0, KDialogBase::spacingHint()); + m_enableReLockTimeoutMinutes = new TQCheckBox(i18n("A&utomatically lock protected baskets when closed for"), widget); hLay->addWidget(m_enableReLockTimeoutMinutes); m_reLockTimeoutMinutes = new KIntNumInput(widget); m_reLockTimeoutMinutes->setMinValue(0); m_reLockTimeoutMinutes->setSuffix(i18n(" minutes")); hLay->addWidget(m_reLockTimeoutMinutes); - //label = new QLabel(i18n("minutes"), this); + //label = new TQLabel(i18n("minutes"), this); //hLay->addWidget(label); hLay->addStretch(); -// layout->addLayout(hLay); - connect( m_enableReLockTimeoutMinutes, SIGNAL(stateChanged(int)), this, SLOT(changed()) ); - connect( m_reLockTimeoutMinutes, SIGNAL(valueChanged(int)), this, SLOT(changed()) ); - connect( m_enableReLockTimeoutMinutes, SIGNAL(toggled(bool)), m_reLockTimeoutMinutes, SLOT(setEnabled(bool)) ); +// tqlayout->addLayout(hLay); + connect( m_enableReLockTimeoutMinutes, TQT_SIGNAL(stateChanged(int)), this, TQT_SLOT(changed()) ); + connect( m_reLockTimeoutMinutes, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(changed()) ); + connect( m_enableReLockTimeoutMinutes, TQT_SIGNAL(toggled(bool)), m_reLockTimeoutMinutes, TQT_SLOT(setEnabled(bool)) ); #ifdef HAVE_LIBGPGME - m_useGnuPGAgent = new QCheckBox(i18n("Use GnuPG agent for &private/public key protected baskets"), protectionBox); + m_useGnuPGAgent = new TQCheckBox(i18n("Use GnuPG agent for &private/public key protected baskets"), protectionBox); // hLay->addWidget(m_useGnuPGAgent); - connect( m_useGnuPGAgent, SIGNAL(stateChanged(int)), this, SLOT(changed()) ); + connect( m_useGnuPGAgent, TQT_SIGNAL(stateChanged(int)), this, TQT_SLOT(changed()) ); #endif - layout->insertStretch(-1); + tqlayout->insertStretch(-1); load(); } @@ -679,70 +679,70 @@ void BasketsPage::defaults() /** class NewNotesPage: */ -NewNotesPage::NewNotesPage(QWidget * parent, const char * name) - : KCModule(parent, name) +NewNotesPage::NewNotesPage(TQWidget * tqparent, const char * name) + : KCModule(tqparent, name) { - QVBoxLayout *layout = new QVBoxLayout(this, /*margin=*/0, KDialogBase::spacingHint()); - QHBoxLayout *hLay; - QLabel *label; + TQVBoxLayout *tqlayout = new TQVBoxLayout(this, /*margin=*/0, KDialogBase::spacingHint()); + TQHBoxLayout *hLay; + TQLabel *label; // Place of New Notes: - hLay = new QHBoxLayout(0L, /*margin=*/0, KDialogBase::spacingHint()); - m_newNotesPlace = new QComboBox(this); - label = new QLabel(m_newNotesPlace, i18n("&Place of new notes:"), this); + hLay = new TQHBoxLayout(0L, /*margin=*/0, KDialogBase::spacingHint()); + m_newNotesPlace = new TQComboBox(this); + label = new TQLabel(m_newNotesPlace, i18n("&Place of new notes:"), this); m_newNotesPlace->insertItem(i18n("On top")); m_newNotesPlace->insertItem(i18n("On bottom")); m_newNotesPlace->insertItem(i18n("At current note")); hLay->addWidget(label); hLay->addWidget(m_newNotesPlace); hLay->addStretch(); - //layout->addLayout(hLay); + //tqlayout->addLayout(hLay); label->hide(); m_newNotesPlace->hide(); - connect( m_newNotesPlace, SIGNAL(textChanged(const QString &)), this, SLOT(changed()) ); + connect( m_newNotesPlace, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(changed()) ); // New Images Size: - hLay = new QHBoxLayout(0L, /*margin=*/0, KDialogBase::spacingHint()); + hLay = new TQHBoxLayout(0L, /*margin=*/0, KDialogBase::spacingHint()); m_imgSizeX = new KIntNumInput(this); m_imgSizeX->setMinValue(1); m_imgSizeX->setMaxValue(4096); m_imgSizeX->setReferencePoint(100); - connect( m_imgSizeX, SIGNAL(valueChanged(int)), this, SLOT(changed()) ); - label = new QLabel(m_imgSizeX, i18n("&New images size:"), this); + connect( m_imgSizeX, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(changed()) ); + label = new TQLabel(m_imgSizeX, i18n("&New images size:"), this); hLay->addWidget(label); hLay->addWidget(m_imgSizeX); m_imgSizeY = new KIntNumInput(this); m_imgSizeY->setMinValue(1); m_imgSizeY->setMaxValue(4096); m_imgSizeY->setReferencePoint(100); - connect( m_imgSizeY, SIGNAL(valueChanged(int)), this, SLOT(changed()) ); - label = new QLabel(m_imgSizeY, i18n("&by"), this); + connect( m_imgSizeY, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(changed()) ); + label = new TQLabel(m_imgSizeY, i18n("&by"), this); hLay->addWidget(label); hLay->addWidget(m_imgSizeY); - label = new QLabel(i18n("pixels"), this); + label = new TQLabel(i18n("pixels"), this); hLay->addWidget(label); - m_pushVisualize = new QPushButton(i18n("&Visualize..."), this); + m_pushVisualize = new TQPushButton(i18n("&Visualize..."), this); hLay->addWidget(m_pushVisualize); hLay->addStretch(); - layout->addLayout(hLay); - connect( m_pushVisualize, SIGNAL(clicked()), this, SLOT(visualize()) ); + tqlayout->addLayout(hLay); + connect( m_pushVisualize, TQT_SIGNAL(clicked()), this, TQT_SLOT(visualize()) ); // View File Content: - QVButtonGroup *buttonGroup = new QVButtonGroup(i18n("View Content of Added Files for the Following Types"), this); - m_viewTextFileContent = new QCheckBox( i18n("&Plain text"), buttonGroup ); - m_viewHtmlFileContent = new QCheckBox( i18n("&HTML page"), buttonGroup ); - m_viewImageFileContent = new QCheckBox( i18n("&Image or animation"), buttonGroup ); - m_viewSoundFileContent = new QCheckBox( i18n("&Sound"), buttonGroup ); - layout->addWidget(buttonGroup); - connect( m_viewTextFileContent, SIGNAL(stateChanged(int)), this, SLOT(changed()) ); - connect( m_viewHtmlFileContent, SIGNAL(stateChanged(int)), this, SLOT(changed()) ); - connect( m_viewImageFileContent, SIGNAL(stateChanged(int)), this, SLOT(changed()) ); - connect( m_viewSoundFileContent, SIGNAL(stateChanged(int)), this, SLOT(changed()) ); - - layout->insertStretch(-1); + TQVButtonGroup *buttonGroup = new TQVButtonGroup(i18n("View Content of Added Files for the Following Types"), this); + m_viewTextFileContent = new TQCheckBox( i18n("&Plain text"), buttonGroup ); + m_viewHtmlFileContent = new TQCheckBox( i18n("&HTML page"), buttonGroup ); + m_viewImageFileContent = new TQCheckBox( i18n("&Image or animation"), buttonGroup ); + m_viewSoundFileContent = new TQCheckBox( i18n("&Sound"), buttonGroup ); + tqlayout->addWidget(buttonGroup); + connect( m_viewTextFileContent, TQT_SIGNAL(stateChanged(int)), this, TQT_SLOT(changed()) ); + connect( m_viewHtmlFileContent, TQT_SIGNAL(stateChanged(int)), this, TQT_SLOT(changed()) ); + connect( m_viewImageFileContent, TQT_SIGNAL(stateChanged(int)), this, TQT_SLOT(changed()) ); + connect( m_viewSoundFileContent, TQT_SIGNAL(stateChanged(int)), this, TQT_SLOT(changed()) ); + + tqlayout->insertStretch(-1); load(); } @@ -787,18 +787,18 @@ void NewNotesPage::visualize() /** class NotesAppearancePage: */ -NotesAppearancePage::NotesAppearancePage(QWidget * parent, const char * name) - : KCModule(parent, name) +NotesAppearancePage::NotesAppearancePage(TQWidget * tqparent, const char * name) + : KCModule(tqparent, name) { - QVBoxLayout *layout = new QVBoxLayout(this, /*margin=*/0, KDialogBase::spacingHint()); - QTabWidget *tabs = new QTabWidget(this); - layout->addWidget(tabs); + TQVBoxLayout *tqlayout = new TQVBoxLayout(this, /*margin=*/0, KDialogBase::spacingHint()); + TQTabWidget *tabs = new TQTabWidget(this); + tqlayout->addWidget(tabs); m_soundLook = new LinkLookEditWidget(this, i18n("Conference audio record"), "sound", tabs); m_fileLook = new LinkLookEditWidget(this, i18n("Annual report"), "document", tabs); m_localLinkLook = new LinkLookEditWidget(this, i18n("Home folder"), "folder_home", tabs); m_networkLinkLook = new LinkLookEditWidget(this, "www.kde.org", KMimeType::iconForURL("http://www.kde.org"), tabs); - m_launcherLook = new LinkLookEditWidget(this, i18n("Launch %1").arg(kapp->aboutData()->programName()), "basket", tabs); + m_launcherLook = new LinkLookEditWidget(this, i18n("Launch %1").tqarg(kapp->aboutData()->programName()), "basket", tabs); tabs->addTab(m_soundLook, i18n("&Sounds") ); tabs->addTab(m_fileLook, i18n("&Files") ); tabs->addTab(m_localLinkLook, i18n("&Local Links") ); @@ -834,74 +834,74 @@ void NotesAppearancePage::defaults() /** class ApplicationsPage: */ -ApplicationsPage::ApplicationsPage(QWidget * parent, const char * name) - : KCModule(parent, name) +ApplicationsPage::ApplicationsPage(TQWidget * tqparent, const char * name) + : KCModule(tqparent, name) { /* Applications page */ - QVBoxLayout *layout = new QVBoxLayout(this, /*margin=*/0, KDialogBase::spacingHint()); + TQVBoxLayout *tqlayout = new TQVBoxLayout(this, /*margin=*/0, KDialogBase::spacingHint()); - m_htmlUseProg = new QCheckBox(i18n("Open &text notes with a custom application:"), this); + m_htmlUseProg = new TQCheckBox(i18n("Open &text notes with a custom application:"), this); m_htmlProg = new RunCommandRequester("", i18n("Open text notes with:"), this); - QHBoxLayout *hLayH = new QHBoxLayout(0L, /*margin=*/0, KDialogBase::spacingHint()); + TQHBoxLayout *hLayH = new TQHBoxLayout(0L, /*margin=*/0, KDialogBase::spacingHint()); hLayH->insertSpacing(-1, 20); hLayH->addWidget(m_htmlProg); - connect(m_htmlUseProg, SIGNAL(stateChanged(int)), this, SLOT(changed())); - connect(m_htmlProg->lineEdit(), SIGNAL(textChanged(const QString &)), this, SLOT(changed())); + connect(m_htmlUseProg, TQT_SIGNAL(stateChanged(int)), this, TQT_SLOT(changed())); + connect(m_htmlProg->lineEdit(), TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(changed())); - m_imageUseProg = new QCheckBox(i18n("Open &image notes with a custom application:"), this); + m_imageUseProg = new TQCheckBox(i18n("Open &image notes with a custom application:"), this); m_imageProg = new RunCommandRequester("", i18n("Open image notes with:"), this); - QHBoxLayout *hLayI = new QHBoxLayout(0L, /*margin=*/0, KDialogBase::spacingHint()); + TQHBoxLayout *hLayI = new TQHBoxLayout(0L, /*margin=*/0, KDialogBase::spacingHint()); hLayI->insertSpacing(-1, 20); hLayI->addWidget(m_imageProg); - connect(m_imageUseProg, SIGNAL(stateChanged(int)), this, SLOT(changed())); - connect(m_imageProg->lineEdit(), SIGNAL(textChanged(const QString &)), this, SLOT(changed())); + connect(m_imageUseProg, TQT_SIGNAL(stateChanged(int)), this, TQT_SLOT(changed())); + connect(m_imageProg->lineEdit(), TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(changed())); - m_animationUseProg = new QCheckBox(i18n("Open a&nimation notes with a custom application:"), this); + m_animationUseProg = new TQCheckBox(i18n("Open a&nimation notes with a custom application:"), this); m_animationProg = new RunCommandRequester("", i18n("Open animation notes with:"), this); - QHBoxLayout *hLayA = new QHBoxLayout(0L, /*margin=*/0, KDialogBase::spacingHint()); + TQHBoxLayout *hLayA = new TQHBoxLayout(0L, /*margin=*/0, KDialogBase::spacingHint()); hLayA->insertSpacing(-1, 20); hLayA->addWidget(m_animationProg); - connect(m_animationUseProg, SIGNAL(stateChanged(int)), this, SLOT(changed())); - connect(m_animationProg->lineEdit(), SIGNAL(textChanged(const QString &)), this, SLOT(changed())); + connect(m_animationUseProg, TQT_SIGNAL(stateChanged(int)), this, TQT_SLOT(changed())); + connect(m_animationProg->lineEdit(), TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(changed())); - m_soundUseProg = new QCheckBox(i18n("Open so&und notes with a custom application:"), this); + m_soundUseProg = new TQCheckBox(i18n("Open so&und notes with a custom application:"), this); m_soundProg = new RunCommandRequester("", i18n("Open sound notes with:"), this); - QHBoxLayout *hLayS = new QHBoxLayout(0L, /*margin=*/0, KDialogBase::spacingHint()); + TQHBoxLayout *hLayS = new TQHBoxLayout(0L, /*margin=*/0, KDialogBase::spacingHint()); hLayS->insertSpacing(-1, 20); hLayS->addWidget(m_soundProg); - connect(m_soundUseProg, SIGNAL(stateChanged(int)), this, SLOT(changed())); - connect(m_soundProg->lineEdit(), SIGNAL(textChanged(const QString &)), this, SLOT(changed())); + connect(m_soundUseProg, TQT_SIGNAL(stateChanged(int)), this, TQT_SLOT(changed())); + connect(m_soundProg->lineEdit(), TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(changed())); - QString whatsthis = i18n( + TQString whatsthis = i18n( "<p>If checked, the application defined below will be used when opening that type of note.</p>" "<p>Otherwise, the application you've configured in Konqueror will be used.</p>"); - QWhatsThis::add(m_htmlUseProg, whatsthis); - QWhatsThis::add(m_imageUseProg, whatsthis); - QWhatsThis::add(m_animationUseProg, whatsthis); - QWhatsThis::add(m_soundUseProg, whatsthis); + TQWhatsThis::add(m_htmlUseProg, whatsthis); + TQWhatsThis::add(m_imageUseProg, whatsthis); + TQWhatsThis::add(m_animationUseProg, whatsthis); + TQWhatsThis::add(m_soundUseProg, whatsthis); whatsthis = i18n( "<p>Define the application to use for opening that type of note instead of the " "application configured in Konqueror.</p>"); - QWhatsThis::add(m_htmlProg, whatsthis); - QWhatsThis::add(m_imageProg, whatsthis); - QWhatsThis::add(m_animationProg, whatsthis); - QWhatsThis::add(m_soundProg, whatsthis); + TQWhatsThis::add(m_htmlProg, whatsthis); + TQWhatsThis::add(m_imageProg, whatsthis); + TQWhatsThis::add(m_animationProg, whatsthis); + TQWhatsThis::add(m_soundProg, whatsthis); - layout->addWidget(m_htmlUseProg); - layout->addItem(hLayH); - layout->addWidget(m_imageUseProg); - layout->addItem(hLayI); - layout->addWidget(m_animationUseProg); - layout->addItem(hLayA); - layout->addWidget(m_soundUseProg); - layout->addItem(hLayS); + tqlayout->addWidget(m_htmlUseProg); + tqlayout->addItem(hLayH); + tqlayout->addWidget(m_imageUseProg); + tqlayout->addItem(hLayI); + tqlayout->addWidget(m_animationUseProg); + tqlayout->addItem(hLayA); + tqlayout->addWidget(m_soundUseProg); + tqlayout->addItem(hLayS); - layout->addSpacing(KDialogBase::spacingHint()); + tqlayout->addSpacing(KDialogBase::spacingHint()); - QHBoxLayout *hLay = new QHBoxLayout(0L, /*margin=*/0, /*spacing=*/0); + TQHBoxLayout *hLay = new TQHBoxLayout(0L, /*margin=*/0, /*spacing=*/0); HelpLabel *hl1 = new HelpLabel( i18n("How to change the application used to open Web links?"), i18n("<p>When opening Web links, they are opened in different applications, depending on the content of the link " @@ -918,9 +918,9 @@ ApplicationsPage::ApplicationsPage(QWidget * parent, const char * name) this); hLay->addWidget(hl1); hLay->addStretch(); - layout->addLayout(hLay); + tqlayout->addLayout(hLay); - hLay = new QHBoxLayout(0L, /*margin=*/0, /*spacing=*/0); + hLay = new TQHBoxLayout(0L, /*margin=*/0, /*spacing=*/0); HelpLabel *hl2 = new HelpLabel( i18n("How to change the applications used to open files and links?"), i18n("<p>Here is how to set the application to be used for each type of file. " @@ -938,14 +938,14 @@ ApplicationsPage::ApplicationsPage(QWidget * parent, const char * name) this); hLay->addWidget(hl2); hLay->addStretch(); - layout->addLayout(hLay); + tqlayout->addLayout(hLay); - connect( m_htmlUseProg, SIGNAL(toggled(bool)), m_htmlProg, SLOT(setEnabled(bool)) ); - connect( m_imageUseProg, SIGNAL(toggled(bool)), m_imageProg, SLOT(setEnabled(bool)) ); - connect( m_animationUseProg, SIGNAL(toggled(bool)), m_animationProg, SLOT(setEnabled(bool)) ); - connect( m_soundUseProg, SIGNAL(toggled(bool)), m_soundProg, SLOT(setEnabled(bool)) ); + connect( m_htmlUseProg, TQT_SIGNAL(toggled(bool)), m_htmlProg, TQT_SLOT(setEnabled(bool)) ); + connect( m_imageUseProg, TQT_SIGNAL(toggled(bool)), m_imageProg, TQT_SLOT(setEnabled(bool)) ); + connect( m_animationUseProg, TQT_SIGNAL(toggled(bool)), m_animationProg, TQT_SLOT(setEnabled(bool)) ); + connect( m_soundUseProg, TQT_SIGNAL(toggled(bool)), m_soundProg, TQT_SLOT(setEnabled(bool)) ); - layout->insertStretch(-1); + tqlayout->insertStretch(-1); load(); } |