help browser selection in prefs
This commit is contained in:
parent
1e806e88e1
commit
baf32fcbc1
@ -1,5 +1,5 @@
|
||||
#ifndef lint
|
||||
static char rcsid[] = "@(#$Id: guiutils.cpp,v 1.1 2006-01-27 13:43:04 dockes Exp $ (C) 2005 Jean-Francois Dockes";
|
||||
static char rcsid[] = "@(#$Id: guiutils.cpp,v 1.2 2006-01-30 09:28:50 dockes Exp $ (C) 2005 Jean-Francois Dockes";
|
||||
#endif
|
||||
/*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@ -114,6 +114,7 @@ void rwSettings(bool writing)
|
||||
SETTING_RW(prefs.mainwidth, "/Recoll/geometry/width", Num, 590);
|
||||
SETTING_RW(prefs.mainheight, "/Recoll/geometry/height", Num, 810);
|
||||
SETTING_RW(prefs.ssall, "/Recoll/prefs/simpleSearchAll", Bool, false);
|
||||
SETTING_RW(prefs.htmlBrowser, "/Recoll/prefs/htmlBrowser", , "");
|
||||
SETTING_RW(prefs.showicons, "/Recoll/prefs/reslist/showicons", Bool, true);
|
||||
SETTING_RW(prefs.respagesize, "/Recoll/prefs/reslist/pagelen", Num, 8);
|
||||
SETTING_RW(prefs.reslistfontfamily, "/Recoll/prefs/reslist/fontFamily", ,
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
#ifndef lint
|
||||
static char rcsid[] = "@(#$Id: main.cpp,v 1.35 2006-01-26 14:00:18 dockes Exp $ (C) 2005 J.F.Dockes";
|
||||
static char rcsid[] = "@(#$Id: main.cpp,v 1.36 2006-01-30 09:28:50 dockes Exp $ (C) 2005 J.F.Dockes";
|
||||
#endif
|
||||
/*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@ -49,7 +49,9 @@ using Rcl::AdvSearchData;
|
||||
#include "smallut.h"
|
||||
#include "rclinit.h"
|
||||
#include "debuglog.h"
|
||||
#ifdef WITH_KDE
|
||||
#include "rclversion.h"
|
||||
#endif
|
||||
#include "rclmain.h"
|
||||
#include "guiutils.h"
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
#ifndef lint
|
||||
static char rcsid[] = "@(#$Id: rclmain.cpp,v 1.10 2006-01-27 13:42:02 dockes Exp $ (C) 2005 J.F.Dockes";
|
||||
static char rcsid[] = "@(#$Id: rclmain.cpp,v 1.11 2006-01-30 09:28:50 dockes Exp $ (C) 2005 J.F.Dockes";
|
||||
#endif
|
||||
/*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@ -501,6 +501,10 @@ void RclMain::showAboutDialog()
|
||||
|
||||
void RclMain::startManual()
|
||||
{
|
||||
QString msg = tr("Starting help browser ");
|
||||
if (prefs.htmlBrowser != QString(""))
|
||||
msg += prefs.htmlBrowser;
|
||||
statusBar()->message(msg, 3000);
|
||||
startHelpBrowser();
|
||||
}
|
||||
|
||||
@ -560,7 +564,7 @@ void RclMain::enablePrevPage(bool yesno)
|
||||
void RclMain::showQueryDetails()
|
||||
{
|
||||
// Break query into lines of reasonable length, avoid cutting words!
|
||||
const int ll = 80;
|
||||
const unsigned int ll = 80;
|
||||
string query = currentQueryData.description;
|
||||
string oq;
|
||||
while (query.length() > 0) {
|
||||
|
||||
@ -8,8 +8,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>385</width>
|
||||
<height>280</height>
|
||||
<width>455</width>
|
||||
<height>238</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="caption">
|
||||
@ -39,51 +39,127 @@
|
||||
</property>
|
||||
<widget class="QLayoutWidget">
|
||||
<property name="name">
|
||||
<cstring>layout4</cstring>
|
||||
<cstring>layout10</cstring>
|
||||
</property>
|
||||
<grid>
|
||||
<vbox>
|
||||
<property name="name">
|
||||
<cstring>unnamed</cstring>
|
||||
</property>
|
||||
<widget class="QLabel" row="0" column="0" rowspan="1" colspan="2">
|
||||
<widget class="QLayoutWidget">
|
||||
<property name="name">
|
||||
<cstring>textLabel1</cstring>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Number of entries in a result page</string>
|
||||
<cstring>layout5</cstring>
|
||||
</property>
|
||||
<hbox>
|
||||
<property name="name">
|
||||
<cstring>unnamed</cstring>
|
||||
</property>
|
||||
<widget class="QLabel">
|
||||
<property name="name">
|
||||
<cstring>textLabel1</cstring>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy>
|
||||
<hsizetype>5</hsizetype>
|
||||
<vsizetype>5</vsizetype>
|
||||
<horstretch>1</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Number of entries in a result page</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QSpinBox">
|
||||
<property name="name">
|
||||
<cstring>pageLenSB</cstring>
|
||||
</property>
|
||||
<property name="minValue">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>8</number>
|
||||
</property>
|
||||
</widget>
|
||||
</hbox>
|
||||
</widget>
|
||||
<widget class="QLabel" row="1" column="0">
|
||||
<widget class="QLayoutWidget">
|
||||
<property name="name">
|
||||
<cstring>textLabel3</cstring>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Result list font</string>
|
||||
<cstring>layout6</cstring>
|
||||
</property>
|
||||
<hbox>
|
||||
<property name="name">
|
||||
<cstring>unnamed</cstring>
|
||||
</property>
|
||||
<widget class="QLabel">
|
||||
<property name="name">
|
||||
<cstring>textLabel3</cstring>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Result list font</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton">
|
||||
<property name="name">
|
||||
<cstring>reslistFontPB</cstring>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Helvetica-10</string>
|
||||
</property>
|
||||
<property name="toolTip" stdset="0">
|
||||
<string>Opens a dialog to select the result list font</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton">
|
||||
<property name="name">
|
||||
<cstring>resetFontPB</cstring>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Reset</string>
|
||||
</property>
|
||||
<property name="toolTip" stdset="0">
|
||||
<string>Resets the result list font to the system default</string>
|
||||
</property>
|
||||
</widget>
|
||||
</hbox>
|
||||
</widget>
|
||||
<widget class="QPushButton" row="1" column="1" rowspan="1" colspan="2">
|
||||
<widget class="QLayoutWidget">
|
||||
<property name="name">
|
||||
<cstring>reslistFontPB</cstring>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Helvetica-10</string>
|
||||
</property>
|
||||
<property name="toolTip" stdset="0">
|
||||
<string>Opens a dialog to select the result list font</string>
|
||||
<cstring>layout9</cstring>
|
||||
</property>
|
||||
<hbox>
|
||||
<property name="name">
|
||||
<cstring>unnamed</cstring>
|
||||
</property>
|
||||
<widget class="QLabel">
|
||||
<property name="name">
|
||||
<cstring>textLabel1_3</cstring>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>HTML help browser</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit">
|
||||
<property name="name">
|
||||
<cstring>helpBrowserLE</cstring>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>200</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton">
|
||||
<property name="name">
|
||||
<cstring>helpBrowserPB</cstring>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Select file</string>
|
||||
</property>
|
||||
</widget>
|
||||
</hbox>
|
||||
</widget>
|
||||
<widget class="QSpinBox" row="0" column="2" rowspan="1" colspan="2">
|
||||
<property name="name">
|
||||
<cstring>pageLenSB</cstring>
|
||||
</property>
|
||||
<property name="minValue">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>8</number>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QCheckBox" row="2" column="0" rowspan="1" colspan="4">
|
||||
<widget class="QCheckBox">
|
||||
<property name="name">
|
||||
<cstring>useIconsCB</cstring>
|
||||
</property>
|
||||
@ -94,18 +170,7 @@
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" row="1" column="3">
|
||||
<property name="name">
|
||||
<cstring>resetFontPB</cstring>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Reset</string>
|
||||
</property>
|
||||
<property name="toolTip" stdset="0">
|
||||
<string>Resets the result list font to the system default</string>
|
||||
</property>
|
||||
</widget>
|
||||
</grid>
|
||||
</vbox>
|
||||
</widget>
|
||||
</vbox>
|
||||
</widget>
|
||||
@ -302,6 +367,7 @@ May be slow for big documents.</string>
|
||||
<slot access="protected">accept()</slot>
|
||||
<slot>showFontDialog()</slot>
|
||||
<slot>resetReslistFont()</slot>
|
||||
<slot>showBrowserDialog()</slot>
|
||||
</slots>
|
||||
<functions>
|
||||
<function>init()</function>
|
||||
|
||||
@ -11,6 +11,7 @@
|
||||
*****************************************************************************/
|
||||
|
||||
#include "qfontdialog.h"
|
||||
#include "qfiledialog.h"
|
||||
#include "qspinbox.h"
|
||||
#include "qmessagebox.h"
|
||||
|
||||
@ -34,6 +35,7 @@ void UIPrefsDialog::init()
|
||||
reslistFontPB->setText(reslistFontFamily + "-" +
|
||||
s.setNum(reslistFontSize));
|
||||
}
|
||||
helpBrowserLE->setText(prefs.htmlBrowser);
|
||||
// Stemming language combobox
|
||||
stemLangCMB->insertItem("(no stemming)");
|
||||
list<string> langs;
|
||||
@ -66,6 +68,7 @@ void UIPrefsDialog::init()
|
||||
replAbsCB->setDown(prefs.queryReplaceAbstract);
|
||||
|
||||
connect(reslistFontPB, SIGNAL(clicked()), this, SLOT(showFontDialog()));
|
||||
connect(helpBrowserPB, SIGNAL(clicked()), this, SLOT(showBrowserDialog()));
|
||||
connect(resetFontPB, SIGNAL(clicked()), this, SLOT(resetReslistFont()));
|
||||
}
|
||||
|
||||
@ -77,6 +80,8 @@ void UIPrefsDialog::accept()
|
||||
prefs.reslistfontfamily = reslistFontFamily;
|
||||
prefs.reslistfontsize = reslistFontSize;
|
||||
|
||||
prefs.htmlBrowser = helpBrowserLE->text();
|
||||
|
||||
if (stemLangCMB->currentItem() == 0) {
|
||||
prefs.queryStemLang = "";
|
||||
} else {
|
||||
@ -127,3 +132,14 @@ void UIPrefsDialog::resetReslistFont()
|
||||
reslistFontPB->setText(this->font().family() + "-" +
|
||||
QString().setNum(this->font().pointSize()));
|
||||
}
|
||||
|
||||
void UIPrefsDialog::showBrowserDialog()
|
||||
{
|
||||
QString s = QFileDialog::getOpenFileName("/usr",
|
||||
"",
|
||||
this,
|
||||
"open file dialog",
|
||||
"Choose a file" );
|
||||
if (s)
|
||||
helpBrowserLE->setText(s);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user