|
|
|
@ -132,17 +132,17 @@ KnowitPreferences::KnowitPreferences()
|
|
|
|
|
: KDialogBase(IconList, i18n("KnowIt Preferences"), Ok|Cancel, Ok)
|
|
|
|
|
{
|
|
|
|
|
TQFrame* page;
|
|
|
|
|
TQVBoxLayout* tqlayout;
|
|
|
|
|
TQVBoxLayout* layout;
|
|
|
|
|
|
|
|
|
|
/* first page: General */
|
|
|
|
|
page = addPage(i18n("General"), i18n("General options"),
|
|
|
|
|
KGlobal::iconLoader()->loadIcon(TQString("configure"), KIcon::Toolbar, KIcon::SizeMedium));
|
|
|
|
|
tqlayout = new TQVBoxLayout(page, 0, spacingHint());
|
|
|
|
|
tqlayout->addWidget(docked = new TQCheckBox(i18n("&Dock in System tray"), page, "Dock"));
|
|
|
|
|
tqlayout->addWidget(reopen = new TQCheckBox(i18n("Open &last file on startup"), page, "Reopen"));
|
|
|
|
|
layout = new TQVBoxLayout(page, 0, spacingHint());
|
|
|
|
|
layout->addWidget(docked = new TQCheckBox(i18n("&Dock in System tray"), page, "Dock"));
|
|
|
|
|
layout->addWidget(reopen = new TQCheckBox(i18n("Open &last file on startup"), page, "Reopen"));
|
|
|
|
|
|
|
|
|
|
TQHBox* autosaveBox = new TQHBox(page);
|
|
|
|
|
tqlayout->addWidget(autosaveBox);
|
|
|
|
|
layout->addWidget(autosaveBox);
|
|
|
|
|
new TQLabel(i18n("Autosave:"), autosaveBox);
|
|
|
|
|
autosave = new TQSpinBox(0, 120, 5, autosaveBox, "Autosave");
|
|
|
|
|
autosave->setPrefix(i18n("every "));
|
|
|
|
@ -151,32 +151,32 @@ KnowitPreferences::KnowitPreferences()
|
|
|
|
|
TQWhatsThis::add(autosave, i18n("Current file will be automatically saved "
|
|
|
|
|
"after the specified interval. Set to <i>never</i> to disable autosave."));
|
|
|
|
|
|
|
|
|
|
tqlayout->addWidget(unconditionalSave = new TQCheckBox(i18n("Automatically save file on e&xit"),
|
|
|
|
|
layout->addWidget(unconditionalSave = new TQCheckBox(i18n("Automatically save file on e&xit"),
|
|
|
|
|
page, "UnconditionalSave"));
|
|
|
|
|
TQWhatsThis::add(unconditionalSave, i18n("Current file will be automatically saved "
|
|
|
|
|
"on exit without confirmation."));
|
|
|
|
|
tqlayout->addWidget(backup = new TQCheckBox(i18n("Create &backups"),
|
|
|
|
|
layout->addWidget(backup = new TQCheckBox(i18n("Create &backups"),
|
|
|
|
|
page, "Backup"));
|
|
|
|
|
TQWhatsThis::add(backup, i18n("Create backup of current document before it is saved."));
|
|
|
|
|
tqlayout->addWidget(multipleInstances = new TQCheckBox(i18n("Allow &multiple instances of KnowIt"),
|
|
|
|
|
layout->addWidget(multipleInstances = new TQCheckBox(i18n("Allow &multiple instances of KnowIt"),
|
|
|
|
|
page, "Instances"));
|
|
|
|
|
TQWhatsThis::add(multipleInstances, i18n("If this option is disabled, only one "
|
|
|
|
|
"instance of KnowIt will be allowed. If there is another instance already running, "
|
|
|
|
|
"it will be automatically activated instead of running new one."));
|
|
|
|
|
tqlayout->addStretch(1);
|
|
|
|
|
layout->addStretch(1);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* second page: Interface */
|
|
|
|
|
page = addPage(i18n("Interface"), i18n("Interface options"),
|
|
|
|
|
KGlobal::iconLoader()->loadIcon(TQString("misc"), KIcon::Toolbar, KIcon::SizeMedium));
|
|
|
|
|
tqlayout = new TQVBoxLayout(page, 0, spacingHint());
|
|
|
|
|
tqlayout->addWidget(horizontalSplit = new TQCheckBox(i18n("Split window &horizontally"), page, "Split"));
|
|
|
|
|
layout = new TQVBoxLayout(page, 0, spacingHint());
|
|
|
|
|
layout->addWidget(horizontalSplit = new TQCheckBox(i18n("Split window &horizontally"), page, "Split"));
|
|
|
|
|
TQWhatsThis::add(horizontalSplit, i18n("If this option is set, notes tree will "
|
|
|
|
|
"be displayed on the left and the editor on the right (this is default).<br>"
|
|
|
|
|
"Otherwise notes tree will be displayed at the top and the editor at the bottom."));
|
|
|
|
|
|
|
|
|
|
TQHBox* defaultNameBox = new TQHBox(page);
|
|
|
|
|
tqlayout->addWidget(defaultNameBox);
|
|
|
|
|
layout->addWidget(defaultNameBox);
|
|
|
|
|
new TQLabel(i18n("Default note name:"), defaultNameBox);
|
|
|
|
|
defaultName = new KLineEdit(defaultNameBox, "DefaultName");
|
|
|
|
|
TQWhatsThis::add(defaultName, i18n("Default name for new notes. It would be "
|
|
|
|
@ -184,7 +184,7 @@ KnowitPreferences::KnowitPreferences()
|
|
|
|
|
"consider setting default name to none."));
|
|
|
|
|
|
|
|
|
|
TQHBox* linkBox = new TQHBox(page);
|
|
|
|
|
tqlayout->addWidget(linkBox);
|
|
|
|
|
layout->addWidget(linkBox);
|
|
|
|
|
new TQLabel(i18n("Link format:"), linkBox);
|
|
|
|
|
linkFormat = new KComboBox(linkBox, "LinkFormat");
|
|
|
|
|
linkFormat->insertItem(i18n("Description (link)"));
|
|
|
|
@ -193,31 +193,31 @@ KnowitPreferences::KnowitPreferences()
|
|
|
|
|
linkFormat->insertItem(i18n("Description only"));
|
|
|
|
|
|
|
|
|
|
TQHBox* alternateBox = new TQHBox(page);
|
|
|
|
|
tqlayout->addWidget(alternateBox);
|
|
|
|
|
layout->addWidget(alternateBox);
|
|
|
|
|
alternateTree = new TQCheckBox(i18n("Alternate colors in tree"), alternateBox, "Alternate");
|
|
|
|
|
alternateColor = new KColorButton(TQColor("White"), alternateBox, "AlternateColor");
|
|
|
|
|
|
|
|
|
|
tqlayout->addWidget(autoCollapse = new TQCheckBox(i18n("Automatically collapse other notes"), page, "AutoCollapse"));
|
|
|
|
|
layout->addWidget(autoCollapse = new TQCheckBox(i18n("Automatically collapse other notes"), page, "AutoCollapse"));
|
|
|
|
|
TQWhatsThis::add(autoCollapse, i18n("If this option is set, only current subtree "
|
|
|
|
|
"will be visible, other notes will be automatically collapsed."));
|
|
|
|
|
tqlayout->addStretch(1);
|
|
|
|
|
layout->addStretch(1);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* third page: Editor */
|
|
|
|
|
page = addPage(i18n("Editor"), i18n("Editor options"),
|
|
|
|
|
KGlobal::iconLoader()->loadIcon(TQString("edit"), KIcon::Toolbar, KIcon::SizeMedium));
|
|
|
|
|
tqlayout = new TQVBoxLayout(page, 0, spacingHint());
|
|
|
|
|
tqlayout->addWidget(wordwrap = new TQCheckBox(i18n("Use &word wrap"),
|
|
|
|
|
layout = new TQVBoxLayout(page, 0, spacingHint());
|
|
|
|
|
layout->addWidget(wordwrap = new TQCheckBox(i18n("Use &word wrap"),
|
|
|
|
|
page, "WordWrap"));
|
|
|
|
|
tqlayout->addWidget(enterBreakLine = new TQCheckBox(i18n("'Enter' ends current line, not paragraph"),
|
|
|
|
|
layout->addWidget(enterBreakLine = new TQCheckBox(i18n("'Enter' ends current line, not paragraph"),
|
|
|
|
|
page, "EnterLineBreak"));
|
|
|
|
|
tqlayout->addWidget(tabfocus = new TQCheckBox(i18n("'Tab' in editor changes focus"),
|
|
|
|
|
layout->addWidget(tabfocus = new TQCheckBox(i18n("'Tab' in editor changes focus"),
|
|
|
|
|
page, "TabFocus"));
|
|
|
|
|
#if KDE_VERSION_MAJOR == 3 && KDE_VERSION_MINOR < 1
|
|
|
|
|
tabfocus->hide();
|
|
|
|
|
#endif
|
|
|
|
|
TQHBox* colorBox = new TQHBox(page);
|
|
|
|
|
tqlayout->addWidget(colorBox);
|
|
|
|
|
layout->addWidget(colorBox);
|
|
|
|
|
customColors = new TQCheckBox(i18n("Use &custom colors"), colorBox, "CustomColors");
|
|
|
|
|
editColors = new KDualColorButton(colorBox);
|
|
|
|
|
|
|
|
|
@ -226,7 +226,7 @@ KnowitPreferences::KnowitPreferences()
|
|
|
|
|
KFontChooser::getFontList(fontList, false);
|
|
|
|
|
|
|
|
|
|
TQHBox* fontBox = new TQHBox(page);
|
|
|
|
|
tqlayout->addWidget(fontBox);
|
|
|
|
|
layout->addWidget(fontBox);
|
|
|
|
|
customFont = new TQCheckBox(i18n("Use custom font:"), fontBox, "customFont");
|
|
|
|
|
fontFamily = new KComboBox(true, fontBox);
|
|
|
|
|
fontFamily->insertStringList(fontList);
|
|
|
|
@ -235,13 +235,13 @@ KnowitPreferences::KnowitPreferences()
|
|
|
|
|
fontSize->insertItem(TQString(TQString().setNum(fontSizes[i])),i);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
tqlayout->addStretch(1);
|
|
|
|
|
layout->addStretch(1);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* fourth page: Templates */
|
|
|
|
|
page = addPage(i18n("Templates"), i18n("Templates configuration"),
|
|
|
|
|
KGlobal::iconLoader()->loadIcon(TQString("wizard"), KIcon::Toolbar, KIcon::SizeMedium));
|
|
|
|
|
tqlayout = new TQVBoxLayout(page, 0, spacingHint());
|
|
|
|
|
layout = new TQVBoxLayout(page, 0, spacingHint());
|
|
|
|
|
TQWhatsThis::add(page, i18n("<html>\n"
|
|
|
|
|
"<p>These expressions may be used: </p>\n"
|
|
|
|
|
"<table>\n"
|
|
|
|
@ -266,13 +266,13 @@ KnowitPreferences::KnowitPreferences()
|
|
|
|
|
"</table></html>"));
|
|
|
|
|
|
|
|
|
|
TQHBox* topBox = new TQHBox(page);
|
|
|
|
|
tqlayout->addWidget(topBox);
|
|
|
|
|
layout->addWidget(topBox);
|
|
|
|
|
TQLabel * label1 = new TQLabel(i18n("Date Format: "), topBox);
|
|
|
|
|
label1->setFixedSize(label1->sizeHint());
|
|
|
|
|
insertDatePreview = new TQLabel("", topBox);
|
|
|
|
|
|
|
|
|
|
TQHBox *tmpBox = new TQHBox(page);
|
|
|
|
|
tqlayout->addWidget(tmpBox);
|
|
|
|
|
layout->addWidget(tmpBox);
|
|
|
|
|
insertDateColorButton = new KColorButton(TQColor("Blue"), tmpBox, "InsertDateColorButton");
|
|
|
|
|
insertDateFormatEdit = new KLineEdit(tmpBox, "InsertDateFormatEdit");
|
|
|
|
|
insertDateItalicButton = new TQToolButton(tmpBox,"InsertDateItalicButton");
|
|
|
|
@ -286,7 +286,7 @@ KnowitPreferences::KnowitPreferences()
|
|
|
|
|
insertDateUnderlineButton->setToggleButton(true);
|
|
|
|
|
insertDateColorButton->setFixedSize(insertDateBoldButton->sizeHint());
|
|
|
|
|
insertDateFormatEdit->setMinimumWidth(6*insertDateBoldButton->sizeHint().width());
|
|
|
|
|
tqlayout->addStretch(1);
|
|
|
|
|
layout->addStretch(1);
|
|
|
|
|
|
|
|
|
|
setIconListAllVisible(true);
|
|
|
|
|
}
|
|
|
|
|