|
a/src/qtgui/preview_w.cpp |
|
b/src/qtgui/preview_w.cpp |
|
... |
|
... |
199 |
// Create the first tab. Should be possible to use addEditorTab
|
199 |
// Create the first tab. Should be possible to use addEditorTab
|
200 |
// but this causes a pb with the sizeing
|
200 |
// but this causes a pb with the sizeing
|
201 |
QWidget *unnamed = new QWidget(pvTab);
|
201 |
QWidget *unnamed = new QWidget(pvTab);
|
202 |
QVBoxLayout *unnamedLayout = new QVBoxLayout(unnamed);
|
202 |
QVBoxLayout *unnamedLayout = new QVBoxLayout(unnamed);
|
203 |
PreviewTextEdit *pvEdit = new PreviewTextEdit(unnamed, "pvEdit", this);
|
203 |
PreviewTextEdit *pvEdit = new PreviewTextEdit(unnamed, "pvEdit", this);
|
204 |
pvEdit->setReadOnly(TRUE);
|
204 |
pvEdit->setReadOnly(true);
|
205 |
pvEdit->setUndoRedoEnabled(FALSE);
|
205 |
pvEdit->setUndoRedoEnabled(false);
|
206 |
unnamedLayout->addWidget(pvEdit);
|
206 |
unnamedLayout->addWidget(pvEdit);
|
207 |
pvTab->addTab(unnamed, "");
|
207 |
pvTab->addTab(unnamed, "");
|
208 |
|
208 |
|
209 |
previewLayout->addWidget(pvTab);
|
209 |
previewLayout->addWidget(pvTab);
|
210 |
|
210 |
|
|
... |
|
... |
230 |
searchTextCMB->setCompleter(0);
|
230 |
searchTextCMB->setCompleter(0);
|
231 |
|
231 |
|
232 |
layout3->addWidget(searchTextCMB);
|
232 |
layout3->addWidget(searchTextCMB);
|
233 |
|
233 |
|
234 |
nextButton = new QPushButton(this);
|
234 |
nextButton = new QPushButton(this);
|
235 |
nextButton->setEnabled(TRUE);
|
235 |
nextButton->setEnabled(true);
|
236 |
layout3->addWidget(nextButton);
|
236 |
layout3->addWidget(nextButton);
|
237 |
prevButton = new QPushButton(this);
|
237 |
prevButton = new QPushButton(this);
|
238 |
prevButton->setEnabled(TRUE);
|
238 |
prevButton->setEnabled(true);
|
239 |
layout3->addWidget(prevButton);
|
239 |
layout3->addWidget(prevButton);
|
240 |
clearPB = new QPushButton(this);
|
240 |
clearPB = new QPushButton(this);
|
241 |
clearPB->setEnabled(FALSE);
|
241 |
clearPB->setEnabled(false);
|
242 |
layout3->addWidget(clearPB);
|
242 |
layout3->addWidget(clearPB);
|
243 |
matchCheck = new QCheckBox(this);
|
243 |
matchCheck = new QCheckBox(this);
|
244 |
layout3->addWidget(matchCheck);
|
244 |
layout3->addWidget(matchCheck);
|
245 |
|
245 |
|
246 |
previewLayout->addLayout(layout3);
|
246 |
previewLayout->addLayout(layout3);
|
|
... |
|
... |
395 |
}
|
395 |
}
|
396 |
|
396 |
|
397 |
void Preview::searchTextChanged(const QString & text)
|
397 |
void Preview::searchTextChanged(const QString & text)
|
398 |
{
|
398 |
{
|
399 |
LOGDEB1(("Search line text changed. text: '%s'\n",
|
399 |
LOGDEB1(("Search line text changed. text: '%s'\n",
|
400 |
(const char *)text.toAscii()));
|
400 |
(const char *)text.toUtf8()));
|
401 |
m_searchTextFromIndex = -1;
|
401 |
m_searchTextFromIndex = -1;
|
402 |
if (text.isEmpty()) {
|
402 |
if (text.isEmpty()) {
|
403 |
m_dynSearchActive = false;
|
403 |
m_dynSearchActive = false;
|
404 |
clearPB->setEnabled(false);
|
404 |
clearPB->setEnabled(false);
|
405 |
} else {
|
405 |
} else {
|
|
... |
|
... |
579 |
{
|
579 |
{
|
580 |
LOGDEB1(("PreviewTextEdit::addEditorTab()\n"));
|
580 |
LOGDEB1(("PreviewTextEdit::addEditorTab()\n"));
|
581 |
QWidget *anon = new QWidget((QWidget *)pvTab);
|
581 |
QWidget *anon = new QWidget((QWidget *)pvTab);
|
582 |
QVBoxLayout *anonLayout = new QVBoxLayout(anon);
|
582 |
QVBoxLayout *anonLayout = new QVBoxLayout(anon);
|
583 |
PreviewTextEdit *editor = new PreviewTextEdit(anon, "pvEdit", this);
|
583 |
PreviewTextEdit *editor = new PreviewTextEdit(anon, "pvEdit", this);
|
584 |
editor->setReadOnly(TRUE);
|
584 |
editor->setReadOnly(true);
|
585 |
editor->setUndoRedoEnabled(FALSE );
|
585 |
editor->setUndoRedoEnabled(false );
|
586 |
anonLayout->addWidget(editor);
|
586 |
anonLayout->addWidget(editor);
|
587 |
pvTab->addTab(anon, "Tab");
|
587 |
pvTab->addTab(anon, "Tab");
|
588 |
pvTab->setCurrentIndex(pvTab->count() -1);
|
588 |
pvTab->setCurrentIndex(pvTab->count() -1);
|
589 |
return editor;
|
589 |
return editor;
|
590 |
}
|
590 |
}
|
|
... |
|
... |
809 |
|
809 |
|
810 |
setCurTabProps(idoc, docnum);
|
810 |
setCurTabProps(idoc, docnum);
|
811 |
|
811 |
|
812 |
QString msg = QString("Loading: %1 (size %2 bytes)")
|
812 |
QString msg = QString("Loading: %1 (size %2 bytes)")
|
813 |
.arg(QString::fromLocal8Bit(idoc.url.c_str()))
|
813 |
.arg(QString::fromLocal8Bit(idoc.url.c_str()))
|
814 |
.arg(QString::fromAscii(idoc.fbytes.c_str()));
|
814 |
.arg(QString::fromUtf8(idoc.fbytes.c_str()));
|
815 |
|
815 |
|
816 |
// Create progress dialog and aux objects
|
816 |
// Create progress dialog and aux objects
|
817 |
const int nsteps = 20;
|
817 |
const int nsteps = 20;
|
818 |
QProgressDialog progress(msg, tr("Cancel"), 0, nsteps, this);
|
818 |
QProgressDialog progress(msg, tr("Cancel"), 0, nsteps, this);
|
819 |
progress.setMinimumDuration(2000);
|
819 |
progress.setMinimumDuration(2000);
|
|
... |
|
... |
846 |
if (CancelCheck::instance().cancelState())
|
846 |
if (CancelCheck::instance().cancelState())
|
847 |
return false;
|
847 |
return false;
|
848 |
if (status != 0) {
|
848 |
if (status != 0) {
|
849 |
QString explain;
|
849 |
QString explain;
|
850 |
if (!lthr.missing.empty()) {
|
850 |
if (!lthr.missing.empty()) {
|
851 |
explain = QString::fromAscii("<br>") +
|
851 |
explain = QString::fromUtf8("<br>") +
|
852 |
tr("Missing helper program: ") +
|
852 |
tr("Missing helper program: ") +
|
853 |
QString::fromLocal8Bit(lthr.missing.c_str());
|
853 |
QString::fromLocal8Bit(lthr.missing.c_str());
|
854 |
QMessageBox::warning(0, "Recoll",
|
854 |
QMessageBox::warning(0, "Recoll",
|
855 |
tr("Can't turn doc into internal "
|
855 |
tr("Can't turn doc into internal "
|
856 |
"representation for ") +
|
856 |
"representation for ") +
|