|
|
|
@ -127,13 +127,13 @@ static TQLabel* switchLabel[switchLabelCount] = {showEverything, showApplication
|
|
|
|
|
displayed_results.clear();
|
|
|
|
|
displayAmount = 5;
|
|
|
|
|
displayOffset = 0;
|
|
|
|
|
labeltqStatus->tqsetAlignment(TQt::SingleLine);
|
|
|
|
|
labelStatus->setAlignment(TQt::SingleLine);
|
|
|
|
|
pPreviewJob = 0;
|
|
|
|
|
pPreviewMimeTypes = 0;
|
|
|
|
|
previewItems.clear();
|
|
|
|
|
previewItems.setAutoDelete(true);
|
|
|
|
|
pending_showQuickTips=true;
|
|
|
|
|
updatetqStatus();
|
|
|
|
|
updateStatus();
|
|
|
|
|
defaultSortOrder = Modified;
|
|
|
|
|
currentSortOrder = defaultSortOrder;
|
|
|
|
|
kapp->dcopClient()->setDefaultObject( objId() );
|
|
|
|
@ -190,7 +190,7 @@ void SearchDlg::showQuickTips()
|
|
|
|
|
|
|
|
|
|
tableHits->insertItem(item);
|
|
|
|
|
|
|
|
|
|
labeltqStatus->setText("");
|
|
|
|
|
labelStatus->setText("");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void SearchDlg::search(const TQString & search)
|
|
|
|
@ -253,7 +253,7 @@ void SearchDlg::setDisplayAmount(int amount)
|
|
|
|
|
tableHits->setUpdatesEnabled(false);
|
|
|
|
|
fillTableHits();
|
|
|
|
|
tableHits->setUpdatesEnabled(true);
|
|
|
|
|
updatetqStatus();
|
|
|
|
|
updateStatus();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void SearchDlg::setSortOrder(int order)
|
|
|
|
@ -296,7 +296,7 @@ void SearchDlg::slotClear()
|
|
|
|
|
tableHits->clear();
|
|
|
|
|
displayed_results.clear();
|
|
|
|
|
results.clear();
|
|
|
|
|
updatetqStatus();
|
|
|
|
|
updateStatus();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void SearchDlg::slotPrevious()
|
|
|
|
@ -308,7 +308,7 @@ void SearchDlg::slotPrevious()
|
|
|
|
|
tableHits->setUpdatesEnabled(false);
|
|
|
|
|
fillTableHits();
|
|
|
|
|
tableHits->setUpdatesEnabled(true);
|
|
|
|
|
updatetqStatus();
|
|
|
|
|
updateStatus();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void SearchDlg::slotNext()
|
|
|
|
@ -320,7 +320,7 @@ void SearchDlg::slotNext()
|
|
|
|
|
tableHits->setUpdatesEnabled(false);
|
|
|
|
|
fillTableHits();
|
|
|
|
|
tableHits->setUpdatesEnabled(true);
|
|
|
|
|
updatetqStatus();
|
|
|
|
|
updateStatus();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void SearchDlg::sortFilterResults()
|
|
|
|
@ -330,7 +330,7 @@ void SearchDlg::sortFilterResults()
|
|
|
|
|
tableHits->clear();
|
|
|
|
|
displayed_results.clear();
|
|
|
|
|
displayResults(results);
|
|
|
|
|
updatetqStatus();
|
|
|
|
|
updateStatus();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void SearchDlg::fillTableHits()
|
|
|
|
@ -359,11 +359,11 @@ void SearchDlg::fillTableHits()
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void SearchDlg::updatetqStatus()
|
|
|
|
|
void SearchDlg::updateStatus()
|
|
|
|
|
{
|
|
|
|
|
buttonPrevious->setEnabled(displayOffset>0);
|
|
|
|
|
buttonNext->setEnabled(displayOffset+displayAmount<(int)displayed_results.count());
|
|
|
|
|
labeltqStatus->tqsetAlignment(TQt::SingleLine);
|
|
|
|
|
labelStatus->setAlignment(TQt::SingleLine);
|
|
|
|
|
const int count = displayed_results.count();
|
|
|
|
|
TQString text;
|
|
|
|
|
if (displayAmount==1)
|
|
|
|
@ -380,7 +380,7 @@ void SearchDlg::updatetqStatus()
|
|
|
|
|
text=text+" <b>"+i18n("(still searching)")+"</b>";
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
labeltqStatus->setText(text);
|
|
|
|
|
labelStatus->setText(text);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void SearchDlg::search()
|
|
|
|
@ -415,12 +415,12 @@ void SearchDlg::search()
|
|
|
|
|
connect(buttonStart, TQT_SIGNAL(leftClickedURL()), TQT_SLOT(slotStartBeagle()));
|
|
|
|
|
|
|
|
|
|
tableHits->insertItem(item);
|
|
|
|
|
labeltqStatus->setText("");
|
|
|
|
|
labelStatus->setText("");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
slotClear();
|
|
|
|
|
labeltqStatus->setText(i18n("Searching..."));
|
|
|
|
|
labelStatus->setText(i18n("Searching..."));
|
|
|
|
|
|
|
|
|
|
// Beagle search
|
|
|
|
|
if (beagle_search != NULL) {
|
|
|
|
@ -587,7 +587,7 @@ void SearchDlg::insertResult(BeagleSearch::beagle_result_struct *result,int inde
|
|
|
|
|
title = takeProperty("Title",_properties);
|
|
|
|
|
|
|
|
|
|
headerFileLabel->setText(title.isEmpty() ? i18n("Untitled Page") : title);
|
|
|
|
|
headerFileLabel->tqsetAlignment(headerFileLabel->tqalignment() | TQt::SingleLine);
|
|
|
|
|
headerFileLabel->setAlignment(headerFileLabel->tqalignment() | TQt::SingleLine);
|
|
|
|
|
headerFileLabel->setURL(*(result->uri));
|
|
|
|
|
item->insertHeaderWidget(0,headerFileLabel);
|
|
|
|
|
connect(headerFileLabel, TQT_SIGNAL(leftClickedURL()), TQT_SLOT(slotOpen()));
|
|
|
|
@ -604,7 +604,7 @@ void SearchDlg::insertResult(BeagleSearch::beagle_result_struct *result,int inde
|
|
|
|
|
|
|
|
|
|
TQLabel *headerLabel = new TQLabel(item);
|
|
|
|
|
headerLabel->setText(i18n("Weblog:"));
|
|
|
|
|
headerLabel->tqsetAlignment(headerLabel->tqalignment() | TQt::SingleLine);
|
|
|
|
|
headerLabel->setAlignment(headerLabel->tqalignment() | TQt::SingleLine);
|
|
|
|
|
item->insertHeaderWidget(0,headerLabel);
|
|
|
|
|
|
|
|
|
|
TQStringList _properties(result->properties);
|
|
|
|
@ -615,7 +615,7 @@ void SearchDlg::insertResult(BeagleSearch::beagle_result_struct *result,int inde
|
|
|
|
|
|
|
|
|
|
KerryLabel *headerFileLabel = new KerryLabel(item);
|
|
|
|
|
headerFileLabel->setText(title.isEmpty() ? i18n("Untitled Entry") : title);
|
|
|
|
|
headerFileLabel->tqsetAlignment(headerFileLabel->tqalignment() | TQt::SingleLine);
|
|
|
|
|
headerFileLabel->setAlignment(headerFileLabel->tqalignment() | TQt::SingleLine);
|
|
|
|
|
headerFileLabel->setURL(identifier);
|
|
|
|
|
item->insertHeaderWidget(1,headerFileLabel);
|
|
|
|
|
connect(headerFileLabel, TQT_SIGNAL(leftClickedURL()), TQT_SLOT(slotOpen()));
|
|
|
|
@ -654,7 +654,7 @@ void SearchDlg::insertResult(BeagleSearch::beagle_result_struct *result,int inde
|
|
|
|
|
|
|
|
|
|
KerryLabel *headerNoteLabel = new KerryLabel(item);
|
|
|
|
|
headerNoteLabel->setText(title.isEmpty() ? i18n("Untitled Entry") : title);
|
|
|
|
|
headerNoteLabel->tqsetAlignment(headerNoteLabel->tqalignment() | TQt::SingleLine);
|
|
|
|
|
headerNoteLabel->setAlignment(headerNoteLabel->tqalignment() | TQt::SingleLine);
|
|
|
|
|
headerNoteLabel->setURL(item->uri());
|
|
|
|
|
item->insertHeaderWidget(0,headerNoteLabel);
|
|
|
|
|
connect(headerNoteLabel, TQT_SIGNAL(leftClickedURL()), TQT_SLOT(slotOpen()));
|
|
|
|
@ -801,7 +801,7 @@ void SearchDlg::insertResult(BeagleSearch::beagle_result_struct *result,int inde
|
|
|
|
|
|
|
|
|
|
TQLabel *headerLabel = new TQLabel(item);
|
|
|
|
|
headerLabel->setText(i18n("From"));
|
|
|
|
|
headerLabel->tqsetAlignment(headerLabel->tqalignment() | TQt::SingleLine);
|
|
|
|
|
headerLabel->setAlignment(headerLabel->tqalignment() | TQt::SingleLine);
|
|
|
|
|
item->insertHeaderWidget(1,headerLabel);
|
|
|
|
|
|
|
|
|
|
KerryLabel *headerFromLabel = new KerryLabel(item);
|
|
|
|
@ -825,7 +825,7 @@ void SearchDlg::insertResult(BeagleSearch::beagle_result_struct *result,int inde
|
|
|
|
|
|
|
|
|
|
TQLabel *headerLabel = new TQLabel(item);
|
|
|
|
|
headerLabel->setText(i18n("Application:"));
|
|
|
|
|
headerLabel->tqsetAlignment(headerLabel->tqalignment() | TQt::SingleLine);
|
|
|
|
|
headerLabel->setAlignment(headerLabel->tqalignment() | TQt::SingleLine);
|
|
|
|
|
item->insertHeaderWidget(0,headerLabel);
|
|
|
|
|
|
|
|
|
|
KerryLabel *headerFileLabel = new KerryLabel(item);
|
|
|
|
@ -881,12 +881,12 @@ void SearchDlg::insertResult(BeagleSearch::beagle_result_struct *result,int inde
|
|
|
|
|
{
|
|
|
|
|
TQLabel *headerLabel = new TQLabel(item);
|
|
|
|
|
headerLabel->setText(i18n("From"));
|
|
|
|
|
headerLabel->tqsetAlignment(headerLabel->tqalignment() | TQt::SingleLine);
|
|
|
|
|
headerLabel->setAlignment(headerLabel->tqalignment() | TQt::SingleLine);
|
|
|
|
|
item->insertHeaderWidget(1,headerLabel);
|
|
|
|
|
|
|
|
|
|
KerryLabel *headerFileLabel = new KerryLabel(item);
|
|
|
|
|
headerFileLabel->setText(homepage);
|
|
|
|
|
headerFileLabel->tqsetAlignment(headerFileLabel->tqalignment() | TQt::SingleLine);
|
|
|
|
|
headerFileLabel->setAlignment(headerFileLabel->tqalignment() | TQt::SingleLine);
|
|
|
|
|
headerFileLabel->setURL(homepage);
|
|
|
|
|
item->insertHeaderWidget(2,headerFileLabel);
|
|
|
|
|
connect(headerFileLabel, TQT_SIGNAL(leftClickedURL(const TQString&)), TQT_SLOT(slotOpenURL(const TQString&)));
|
|
|
|
@ -965,7 +965,7 @@ void SearchDlg::insertResult(BeagleSearch::beagle_result_struct *result,int inde
|
|
|
|
|
|
|
|
|
|
TQLabel *headerLabel = new TQLabel(item);
|
|
|
|
|
headerLabel->setText(i18n("In Folder"));
|
|
|
|
|
headerLabel->tqsetAlignment(headerLabel->tqalignment() | TQt::SingleLine);
|
|
|
|
|
headerLabel->setAlignment(headerLabel->tqalignment() | TQt::SingleLine);
|
|
|
|
|
item->insertHeaderWidget(1,headerLabel);
|
|
|
|
|
|
|
|
|
|
KerryLabel *headerDirLabel = new KerryLabel(item);
|
|
|
|
@ -1028,7 +1028,7 @@ void SearchDlg::insertResult(BeagleSearch::beagle_result_struct *result,int inde
|
|
|
|
|
|
|
|
|
|
TQLabel *headerLabel = new TQLabel(item);
|
|
|
|
|
headerLabel->setText(i18n("In Folder"));
|
|
|
|
|
headerLabel->tqsetAlignment(headerLabel->tqalignment() | TQt::SingleLine);
|
|
|
|
|
headerLabel->setAlignment(headerLabel->tqalignment() | TQt::SingleLine);
|
|
|
|
|
item->insertHeaderWidget(1,headerLabel);
|
|
|
|
|
|
|
|
|
|
KerryLabel *headerDirLabel = new KerryLabel(item);
|
|
|
|
@ -1173,21 +1173,21 @@ void SearchDlg::displayResults(BeagleSearch::BeagleResultList &items)
|
|
|
|
|
show = true;
|
|
|
|
|
break;
|
|
|
|
|
case Today:
|
|
|
|
|
show = ( datetime.date()==TQDate::tqcurrentDate() );
|
|
|
|
|
show = ( datetime.date()==TQDate::currentDate() );
|
|
|
|
|
break;
|
|
|
|
|
case SinceYesterday:
|
|
|
|
|
show = ( datetime.date()>TQDate::tqcurrentDate().addDays(-1) );
|
|
|
|
|
show = ( datetime.date()>TQDate::currentDate().addDays(-1) );
|
|
|
|
|
break;
|
|
|
|
|
case ThisWeek:
|
|
|
|
|
show = ( datetime.date().year()==TQDate::tqcurrentDate().year() &&
|
|
|
|
|
datetime.date().weekNumber()==TQDate::tqcurrentDate().weekNumber() );
|
|
|
|
|
show = ( datetime.date().year()==TQDate::currentDate().year() &&
|
|
|
|
|
datetime.date().weekNumber()==TQDate::currentDate().weekNumber() );
|
|
|
|
|
break;
|
|
|
|
|
case ThisMonth:
|
|
|
|
|
show = ( datetime.date().year()==TQDate::tqcurrentDate().year() &&
|
|
|
|
|
datetime.date().month()==TQDate::tqcurrentDate().month() );
|
|
|
|
|
show = ( datetime.date().year()==TQDate::currentDate().year() &&
|
|
|
|
|
datetime.date().month()==TQDate::currentDate().month() );
|
|
|
|
|
break;
|
|
|
|
|
case ThisYear:
|
|
|
|
|
show = ( datetime.date().year()==TQDate::tqcurrentDate().year() );
|
|
|
|
|
show = ( datetime.date().year()==TQDate::currentDate().year() );
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
break;
|
|
|
|
@ -1238,7 +1238,7 @@ void SearchDlg::displayResults(BeagleSearch::BeagleResultList &items)
|
|
|
|
|
fillTableHits();
|
|
|
|
|
tableHits->setUpdatesEnabled(true);
|
|
|
|
|
}
|
|
|
|
|
updatetqStatus();
|
|
|
|
|
updateStatus();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void SearchDlg::slotOpen()
|
|
|
|
@ -1428,7 +1428,7 @@ void SearchDlg::searchLostOutput(BeagleSearch::VanishedURIList &items)
|
|
|
|
|
tableHits->setUpdatesEnabled(true);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
updatetqStatus();
|
|
|
|
|
updateStatus();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void SearchDlg::searchFinished()
|
|
|
|
@ -1438,7 +1438,7 @@ void SearchDlg::searchFinished()
|
|
|
|
|
still_searching = false;
|
|
|
|
|
|
|
|
|
|
if (displayed_results.count()) {
|
|
|
|
|
updatetqStatus();
|
|
|
|
|
updateStatus();
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -1464,7 +1464,7 @@ void SearchDlg::searchFinished()
|
|
|
|
|
beagleJustStarted = false;
|
|
|
|
|
}
|
|
|
|
|
item->setDescriptionText(text+"</qt>");
|
|
|
|
|
labeltqStatus->setText("");
|
|
|
|
|
labelStatus->setText("");
|
|
|
|
|
|
|
|
|
|
tableHits->insertItem(item);
|
|
|
|
|
}
|
|
|
|
@ -1570,7 +1570,7 @@ void SearchDlg::keyPressEvent(TQKeyEvent *e)
|
|
|
|
|
tableHits->setUpdatesEnabled(false);
|
|
|
|
|
fillTableHits();
|
|
|
|
|
tableHits->setUpdatesEnabled(true);
|
|
|
|
|
updatetqStatus();
|
|
|
|
|
updateStatus();
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
slotNext();
|
|
|
|
@ -1584,7 +1584,7 @@ void SearchDlg::keyPressEvent(TQKeyEvent *e)
|
|
|
|
|
tableHits->setUpdatesEnabled(false);
|
|
|
|
|
fillTableHits();
|
|
|
|
|
tableHits->setUpdatesEnabled(true);
|
|
|
|
|
updatetqStatus();
|
|
|
|
|
updateStatus();
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
slotPrevious();
|
|
|
|
|