qt4 ckpt
This commit is contained in:
parent
2df77de886
commit
f8a066a848
@ -428,9 +428,6 @@
|
||||
<property name="editable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="sizeLimit">
|
||||
<number>10</number>
|
||||
</property>
|
||||
<property name="maxCount">
|
||||
<number>20</number>
|
||||
</property>
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
#ifndef lint
|
||||
static char rcsid[] = "@(#$Id: advsearch_w.cpp,v 1.13 2006-11-30 13:38:44 dockes Exp $ (C) 2005 J.F.Dockes";
|
||||
static char rcsid[] = "@(#$Id: advsearch_w.cpp,v 1.14 2006-12-04 06:19:10 dockes Exp $ (C) 2005 J.F.Dockes";
|
||||
#endif
|
||||
/*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@ -25,8 +25,14 @@ static char rcsid[] = "@(#$Id: advsearch_w.cpp,v 1.13 2006-11-30 13:38:44 dockes
|
||||
#include <qlineedit.h>
|
||||
#include <qframe.h>
|
||||
#include <qcheckbox.h>
|
||||
|
||||
#include <qcombobox.h>
|
||||
#if (QT_VERSION < 0x040000)
|
||||
#include <qlistbox.h>
|
||||
#else
|
||||
#include <q3listbox.h>
|
||||
#endif
|
||||
|
||||
#include <qlayout.h>
|
||||
#include <qtooltip.h>
|
||||
#include <qwhatsthis.h>
|
||||
@ -130,9 +136,15 @@ void AdvSearch::saveCnf()
|
||||
bool AdvSearch::close()
|
||||
{
|
||||
saveCnf();
|
||||
return AdvSearchBase::close();
|
||||
return QWidget::close();
|
||||
}
|
||||
|
||||
#if (QT_VERSION >= 0x040000)
|
||||
#define QListBoxItem Q3ListBoxItem
|
||||
#define clauseVBox Ui::AdvSearchBase::clauseVBox
|
||||
#define AdvSearchBaseLayout Ui::AdvSearchBase::AdvSearchBaseLayout
|
||||
#endif
|
||||
|
||||
// Move selected file types from the searched to the ignored box
|
||||
void AdvSearch::delFiltypPB_clicked()
|
||||
{
|
||||
@ -214,12 +226,14 @@ void AdvSearch::delClause()
|
||||
resize(QSize(sz.width()+HORADJ, sz.height()+VERTADJ));
|
||||
}
|
||||
|
||||
#if (QT_VERSION < 0x040000)
|
||||
void AdvSearch::polish()
|
||||
{
|
||||
AdvSearchBase::polish();
|
||||
QSize sz = sizeHint();
|
||||
resize(QSize(sz.width()+HORADJ+10, sz.height()+VERTADJ-20));
|
||||
}
|
||||
#endif
|
||||
|
||||
// Move selected file types from the ignored to the searched box
|
||||
void AdvSearch::addFiltypPB_clicked()
|
||||
@ -291,8 +305,7 @@ void AdvSearch::searchPB_clicked()
|
||||
}
|
||||
if (restrictFtCB->isOn() && noFiltypsLB->count() > 0) {
|
||||
for (unsigned int i = 0; i < yesFiltypsLB->count(); i++) {
|
||||
QCString ctext = yesFiltypsLB->item(i)->text().utf8();
|
||||
sdata->addFiletype((const char *)ctext);
|
||||
sdata->addFiletype((const char *)yesFiltypsLB->item(i)->text().utf8());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
#ifndef _ADVSEARCH_W_H_INCLUDED_
|
||||
#define _ADVSEARCH_W_H_INCLUDED_
|
||||
/* @(#$Id: advsearch_w.h,v 1.7 2006-11-17 15:26:40 dockes Exp $ (C) 2005 J.F.Dockes */
|
||||
/* @(#$Id: advsearch_w.h,v 1.8 2006-12-04 06:19:10 dockes Exp $ (C) 2005 J.F.Dockes */
|
||||
/*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -20,21 +20,44 @@
|
||||
#include <list>
|
||||
#include <qvariant.h>
|
||||
#include <qdialog.h>
|
||||
#include "advsearch.h"
|
||||
|
||||
#include "searchclause_w.h"
|
||||
#include "recoll.h"
|
||||
#include "refcntr.h"
|
||||
#include "searchdata.h"
|
||||
|
||||
class AdvSearch : public AdvSearchBase
|
||||
class QDialog;
|
||||
|
||||
//MOC_SKIP_BEGIN
|
||||
#if QT_VERSION < 0x040000
|
||||
|
||||
#include "advsearch.h"
|
||||
class DummyAdvSearchBase : public AdvSearchBase
|
||||
{
|
||||
public: DummyAdvSearchBase(QWidget* parent = 0) : AdvSearchBase(parent) {}
|
||||
};
|
||||
|
||||
#else
|
||||
|
||||
#include "ui_advsearch.h"
|
||||
class DummyAdvSearchBase : public QWidget, public Ui::AdvSearchBase
|
||||
{
|
||||
public: DummyAdvSearchBase(QDialog *parent) {setupUi(parent);}
|
||||
};
|
||||
|
||||
#endif
|
||||
//MOC_SKIP_END
|
||||
|
||||
class AdvSearch : public DummyAdvSearchBase
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
AdvSearch(QWidget* parent = 0, const char* name = 0, bool modal = FALSE,
|
||||
WFlags fl = 0)
|
||||
: AdvSearchBase(parent,name,modal,fl)
|
||||
{init();}
|
||||
AdvSearch(QDialog* parent = 0)
|
||||
: DummyAdvSearchBase(parent)
|
||||
{
|
||||
init();
|
||||
}
|
||||
~AdvSearch(){}
|
||||
|
||||
public slots:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
#ifndef lint
|
||||
static char rcsid[] = "@(#$Id: guiutils.cpp,v 1.26 2006-11-30 13:38:44 dockes Exp $ (C) 2005 Jean-Francois Dockes";
|
||||
static char rcsid[] = "@(#$Id: guiutils.cpp,v 1.27 2006-12-04 06:19:11 dockes Exp $ (C) 2005 Jean-Francois Dockes";
|
||||
#endif
|
||||
/*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@ -173,7 +173,7 @@ void rwSettings(bool writing)
|
||||
SETTING_RW(advSearchClauses, "/Recoll/prefs/adv/clauseList", , ascdflt);
|
||||
if (!writing) {
|
||||
list<string> clauses;
|
||||
stringToStrings(advSearchClauses, clauses);
|
||||
stringToStrings((const char *)advSearchClauses.utf8(), clauses);
|
||||
for (list<string>::iterator it = clauses.begin();
|
||||
it != clauses.end(); it++) {
|
||||
prefs.advSearchClauses.push_back(atoi(it->c_str()));
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
#ifndef lint
|
||||
static char rcsid[] = "@(#$Id: main.cpp,v 1.53 2006-11-30 13:38:44 dockes Exp $ (C) 2005 J.F.Dockes";
|
||||
static char rcsid[] = "@(#$Id: main.cpp,v 1.54 2006-12-04 06:19:11 dockes Exp $ (C) 2005 J.F.Dockes";
|
||||
#endif
|
||||
/*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@ -52,6 +52,7 @@ static char rcsid[] = "@(#$Id: main.cpp,v 1.53 2006-11-30 13:38:44 dockes Exp $
|
||||
#include "rclversion.h"
|
||||
#endif
|
||||
#include "rclmain_w.h"
|
||||
#include "ssearch_w.h"
|
||||
#include "guiutils.h"
|
||||
#ifdef RCL_USE_ASPELL
|
||||
#include "rclaspell.h"
|
||||
@ -68,7 +69,6 @@ static KCmdLineOptions options[] =
|
||||
};
|
||||
#endif
|
||||
|
||||
|
||||
const string recoll_datadir = RECOLL_DATADIR;
|
||||
|
||||
RclConfig *rclconfig;
|
||||
|
||||
@ -96,12 +96,6 @@
|
||||
<property name="name">
|
||||
<cstring>searchTextLine</cstring>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>LineEditPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>Sunken</enum>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton">
|
||||
<property name="name">
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
#ifndef _PREVIEW_W_H_INCLUDED_
|
||||
#define _PREVIEW_W_H_INCLUDED_
|
||||
/* @(#$Id: preview_w.h,v 1.4 2006-11-17 10:09:07 dockes Exp $ (C) 2006 J.F.Dockes */
|
||||
/* @(#$Id: preview_w.h,v 1.5 2006-12-04 06:19:11 dockes Exp $ (C) 2006 J.F.Dockes */
|
||||
/*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -20,8 +20,13 @@
|
||||
|
||||
#include <qvariant.h>
|
||||
#include <qwidget.h>
|
||||
|
||||
#include "rcldb.h"
|
||||
#if (QT_VERSION < 0x040000)
|
||||
#include "preview.h"
|
||||
#else
|
||||
#include "ui_preview.h"
|
||||
#endif
|
||||
#include "refcntr.h"
|
||||
#include "searchdata.h"
|
||||
|
||||
@ -37,14 +42,30 @@ class TabData {
|
||||
TabData(QWidget *wi) : w(wi) {}
|
||||
};
|
||||
|
||||
class Preview : public PreviewBase
|
||||
class QTextEdit;
|
||||
|
||||
//MOC_SKIP_BEGIN
|
||||
#if QT_VERSION < 0x040000
|
||||
class DummyPreviewBase : public PreviewBase
|
||||
{
|
||||
public: DummyPreviewBase(QWidget* parent = 0) : PreviewBase(parent) {}
|
||||
};
|
||||
#else
|
||||
class DummyPreviewBase : public QWidget, public Ui::PreviewBase
|
||||
{
|
||||
public: DummyPreviewBase(QWidget* parent) {setupUi(parent);}
|
||||
};
|
||||
#endif
|
||||
//MOC_SKIP_END
|
||||
|
||||
class Preview : public DummyPreviewBase
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
Preview(QWidget* parent = 0, const char* name = 0, WFlags fl = 0) :
|
||||
PreviewBase(parent,name,fl) {init();}
|
||||
|
||||
Preview(QWidget* parent = 0)
|
||||
: DummyPreviewBase(parent) {init();}
|
||||
|
||||
~Preview(){}
|
||||
|
||||
virtual void setSId(int sid, RefCntr<Rcl::SearchData> sdata)
|
||||
|
||||
@ -289,14 +289,6 @@
|
||||
</property>
|
||||
</action>
|
||||
</actions>
|
||||
<includes>
|
||||
<include location="local" impldecl="in declaration">ssearch_w.h</include>
|
||||
<include location="local" impldecl="in declaration">reslist.h</include>
|
||||
<include location="local" impldecl="in declaration">refcntr.h</include>
|
||||
</includes>
|
||||
<pixmapinproject/>
|
||||
<layoutdefaults spacing="6" margin="11"/>
|
||||
<includehints>
|
||||
<includehint>reslist.h</includehint>
|
||||
</includehints>
|
||||
</UI>
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
#ifndef lint
|
||||
static char rcsid[] = "@(#$Id: rclmain_w.cpp,v 1.9 2006-11-17 12:55:59 dockes Exp $ (C) 2005 J.F.Dockes";
|
||||
static char rcsid[] = "@(#$Id: rclmain_w.cpp,v 1.10 2006-12-04 06:19:11 dockes Exp $ (C) 2005 J.F.Dockes";
|
||||
#endif
|
||||
/*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@ -33,7 +33,9 @@ using std::pair;
|
||||
|
||||
#include <qapplication.h>
|
||||
#include <qmessagebox.h>
|
||||
#if (QT_VERSION < 0x040000)
|
||||
#include <qcstring.h>
|
||||
#endif
|
||||
#include <qtabwidget.h>
|
||||
#include <qtimer.h>
|
||||
#include <qstatusbar.h>
|
||||
@ -54,14 +56,15 @@ using std::pair;
|
||||
#include "mimehandler.h"
|
||||
#include "pathut.h"
|
||||
#include "smallut.h"
|
||||
#include "advsearch.h"
|
||||
#include "advsearch_w.h"
|
||||
#include "rclversion.h"
|
||||
#include "sortseq.h"
|
||||
#include "uiprefs.h"
|
||||
#include "uiprefs_w.h"
|
||||
#include "guiutils.h"
|
||||
#include "reslist.h"
|
||||
#include "transcode.h"
|
||||
#include "refcntr.h"
|
||||
#include "ssearch_w.h"
|
||||
|
||||
#include "rclmain_w.h"
|
||||
#include "moc_rclmain_w.cpp"
|
||||
@ -69,17 +72,20 @@ using std::pair;
|
||||
extern "C" int XFlush(void *);
|
||||
|
||||
// Taken from qt designer. Don't know why it's needed.
|
||||
static QIconSet createIconSet( const QString &name )
|
||||
#if (QT_VERSION < 0x040000)
|
||||
static QIconSet createIconSet(const QString &name)
|
||||
{
|
||||
QIconSet ic( QPixmap::fromMimeSource( name ) );
|
||||
QIconSet ic(QPixmap::fromMimeSource(name));
|
||||
QString iname = "d_" + name;
|
||||
ic.setPixmap(QPixmap::fromMimeSource(iname),
|
||||
QIconSet::Small, QIconSet::Disabled );
|
||||
return ic;
|
||||
}
|
||||
#endif
|
||||
|
||||
void RclMain::init()
|
||||
{
|
||||
|
||||
curPreview = 0;
|
||||
asearchform = 0;
|
||||
sortform = 0;
|
||||
@ -129,7 +135,6 @@ void RclMain::init()
|
||||
this, SLOT(showAdvSearchDialog()));
|
||||
connect(toolsSort_parametersAction, SIGNAL(activated()),
|
||||
this, SLOT(showSortDialog()));
|
||||
toolsSpellAction->setIconSet(createIconSet("spell.png"));
|
||||
#ifdef RCL_USE_ASPELL
|
||||
connect(toolsSpellAction, SIGNAL(activated()),
|
||||
this, SLOT(showSpellDialog()));
|
||||
@ -140,8 +145,16 @@ void RclMain::init()
|
||||
connect(preferencesQuery_PrefsAction, SIGNAL(activated()),
|
||||
this, SLOT(showUIPrefs()));
|
||||
|
||||
|
||||
#if (QT_VERSION < 0x040000)
|
||||
toolsSpellAction->setIconSet(createIconSet("spell.png"));
|
||||
nextPageAction->setIconSet(createIconSet("nextpage.png"));
|
||||
prevPageAction->setIconSet(createIconSet("prevpage.png"));
|
||||
#else
|
||||
toolsSpellAction->setIcon(QIcon(":spell.png"));
|
||||
nextPageAction->setIcon(QIcon(":nextpage.png"));
|
||||
prevPageAction->setIcon(QIcon(":prevpage.png"));
|
||||
#endif
|
||||
}
|
||||
|
||||
// We also want to get rid of the advanced search form and previews
|
||||
@ -362,9 +375,7 @@ void RclMain::startAdvSearch(RefCntr<Rcl::SearchData> sdata)
|
||||
void RclMain::showAdvSearchDialog()
|
||||
{
|
||||
if (asearchform == 0) {
|
||||
asearchform = new AdvSearch(0, tr("Advanced search"), FALSE,
|
||||
WStyle_Customize | WStyle_NormalBorder |
|
||||
WStyle_Title | WStyle_SysMenu);
|
||||
asearchform = new AdvSearch(0);
|
||||
connect(asearchform, SIGNAL(startSearch(RefCntr<Rcl::SearchData>)),
|
||||
this, SLOT(startAdvSearch(RefCntr<Rcl::SearchData>)));
|
||||
asearchform->show();
|
||||
@ -378,9 +389,7 @@ void RclMain::showAdvSearchDialog()
|
||||
void RclMain::showSortDialog()
|
||||
{
|
||||
if (sortform == 0) {
|
||||
sortform = new SortForm(0, tr("Sort criteria"), FALSE,
|
||||
WStyle_Customize | WStyle_NormalBorder |
|
||||
WStyle_Title | WStyle_SysMenu);
|
||||
sortform = new SortForm(0);
|
||||
connect(sortform, SIGNAL(sortDataChanged(DocSeqSortSpec)),
|
||||
this, SLOT(sortDataChanged(DocSeqSortSpec)));
|
||||
sortform->show();
|
||||
@ -395,9 +404,7 @@ void RclMain::showSortDialog()
|
||||
void RclMain::showSpellDialog()
|
||||
{
|
||||
if (spellform == 0) {
|
||||
spellform = new SpellW(0, tr("Spell expansion"),
|
||||
WStyle_Customize | WStyle_NormalBorder |
|
||||
WStyle_Title | WStyle_SysMenu);
|
||||
spellform = new SpellW(0);
|
||||
connect(spellform, SIGNAL(wordSelect(QString)),
|
||||
this, SLOT(ssearchAddTerm(QString)));
|
||||
spellform->show();
|
||||
@ -412,9 +419,7 @@ void RclMain::showSpellDialog()
|
||||
void RclMain::showUIPrefs()
|
||||
{
|
||||
if (uiprefs == 0) {
|
||||
uiprefs = new UIPrefsDialog(0, tr("User interface preferences"), FALSE,
|
||||
WStyle_Customize | WStyle_NormalBorder |
|
||||
WStyle_Title | WStyle_SysMenu);
|
||||
uiprefs = new UIPrefsDialog(0);
|
||||
connect(uiprefs, SIGNAL(uiprefsDone()), this, SLOT(setUIPrefs()));
|
||||
uiprefs->show();
|
||||
} else {
|
||||
@ -468,7 +473,7 @@ void RclMain::startPreview(int docnum, int mod)
|
||||
curPreview = 0;
|
||||
}
|
||||
if (curPreview == 0) {
|
||||
curPreview = new Preview(0, tr("Preview"));
|
||||
curPreview = new Preview(0);
|
||||
if (curPreview == 0) {
|
||||
QMessageBox::warning(0, tr("Warning"),
|
||||
tr("Can't create preview window"),
|
||||
|
||||
@ -30,16 +30,36 @@
|
||||
#include "spell_w.h"
|
||||
#include "refcntr.h"
|
||||
|
||||
#if QT_VERSION < 0x040000
|
||||
#include "rclmain.h"
|
||||
#else
|
||||
#include "ui_rclmain.h"
|
||||
#endif
|
||||
|
||||
class RclMain : public RclMainBase
|
||||
//MOC_SKIP_BEGIN
|
||||
#if QT_VERSION < 0x040000
|
||||
class DummyRclMainBase : public RclMainBase
|
||||
{
|
||||
public: DummyRclMainBase(QWidget* parent = 0) : RclMainBase(parent) {}
|
||||
};
|
||||
#define RCLMAINPARENT QWidget
|
||||
#else
|
||||
class DummyRclMainBase : public QMainWindow, public Ui::RclMainBase
|
||||
{
|
||||
public: DummyRclMainBase(Q3MainWindow*parent) {setupUi(parent);}
|
||||
#define RCLMAINPARENT Q3MainWindow
|
||||
};
|
||||
#endif
|
||||
//MOC_SKIP_END
|
||||
|
||||
class RclMain : public DummyRclMainBase
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
RclMain(QWidget* parent = 0, const char* name = 0,
|
||||
WFlags fl = WType_TopLevel)
|
||||
: RclMainBase(parent,name,fl) {
|
||||
RclMain(RCLMAINPARENT * parent = 0)
|
||||
: DummyRclMainBase(parent)
|
||||
{
|
||||
init();
|
||||
}
|
||||
~RclMain() {}
|
||||
|
||||
@ -1,10 +1,12 @@
|
||||
#ifndef lint
|
||||
static char rcsid[] = "@(#$Id: reslist.cpp,v 1.13 2006-11-30 13:38:44 dockes Exp $ (C) 2005 J.F.Dockes";
|
||||
static char rcsid[] = "@(#$Id: reslist.cpp,v 1.14 2006-12-04 06:19:11 dockes Exp $ (C) 2005 J.F.Dockes";
|
||||
#endif
|
||||
|
||||
#include <time.h>
|
||||
|
||||
#include <qapplication.h>
|
||||
#include <qvariant.h>
|
||||
#include <qevent.h>
|
||||
#include <qpushbutton.h>
|
||||
#include <qlayout.h>
|
||||
#include <qtooltip.h>
|
||||
@ -13,6 +15,17 @@ static char rcsid[] = "@(#$Id: reslist.cpp,v 1.13 2006-11-30 13:38:44 dockes Exp
|
||||
#include <qmessagebox.h>
|
||||
#include <qimage.h>
|
||||
#include <qclipboard.h>
|
||||
#include <qscrollbar.h>
|
||||
|
||||
#if (QT_VERSION < 0x040000)
|
||||
#include <qpopupmenu.h>
|
||||
#else
|
||||
#include <q3popupmenu.h>
|
||||
#include <q3stylesheet.h>
|
||||
#include <q3mimefactory.h>
|
||||
#define QStyleSheetItem Q3StyleSheetItem
|
||||
#define QMimeSourceFactory Q3MimeSourceFactory
|
||||
#endif
|
||||
|
||||
#include "debuglog.h"
|
||||
#include "recoll.h"
|
||||
@ -33,7 +46,7 @@ static char rcsid[] = "@(#$Id: reslist.cpp,v 1.13 2006-11-30 13:38:44 dockes Exp
|
||||
#endif
|
||||
|
||||
ResList::ResList(QWidget* parent, const char* name)
|
||||
: QTextBrowser(parent, name)
|
||||
: QTEXTBROWSER(parent, name)
|
||||
{
|
||||
if (!name)
|
||||
setName("resList");
|
||||
@ -41,7 +54,7 @@ ResList::ResList(QWidget* parent, const char* name)
|
||||
setReadOnly(TRUE);
|
||||
setUndoRedoEnabled(FALSE);
|
||||
languageChange();
|
||||
clearWState(WState_Polished);
|
||||
|
||||
setTabChangesFocus(true);
|
||||
|
||||
// signals and slots connections
|
||||
@ -144,29 +157,29 @@ bool ResList::getDoc(int docnum, Rcl::Doc &doc)
|
||||
|
||||
void ResList::keyPressEvent(QKeyEvent * e)
|
||||
{
|
||||
if (e->key() == Key_Q && (e->state() & ControlButton)) {
|
||||
if (e->key() == Qt::Key_Q && (e->state() & Qt::ControlButton)) {
|
||||
recollNeedsExit = 1;
|
||||
return;
|
||||
} else if (e->key() == Key_Prior) {
|
||||
} else if (e->key() == Qt::Key_Prior) {
|
||||
resPageUpOrBack();
|
||||
return;
|
||||
} else if (e->key() == Key_Next) {
|
||||
} else if (e->key() == Qt::Key_Next) {
|
||||
resPageDownOrNext();
|
||||
return;
|
||||
}
|
||||
QTextBrowser::keyPressEvent(e);
|
||||
QTEXTBROWSER::keyPressEvent(e);
|
||||
}
|
||||
|
||||
void ResList::contentsMouseReleaseEvent(QMouseEvent *e)
|
||||
{
|
||||
m_lstClckMod = 0;
|
||||
if (e->state() & ControlButton) {
|
||||
m_lstClckMod |= ControlButton;
|
||||
if (e->state() & Qt::ControlButton) {
|
||||
m_lstClckMod |= Qt::ControlButton;
|
||||
}
|
||||
if (e->state() & ShiftButton) {
|
||||
m_lstClckMod |= ShiftButton;
|
||||
if (e->state() & Qt::ShiftButton) {
|
||||
m_lstClckMod |= Qt::ShiftButton;
|
||||
}
|
||||
QTextBrowser::contentsMouseReleaseEvent(e);
|
||||
QTEXTBROWSER::contentsMouseReleaseEvent(e);
|
||||
}
|
||||
|
||||
// Return total result list count
|
||||
@ -177,24 +190,31 @@ int ResList::getResCnt()
|
||||
return m_docsource->getResCnt();
|
||||
}
|
||||
|
||||
|
||||
#if 1 || (QT_VERSION < 0x040000)
|
||||
#define SCROLLYPOS contentsY()
|
||||
#else
|
||||
#define SCROLLYPOS verticalScrollBar()->value()
|
||||
#endif
|
||||
|
||||
// Page Up/Down: we don't try to check if current paragraph is last or
|
||||
// first. We just page up/down and check if viewport moved. If it did,
|
||||
// fair enough, else we go to next/previous result page.
|
||||
void ResList::resPageUpOrBack()
|
||||
{
|
||||
int vpos = contentsY();
|
||||
moveCursor(QTextEdit::MovePgUp, false);
|
||||
if (vpos == contentsY())
|
||||
int vpos = SCROLLYPOS;
|
||||
moveCursor(QTEXTBROWSER::MovePgUp, false);
|
||||
if (vpos == SCROLLYPOS)
|
||||
resultPageBack();
|
||||
}
|
||||
|
||||
void ResList::resPageDownOrNext()
|
||||
{
|
||||
int vpos = contentsY();
|
||||
moveCursor(QTextEdit::MovePgDown, false);
|
||||
int vpos = SCROLLYPOS;
|
||||
moveCursor(QTEXTBROWSER::MovePgDown, false);
|
||||
LOGDEB(("ResList::resPageDownOrNext: vpos before %d, after %d\n",
|
||||
vpos, contentsY()));
|
||||
if (vpos == contentsY())
|
||||
vpos, SCROLLYPOS));
|
||||
if (vpos == SCROLLYPOS)
|
||||
resultPageNext();
|
||||
}
|
||||
|
||||
@ -500,8 +520,8 @@ void ResList::clicked(int par, int)
|
||||
return;
|
||||
}
|
||||
LOGDEB(("click at par %d (with %s %s)\n", par,
|
||||
(m_lstClckMod & ControlButton) ? "Ctrl" : "",
|
||||
(m_lstClckMod & ShiftButton) ? "Shft" : ""));
|
||||
(m_lstClckMod & Qt::ControlButton) ? "Ctrl" : "",
|
||||
(m_lstClckMod & Qt::ShiftButton) ? "Shft" : ""));
|
||||
|
||||
}
|
||||
|
||||
@ -563,12 +583,12 @@ void ResList::linkWasClicked(const QString &s, int clkmod)
|
||||
}
|
||||
}
|
||||
|
||||
QPopupMenu *ResList::createPopupMenu(const QPoint& pos)
|
||||
RCLPOPUP *ResList::createPopupMenu(const QPoint& pos)
|
||||
{
|
||||
int para = paragraphAt(pos);
|
||||
clicked(para, 0);
|
||||
m_popDoc = docnumfromparnum(para);
|
||||
QPopupMenu *popup = new QPopupMenu(this, "qt_edit_menu");
|
||||
RCLPOPUP *popup = new RCLPOPUP(this);
|
||||
popup->insertItem(tr("&Preview"), this, SLOT(menuPreview()));
|
||||
popup->insertItem(tr("&Edit"), this, SLOT(menuEdit()));
|
||||
popup->insertItem(tr("&Copy File Name"), this, SLOT(menuCopyFN()));
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
#ifndef _RESLIST_H_INCLUDED_
|
||||
#define _RESLIST_H_INCLUDED_
|
||||
/* @(#$Id: reslist.h,v 1.4 2006-11-17 12:55:59 dockes Exp $ (C) 2005 J.F.Dockes */
|
||||
/* @(#$Id: reslist.h,v 1.5 2006-12-04 06:19:11 dockes Exp $ (C) 2005 J.F.Dockes */
|
||||
|
||||
#include <list>
|
||||
|
||||
@ -8,15 +8,25 @@
|
||||
using std::list;
|
||||
#endif
|
||||
|
||||
#if (QT_VERSION < 0x040000)
|
||||
#include <qtextbrowser.h>
|
||||
#include <qpopupmenu.h>
|
||||
class QPopupMenu;
|
||||
#define RCLPOPUP QPopupMenu
|
||||
#define QTEXTBROWSER QTextBrowser
|
||||
#else
|
||||
#include <q3textbrowser.h>
|
||||
class Q3PopupMenu;
|
||||
#define RCLPOPUP Q3PopupMenu
|
||||
#define QTEXTBROWSER Q3TextBrowser
|
||||
#endif
|
||||
|
||||
#include "rcldb.h"
|
||||
#include "docseq.h"
|
||||
#include "searchdata.h"
|
||||
#include "refcntr.h"
|
||||
|
||||
class ResList : public QTextBrowser
|
||||
|
||||
class ResList : public QTEXTBROWSER
|
||||
{
|
||||
Q_OBJECT;
|
||||
|
||||
@ -32,7 +42,7 @@ class ResList : public QTextBrowser
|
||||
|
||||
virtual void setDocSource(DocSequence *,
|
||||
RefCntr<Rcl::SearchData> qdata);
|
||||
virtual QPopupMenu *createPopupMenu(const QPoint& pos);
|
||||
virtual RCLPOPUP *createPopupMenu(const QPoint& pos);
|
||||
virtual QString getDescription(); // Printable actual query performed on db
|
||||
virtual int getResCnt(); // Return total result list size
|
||||
virtual RefCntr<Rcl::SearchData> getSearchData() {return m_searchData;}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
#ifndef lint
|
||||
static char rcsid[] = "@(#$Id: searchclause_w.cpp,v 1.3 2006-11-30 13:38:44 dockes Exp $ (C) 2005 J.F.Dockes";
|
||||
static char rcsid[] = "@(#$Id: searchclause_w.cpp,v 1.4 2006-12-04 06:19:11 dockes Exp $ (C) 2005 J.F.Dockes";
|
||||
#endif
|
||||
/*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@ -33,11 +33,9 @@ static char rcsid[] = "@(#$Id: searchclause_w.cpp,v 1.3 2006-11-30 13:38:44 dock
|
||||
* Constructs a SearchClauseW as a child of 'parent', with the
|
||||
* name 'name' and widget flags set to 'f'.
|
||||
*/
|
||||
SearchClauseW::SearchClauseW(QWidget* parent, const char* name, WFlags fl)
|
||||
: QWidget(parent, name, fl)
|
||||
SearchClauseW::SearchClauseW(QWidget* parent)
|
||||
: QWidget(parent)
|
||||
{
|
||||
if (!name)
|
||||
setName("SearchClauseW");
|
||||
searchClauseLayout = new QVBoxLayout(this);
|
||||
|
||||
hLayout = new QHBoxLayout(0, 0, 3, "hLayout");
|
||||
@ -54,7 +52,6 @@ SearchClauseW::SearchClauseW(QWidget* parent, const char* name, WFlags fl)
|
||||
searchClauseLayout->addLayout(hLayout);
|
||||
languageChange();
|
||||
resize(QSize(0, 0).expandedTo(minimumSizeHint()));
|
||||
clearWState(WState_Polished);
|
||||
|
||||
connect(sTpCMB, SIGNAL(activated(int)), this, SLOT(tpChange(int)));
|
||||
}
|
||||
|
||||
@ -34,7 +34,7 @@ class SearchClauseW : public QWidget
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
SearchClauseW( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
|
||||
SearchClauseW(QWidget* parent = 0);
|
||||
~SearchClauseW();
|
||||
Rcl::SearchDataClause *getClause();
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
/* @(#$Id: sort_w.h,v 1.2 2006-09-21 09:37:28 dockes Exp $ (C) 2005 J.F.Dockes */
|
||||
/* @(#$Id: sort_w.h,v 1.3 2006-12-04 06:19:11 dockes Exp $ (C) 2005 J.F.Dockes */
|
||||
/*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -21,17 +21,39 @@
|
||||
#include <qvariant.h>
|
||||
#include <qdialog.h>
|
||||
#include "sortseq.h"
|
||||
#if (QT_VERSION < 0x040000)
|
||||
#include "sort.h"
|
||||
#else
|
||||
#include "ui_sort.h"
|
||||
#endif
|
||||
|
||||
class SortForm : public SortFormBase
|
||||
class QDialog;
|
||||
|
||||
//MOC_SKIP_BEGIN
|
||||
#if QT_VERSION < 0x040000
|
||||
class DummySortFormBase : public SortFormBase
|
||||
{
|
||||
public: DummySortFormBase(QWidget* parent = 0) : SortFormBase(parent) {}
|
||||
};
|
||||
#else
|
||||
class DummySortFormBase : public QWidget, public Ui::SortFormBase
|
||||
{
|
||||
public: DummySortFormBase(QDialog* parent) {setupUi(parent);}
|
||||
};
|
||||
#endif
|
||||
//MOC_SKIP_END
|
||||
|
||||
class SortForm : public DummySortFormBase
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
SortForm(QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 ) : SortFormBase(parent, name, modal, fl) {
|
||||
SortForm(QDialog* parent = 0)
|
||||
: DummySortFormBase(parent)
|
||||
{
|
||||
init();
|
||||
}
|
||||
~SortForm() {}
|
||||
~SortForm() {}
|
||||
|
||||
|
||||
public slots:
|
||||
|
||||
@ -59,12 +59,6 @@
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>LineEditPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>Sunken</enum>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" row="1" column="1">
|
||||
<property name="name">
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
#ifndef _ASPELL_W_H_INCLUDED_
|
||||
#define _ASPELL_W_H_INCLUDED_
|
||||
/* @(#$Id: spell_w.h,v 1.3 2006-11-21 08:47:51 dockes Exp $ (C) 2006 J.F.Dockes */
|
||||
/* @(#$Id: spell_w.h,v 1.4 2006-12-04 06:19:11 dockes Exp $ (C) 2006 J.F.Dockes */
|
||||
/*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -21,15 +21,33 @@
|
||||
#include <qvariant.h>
|
||||
#include <qwidget.h>
|
||||
#include "rcldb.h"
|
||||
#include "spell.h"
|
||||
|
||||
class SpellW : public SpellBase
|
||||
//MOC_SKIP_BEGIN
|
||||
#if QT_VERSION < 0x040000
|
||||
#include "spell.h"
|
||||
class DummySpellBase : public SpellBase
|
||||
{
|
||||
public: DummySpellBase(QWidget* parent = 0) : SpellBase(parent) {}
|
||||
};
|
||||
#else
|
||||
#include "ui_spell.h"
|
||||
class DummySpellBase : public QWidget, public Ui::SpellBase
|
||||
{
|
||||
public: DummySpellBase(QWidget* parent) {setupUi(parent);}
|
||||
};
|
||||
#endif
|
||||
//MOC_SKIP_END
|
||||
|
||||
class SpellW : public DummySpellBase
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
SpellW(QWidget* parent = 0, const char* name = 0, WFlags fl = 0) :
|
||||
SpellBase(parent,name,fl) {init();}
|
||||
SpellW(QWidget* parent = 0)
|
||||
: DummySpellBase(parent)
|
||||
{
|
||||
init();
|
||||
}
|
||||
|
||||
~SpellW(){}
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
/* @(#$Id: ssearch_w.h,v 1.3 2006-11-13 08:58:47 dockes Exp $ (C) 2006 J.F.Dockes */
|
||||
/* @(#$Id: ssearch_w.h,v 1.4 2006-12-04 06:19:11 dockes Exp $ (C) 2006 J.F.Dockes */
|
||||
/*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -22,16 +22,37 @@
|
||||
#include <qwidget.h>
|
||||
#include "recoll.h"
|
||||
#include "searchdata.h"
|
||||
#include "ssearchb.h"
|
||||
#include "refcntr.h"
|
||||
#if (QT_VERSION < 0x040000)
|
||||
#include "ssearchb.h"
|
||||
#else
|
||||
#include "ui_ssearchb.h"
|
||||
#endif
|
||||
|
||||
class SSearch : public SSearchBase
|
||||
//MOC_SKIP_BEGIN
|
||||
#if QT_VERSION < 0x040000
|
||||
class DummySSearchBase : public SSearchBase
|
||||
{
|
||||
public: DummySSearchBase(QWidget* parent = 0) : SSearchBase(parent) {}
|
||||
};
|
||||
#else
|
||||
class DummySSearchBase : public QWidget, public Ui::SSearchBase
|
||||
{
|
||||
public: DummySSearchBase(QWidget* parent) {setupUi(parent);}
|
||||
};
|
||||
#endif
|
||||
//MOC_SKIP_END
|
||||
|
||||
class SSearch : public DummySSearchBase
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
SSearch( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 )
|
||||
: SSearchBase(parent,name,fl) {init();}
|
||||
SSearch(QWidget* parent = 0, const char * = 0)
|
||||
: DummySSearchBase(parent)
|
||||
{
|
||||
init();
|
||||
}
|
||||
~SSearch(){}
|
||||
|
||||
virtual void init();
|
||||
|
||||
@ -99,9 +99,6 @@
|
||||
<property name="editable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="sizeLimit">
|
||||
<number>10</number>
|
||||
</property>
|
||||
<property name="maxCount">
|
||||
<number>30</number>
|
||||
</property>
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
/* @(#$Id: uiprefs_w.h,v 1.2 2006-11-07 08:57:11 dockes Exp $ (C) 2006 J.F.Dockes */
|
||||
/* @(#$Id: uiprefs_w.h,v 1.3 2006-12-04 06:19:11 dockes Exp $ (C) 2006 J.F.Dockes */
|
||||
/*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -17,18 +17,43 @@
|
||||
*/
|
||||
#ifndef _UIPREFS_W_H_INCLUDED_
|
||||
#define _UIPREFS_W_H_INCLUDED_
|
||||
/* @(#$Id: uiprefs_w.h,v 1.2 2006-11-07 08:57:11 dockes Exp $ (C) 2005 J.F.Dockes */
|
||||
/* @(#$Id: uiprefs_w.h,v 1.3 2006-12-04 06:19:11 dockes Exp $ (C) 2005 J.F.Dockes */
|
||||
#include <qvariant.h>
|
||||
#include <qdialog.h>
|
||||
|
||||
#if (QT_VERSION < 0x040000)
|
||||
#include "uiprefs.h"
|
||||
#else
|
||||
#include "ui_uiprefs.h"
|
||||
#endif
|
||||
|
||||
class UIPrefsDialog : public UIPrefsDialogBase
|
||||
class QDialog;
|
||||
|
||||
//MOC_SKIP_BEGIN
|
||||
#if QT_VERSION < 0x040000
|
||||
class DummyUIPrefsDialogBase : public UIPrefsDialogBase
|
||||
{
|
||||
public: DummyUIPrefsDialogBase(QWidget* parent = 0)
|
||||
: UIPrefsDialogBase(parent) {}
|
||||
};
|
||||
#else
|
||||
class DummyUIPrefsDialogBase : public QWidget, protected Ui::UIPrefsDialogBase
|
||||
{
|
||||
public: DummyUIPrefsDialogBase(QDialog *parent) {setupUi(parent);}
|
||||
};
|
||||
#endif
|
||||
//MOC_SKIP_END
|
||||
|
||||
class UIPrefsDialog : public DummyUIPrefsDialogBase
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
UIPrefsDialog( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 ): UIPrefsDialogBase(parent,name,modal,fl) {init();}
|
||||
UIPrefsDialog(QDialog* parent = 0)
|
||||
: DummyUIPrefsDialogBase(parent)
|
||||
{
|
||||
init();
|
||||
}
|
||||
~UIPrefsDialog(){};
|
||||
|
||||
QString reslistFontFamily;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user