|
a/src/qtgui/rclmain.cpp |
|
b/src/qtgui/rclmain.cpp |
1 |
#ifndef lint
|
1 |
#ifndef lint
|
2 |
static char rcsid[] = "@(#$Id: rclmain.cpp,v 1.6 2006-01-23 13:32:06 dockes Exp $ (C) 2005 J.F.Dockes";
|
2 |
static char rcsid[] = "@(#$Id: rclmain.cpp,v 1.7 2006-01-23 17:21:30 dockes Exp $ (C) 2005 J.F.Dockes";
|
3 |
#endif
|
3 |
#endif
|
4 |
/*
|
4 |
/*
|
5 |
* This program is free software; you can redistribute it and/or modify
|
5 |
* This program is free software; you can redistribute it and/or modify
|
6 |
* it under the terms of the GNU General Public License as published by
|
6 |
* it under the terms of the GNU General Public License as published by
|
7 |
* the Free Software Foundation; either version 2 of the License, or
|
7 |
* the Free Software Foundation; either version 2 of the License, or
|
|
... |
|
... |
44 |
#include <qtextedit.h>
|
44 |
#include <qtextedit.h>
|
45 |
#include <qlineedit.h>
|
45 |
#include <qlineedit.h>
|
46 |
#include <qaction.h>
|
46 |
#include <qaction.h>
|
47 |
#include <qpushbutton.h>
|
47 |
#include <qpushbutton.h>
|
48 |
#include <qimage.h>
|
48 |
#include <qimage.h>
|
|
|
49 |
#include <qiconset.h>
|
49 |
|
50 |
|
50 |
#include "recoll.h"
|
51 |
#include "recoll.h"
|
51 |
#include "debuglog.h"
|
52 |
#include "debuglog.h"
|
52 |
#include "mimehandler.h"
|
53 |
#include "mimehandler.h"
|
53 |
#include "pathut.h"
|
54 |
#include "pathut.h"
|
|
... |
|
... |
62 |
#include "rclmain.h"
|
63 |
#include "rclmain.h"
|
63 |
#include "moc_rclmain.cpp"
|
64 |
#include "moc_rclmain.cpp"
|
64 |
|
65 |
|
65 |
extern "C" int XFlush(void *);
|
66 |
extern "C" int XFlush(void *);
|
66 |
|
67 |
|
|
|
68 |
// Taken from qt designer. Don't know why it's needed.
|
|
|
69 |
static QIconSet createIconSet( const QString &name )
|
|
|
70 |
{
|
|
|
71 |
QIconSet ic( QPixmap::fromMimeSource( name ) );
|
|
|
72 |
QString iname = "d_" + name;
|
|
|
73 |
ic.setPixmap(QPixmap::fromMimeSource(iname),
|
|
|
74 |
QIconSet::Small, QIconSet::Disabled );
|
|
|
75 |
return ic;
|
|
|
76 |
}
|
|
|
77 |
|
67 |
void RclMain::init()
|
78 |
void RclMain::init()
|
68 |
{
|
79 |
{
|
69 |
curPreview = 0;
|
80 |
curPreview = 0;
|
70 |
asearchform = 0;
|
81 |
asearchform = 0;
|
71 |
sortform = 0;
|
82 |
sortform = 0;
|
|
... |
|
... |
87 |
}
|
98 |
}
|
88 |
string historyfile = path_cat(rclconfig->getConfDir(), "history");
|
99 |
string historyfile = path_cat(rclconfig->getConfDir(), "history");
|
89 |
m_history = new RclDHistory(historyfile);
|
100 |
m_history = new RclDHistory(historyfile);
|
90 |
connect(sSearch, SIGNAL(startSearch(Rcl::AdvSearchData)),
|
101 |
connect(sSearch, SIGNAL(startSearch(Rcl::AdvSearchData)),
|
91 |
this, SLOT(startAdvSearch(Rcl::AdvSearchData)));
|
102 |
this, SLOT(startAdvSearch(Rcl::AdvSearchData)));
|
|
|
103 |
|
|
|
104 |
nextPageAction->setIconSet(createIconSet("nextpage.png"));
|
|
|
105 |
prevPageAction->setIconSet(createIconSet("prevpage.png"));
|
92 |
}
|
106 |
}
|
93 |
|
107 |
|
94 |
// We also want to get rid of the advanced search form and previews
|
108 |
// We also want to get rid of the advanced search form and previews
|
95 |
// when we exit (not our children so that it's not systematically
|
109 |
// when we exit (not our children so that it's not systematically
|
96 |
// created over the main form).
|
110 |
// created over the main form).
|