@ -23,8 +23,8 @@
# include "kwidgetlistbox.h"
# include "kerrylabel.h"
# include < tq layout.h>
# include <t qt extcodec.h>
# include < layout.h>
# include <t extcodec.h>
# include <kdebug.h>
# include <kfiledialog.h>
# include <kpushbutton.h>
@ -127,13 +127,13 @@ static TQLabel* switchLabel[switchLabelCount] = {showEverything, showApplication
displayed_results . clear ( ) ;
displayAmount = 5 ;
displayOffset = 0 ;
label tq Status- > tq setAlignment( TQt : : SingleLine ) ;
label Status- > setAlignment( TQt : : SingleLine ) ;
pPreviewJob = 0 ;
pPreviewMimeTypes = 0 ;
previewItems . clear ( ) ;
previewItems . setAutoDelete ( true ) ;
pending_showQuickTips = true ;
update tq Status( ) ;
update Status( ) ;
defaultSortOrder = Modified ;
currentSortOrder = defaultSortOrder ;
kapp - > dcopClient ( ) - > setDefaultObject ( objId ( ) ) ;
@ -190,7 +190,7 @@ void SearchDlg::showQuickTips()
tableHits - > insertItem ( item ) ;
label tq Status- > setText ( " " ) ;
label Status- > setText ( " " ) ;
}
void SearchDlg : : search ( const TQString & search )
@ -253,7 +253,7 @@ void SearchDlg::setDisplayAmount(int amount)
tableHits - > setUpdatesEnabled ( false ) ;
fillTableHits ( ) ;
tableHits - > setUpdatesEnabled ( true ) ;
update tq Status( ) ;
update Status( ) ;
}
void SearchDlg : : setSortOrder ( int order )
@ -296,7 +296,7 @@ void SearchDlg::slotClear()
tableHits - > clear ( ) ;
displayed_results . clear ( ) ;
results . clear ( ) ;
update tq Status( ) ;
update Status( ) ;
}
void SearchDlg : : slotPrevious ( )
@ -308,7 +308,7 @@ void SearchDlg::slotPrevious()
tableHits - > setUpdatesEnabled ( false ) ;
fillTableHits ( ) ;
tableHits - > setUpdatesEnabled ( true ) ;
update tq Status( ) ;
update Status( ) ;
}
void SearchDlg : : slotNext ( )
@ -320,7 +320,7 @@ void SearchDlg::slotNext()
tableHits - > setUpdatesEnabled ( false ) ;
fillTableHits ( ) ;
tableHits - > setUpdatesEnabled ( true ) ;
update tq Status( ) ;
update Status( ) ;
}
void SearchDlg : : sortFilterResults ( )
@ -330,7 +330,7 @@ void SearchDlg::sortFilterResults()
tableHits - > clear ( ) ;
displayed_results . clear ( ) ;
displayResults ( results ) ;
update tq Status( ) ;
update Status( ) ;
}
void SearchDlg : : fillTableHits ( )
@ -359,28 +359,28 @@ void SearchDlg::fillTableHits()
}
}
void SearchDlg : : update tq Status( )
void SearchDlg : : update Status( )
{
buttonPrevious - > setEnabled ( displayOffset > 0 ) ;
buttonNext - > setEnabled ( displayOffset + displayAmount < ( int ) displayed_results . count ( ) ) ;
label tq Status- > tq setAlignment( TQt : : SingleLine ) ;
label Status- > setAlignment( TQt : : SingleLine ) ;
const int count = displayed_results . count ( ) ;
TQString text ;
if ( displayAmount = = 1 )
text = i18n ( " <b>%1 results</b> found. " ) . tq arg( displayed_results . count ( ) ) ;
text = i18n ( " <b>%1 results</b> found. " ) . arg( displayed_results . count ( ) ) ;
else if ( count = = 0 )
text = i18n ( " <qt>No results.</qt> " ) . replace ( " <qt> " , TQString ( ) ) . replace ( " </qt> " , TQString ( ) ) ;
else if ( displayOffset = = 0 )
text = i18n ( " Best <b>%1 results of %2</b> shown. " ) . tq arg( tableHits - > count ( ) ) . tq arg( displayed_results . count ( ) ) ;
text = i18n ( " Best <b>%1 results of %2</b> shown. " ) . arg( tableHits - > count ( ) ) . arg( displayed_results . count ( ) ) ;
else
text = i18n ( " Results <b>%1 through %2 of %3</b> are shown. " ) . tq arg( displayOffset + 1 ) . tq arg( displayOffset + tableHits - > count ( ) ) . tq arg( displayed_results . count ( ) ) ;
text = i18n ( " Results <b>%1 through %2 of %3</b> are shown. " ) . arg( displayOffset + 1 ) . arg( displayOffset + tableHits - > count ( ) ) . arg( displayed_results . count ( ) ) ;
#if 0
if ( still_searching )
text = text + " <b> " + i18n ( " (still searching) " ) + " </b> " ;
# endif
label tq Status- > setText ( text ) ;
label Status- > setText ( text ) ;
}
void SearchDlg : : search ( )
@ -395,7 +395,7 @@ void SearchDlg::search()
tableHits - > clear ( ) ;
HitWidget * item = new HitWidget ( TQString ( ) , TQString ( ) ) ;
TQLabel * headerLabel = new TQLabel ( item ) ;
headerLabel - > setText ( i18n ( " The query for \" %1 \" failed. " ) . tq arg( current_query . get ( ) ) ) ;
headerLabel - > setText ( i18n ( " The query for \" %1 \" failed. " ) . arg( current_query . get ( ) ) ) ;
item - > insertHeaderWidget ( 0 , headerLabel ) ;
item - > setIcon ( " messagebox_critical " ) ;
@ -415,12 +415,12 @@ void SearchDlg::search()
connect ( buttonStart , TQT_SIGNAL ( leftClickedURL ( ) ) , TQT_SLOT ( slotStartBeagle ( ) ) ) ;
tableHits - > insertItem ( item ) ;
label tq Status- > setText ( " " ) ;
label Status- > setText ( " " ) ;
return ;
}
slotClear ( ) ;
label tq Status- > setText ( i18n ( " Searching... " ) ) ;
label Status- > setText ( i18n ( " Searching... " ) ) ;
// Beagle search
if ( beagle_search ! = NULL ) {
@ -572,7 +572,7 @@ void SearchDlg::insertResult(BeagleSearch::beagle_result_struct *result,int inde
TQDateTime datetime ;
datetime . setTime_t ( result - > last_index_time ) ;
if ( datetime . date ( ) . year ( ) > 1970 )
description = description + i18n ( " Last viewed: %1 " ) . tq arg( KGlobal : : locale ( ) - > formatDateTime ( datetime , false ) ) + " <br> " ;
description = description + i18n ( " Last viewed: %1 " ) . arg( KGlobal : : locale ( ) - > formatDateTime ( datetime , false ) ) + " <br> " ;
}
item - > setDescriptionText ( description + i18n ( " URL: " ) + " " + * ( result - > uri ) + " </qt> " ) ;
@ -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 - > tq setAlignment( headerFileLabel - > tq alignment( ) | TQt : : SingleLine ) ;
headerFileLabel - > setAlignment( headerFileLabel - > alignment( ) | TQt : : SingleLine ) ;
headerFileLabel - > setURL ( * ( result - > uri ) ) ;
item - > insertHeaderWidget ( 0 , headerFileLabel ) ;
connect ( headerFileLabel , TQT_SIGNAL ( leftClickedURL ( ) ) , TQT_SLOT ( slotOpen ( ) ) ) ;
@ -597,14 +597,14 @@ void SearchDlg::insertResult(BeagleSearch::beagle_result_struct *result,int inde
TQDateTime datetime ;
datetime . setTime_t ( result - > last_index_time ) ;
item - > setDescriptionText ( " <qt> " + i18n ( " Published: %1 " ) . tq arg( KGlobal : : locale ( ) - > formatDateTime ( datetime , false ) ) + " <br> " ) ;
item - > setDescriptionText ( " <qt> " + i18n ( " Published: %1 " ) . arg( KGlobal : : locale ( ) - > formatDateTime ( datetime , false ) ) + " <br> " ) ;
if ( result - > snippet )
item - > setPropertiesText ( " <qt> " + * ( result - > snippet ) + " </qt> " ) ;
TQLabel * headerLabel = new TQLabel ( item ) ;
headerLabel - > setText ( i18n ( " Weblog: " ) ) ;
headerLabel - > tq setAlignment( headerLabel - > tq alignment( ) | TQt : : SingleLine ) ;
headerLabel - > setAlignment( headerLabel - > alignment( ) | 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 - > tq setAlignment( headerFileLabel - > tq alignment( ) | TQt : : SingleLine ) ;
headerFileLabel - > setAlignment( headerFileLabel - > alignment( ) | TQt : : SingleLine ) ;
headerFileLabel - > setURL ( identifier ) ;
item - > insertHeaderWidget ( 1 , headerFileLabel ) ;
connect ( headerFileLabel , TQT_SIGNAL ( leftClickedURL ( ) ) , TQT_SLOT ( slotOpen ( ) ) ) ;
@ -625,7 +625,7 @@ void SearchDlg::insertResult(BeagleSearch::beagle_result_struct *result,int inde
TQDateTime datetime ;
datetime . setTime_t ( result - > last_index_time ) ;
item - > setDescriptionText ( " <qt> " + i18n ( " Last modified: %1 " ) . tq arg( KGlobal : : locale ( ) - > formatDateTime ( datetime , false ) ) + " <br> " ) ;
item - > setDescriptionText ( " <qt> " + i18n ( " Last modified: %1 " ) . arg( KGlobal : : locale ( ) - > formatDateTime ( datetime , false ) ) + " <br> " ) ;
if ( result - > snippet )
item - > setPropertiesText ( " <qt> " + * ( result - > snippet ) + " </qt> " ) ;
@ -643,7 +643,7 @@ void SearchDlg::insertResult(BeagleSearch::beagle_result_struct *result,int inde
item - > setIcon ( " contents2 " ) ;
TQDateTime datetime ;
datetime . setTime_t ( result - > last_index_time ) ;
item - > setDescriptionText ( " <qt> " + i18n ( " Last modified: %1 " ) . tq arg( KGlobal : : locale ( ) - > formatDateTime ( datetime , false ) ) + " <br> " ) ;
item - > setDescriptionText ( " <qt> " + i18n ( " Last modified: %1 " ) . arg( KGlobal : : locale ( ) - > formatDateTime ( datetime , false ) ) + " <br> " ) ;
if ( result - > snippet )
@ -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 - > tq setAlignment( headerNoteLabel - > tq alignment( ) | TQt : : SingleLine ) ;
headerNoteLabel - > setAlignment( headerNoteLabel - > alignment( ) | TQt : : SingleLine ) ;
headerNoteLabel - > setURL ( item - > uri ( ) ) ;
item - > insertHeaderWidget ( 0 , headerNoteLabel ) ;
connect ( headerNoteLabel , TQT_SIGNAL ( leftClickedURL ( ) ) , TQT_SLOT ( slotOpen ( ) ) ) ;
@ -668,9 +668,9 @@ void SearchDlg::insertResult(BeagleSearch::beagle_result_struct *result,int inde
TQString properties ;
TQDateTime datetime ;
datetime = datetimeFromString ( takeProperty ( " fixme:starttime " , _properties ) ) ;
properties = properties + i18n ( " Start time: %1 " ) . tq arg( KGlobal : : locale ( ) - > formatDateTime ( datetime , false ) ) + " <br> " ;
properties = properties + i18n ( " Start time: %1 " ) . arg( KGlobal : : locale ( ) - > formatDateTime ( datetime , false ) ) + " <br> " ;
datetime = datetimeFromString ( takeProperty ( " fixme:endtime " , _properties ) ) ;
properties = properties + i18n ( " End time: %1 " ) . tq arg( KGlobal : : locale ( ) - > formatDateTime ( datetime , false ) ) + " <br> " ;
properties = properties + i18n ( " End time: %1 " ) . arg( KGlobal : : locale ( ) - > formatDateTime ( datetime , false ) ) + " <br> " ;
BeagleSearch : : PropertyList : : iterator it ;
for ( it = _properties . begin ( ) ; it ! = _properties . end ( ) ; + + it )
@ -735,15 +735,15 @@ void SearchDlg::insertResult(BeagleSearch::beagle_result_struct *result,int inde
number = addresseee . phoneNumber ( KABC : : PhoneNumber : : Work ) . number ( ) ;
if ( ! number . isEmpty ( ) )
properties = properties + i18n ( " Business phone: %1 " ) . tq arg( number ) + " <br> " ;
properties = properties + i18n ( " Business phone: %1 " ) . arg( number ) + " <br> " ;
number = addresseee . phoneNumber ( KABC : : PhoneNumber : : Cell ) . number ( ) ;
if ( ! number . isEmpty ( ) )
properties = properties + i18n ( " Mobile phone: %1 " ) . tq arg( number ) + " <br> " ;
properties = properties + i18n ( " Mobile phone: %1 " ) . arg( number ) + " <br> " ;
number = addresseee . phoneNumber ( KABC : : PhoneNumber : : Home ) . number ( ) ;
if ( ! number . isEmpty ( ) )
properties = properties + i18n ( " Home phone: %1 " ) . tq arg( number ) + " <br> " ;
properties = properties + i18n ( " Home phone: %1 " ) . arg( number ) + " <br> " ;
if ( ! properties . isEmpty ( ) )
item - > setDescriptionText ( " <qt> " + properties + " </qt> " ) ;
@ -777,7 +777,7 @@ void SearchDlg::insertResult(BeagleSearch::beagle_result_struct *result,int inde
TQDateTime received_datetime ;
received_datetime = datetimeFromString ( received ) ;
if ( ! received . isEmpty ( ) )
item - > setDescriptionText ( " <qt> " + i18n ( " Received: %1 " ) . tq arg( KGlobal : : locale ( ) - > formatDateTime ( received_datetime , false ) ) + " </qt> " ) ;
item - > setDescriptionText ( " <qt> " + i18n ( " Received: %1 " ) . arg( KGlobal : : locale ( ) - > formatDateTime ( received_datetime , false ) ) + " </qt> " ) ;
TQString properties ;
BeagleSearch : : PropertyList : : iterator it ;
@ -801,7 +801,7 @@ void SearchDlg::insertResult(BeagleSearch::beagle_result_struct *result,int inde
TQLabel * headerLabel = new TQLabel ( item ) ;
headerLabel - > setText ( i18n ( " From " ) ) ;
headerLabel - > tq setAlignment( headerLabel - > tq alignment( ) | TQt : : SingleLine ) ;
headerLabel - > setAlignment( headerLabel - > alignment( ) | 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 - > tq setAlignment( headerLabel - > tq alignment( ) | TQt : : SingleLine ) ;
headerLabel - > setAlignment( headerLabel - > alignment( ) | TQt : : SingleLine ) ;
item - > insertHeaderWidget ( 0 , headerLabel ) ;
KerryLabel * headerFileLabel = new KerryLabel ( item ) ;
@ -844,7 +844,7 @@ void SearchDlg::insertResult(BeagleSearch::beagle_result_struct *result,int inde
TQDateTime datetime ;
datetime . setTime_t ( result - > last_index_time ) ;
item - > setDescriptionText ( " <qt> " + i18n ( " Date: %1 " ) . tq arg( KGlobal : : locale ( ) - > formatDateTime ( datetime , false ) + " </qt> " ) ) ;
item - > setDescriptionText ( " <qt> " + i18n ( " Date: %1 " ) . arg( KGlobal : : locale ( ) - > formatDateTime ( datetime , false ) + " </qt> " ) ) ;
if ( result - > snippet )
item - > setPropertiesText ( " <qt> " + * ( result - > snippet ) + " </qt> " ) ;
@ -853,7 +853,7 @@ void SearchDlg::insertResult(BeagleSearch::beagle_result_struct *result,int inde
headerFileLabel - > setURL ( * ( result - > uri ) ) ;
TQStringList _properties ( result - > properties ) ;
TQString person = takeProperty ( " fixme:speakingto " , _properties ) ;
headerFileLabel - > setText ( i18n ( " Conversation With %1 " ) . tq arg( person . isEmpty ( ) ? i18n ( " Unknown Person " ) : person ) ) ;
headerFileLabel - > setText ( i18n ( " Conversation With %1 " ) . arg( person . isEmpty ( ) ? i18n ( " Unknown Person " ) : person ) ) ;
item - > insertHeaderWidget ( 0 , headerFileLabel ) ;
connect ( headerFileLabel , TQT_SIGNAL ( leftClickedURL ( ) ) , TQT_SLOT ( slotOpen ( ) ) ) ;
}
@ -881,12 +881,12 @@ void SearchDlg::insertResult(BeagleSearch::beagle_result_struct *result,int inde
{
TQLabel * headerLabel = new TQLabel ( item ) ;
headerLabel - > setText ( i18n ( " From " ) ) ;
headerLabel - > tq setAlignment( headerLabel - > tq alignment( ) | TQt : : SingleLine ) ;
headerLabel - > setAlignment( headerLabel - > alignment( ) | TQt : : SingleLine ) ;
item - > insertHeaderWidget ( 1 , headerLabel ) ;
KerryLabel * headerFileLabel = new KerryLabel ( item ) ;
headerFileLabel - > setText ( homepage ) ;
headerFileLabel - > tq setAlignment( headerFileLabel - > tq alignment( ) | TQt : : SingleLine ) ;
headerFileLabel - > setAlignment( headerFileLabel - > alignment( ) | TQt : : SingleLine ) ;
headerFileLabel - > setURL ( homepage ) ;
item - > insertHeaderWidget ( 2 , headerFileLabel ) ;
connect ( headerFileLabel , TQT_SIGNAL ( leftClickedURL ( const TQString & ) ) , TQT_SLOT ( slotOpenURL ( const TQString & ) ) ) ;
@ -898,19 +898,19 @@ void SearchDlg::insertResult(BeagleSearch::beagle_result_struct *result,int inde
TQString install_time_str = takeProperty ( " fixme:install_time " , _properties ) ;
if ( ! install_time_str . isEmpty ( ) )
{
properties = properties + i18n ( " Installed on: %1 " ) . tq arg( KGlobal : : locale ( ) - > formatDateTime ( datetimeFromString ( install_time_str ) , false ) ) + " <br> " ;
properties = properties + i18n ( " Installed on: %1 " ) . arg( KGlobal : : locale ( ) - > formatDateTime ( datetimeFromString ( install_time_str ) , false ) ) + " <br> " ;
}
TQString install_size_str = takeProperty ( " fixme:contents_byte_count " , _properties ) ;
if ( ! install_size_str . isEmpty ( ) )
{
properties = properties + i18n ( " Installed size: %1 " ) . tq arg( formatBytes ( install_size_str ) ) + " <br> " ;
properties = properties + i18n ( " Installed size: %1 " ) . arg( formatBytes ( install_size_str ) ) + " <br> " ;
}
TQString download_size_str = takeProperty ( " fixme:size " , _properties ) ;
if ( ! download_size_str . isEmpty ( ) )
{
properties = properties + i18n ( " Download size: %1 " ) . tq arg( formatBytes ( download_size_str ) ) + " <br> " ;
properties = properties + i18n ( " Download size: %1 " ) . arg( formatBytes ( download_size_str ) ) + " <br> " ;
}
BeagleSearch : : PropertyList : : iterator it ;
@ -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 - > tq setAlignment( headerLabel - > tq alignment( ) | TQt : : SingleLine ) ;
headerLabel - > setAlignment( headerLabel - > alignment( ) | TQt : : SingleLine ) ;
item - > insertHeaderWidget ( 1 , headerLabel ) ;
KerryLabel * headerDirLabel = new KerryLabel ( item ) ;
@ -982,7 +982,7 @@ void SearchDlg::insertResult(BeagleSearch::beagle_result_struct *result,int inde
TQDateTime datetime ;
datetime . setTime_t ( result - > last_index_time ) ;
title = i18n ( " Last modified: %1 " ) . tq arg( KGlobal : : locale ( ) - > formatDateTime ( datetime , false ) ) ;
title = i18n ( " Last modified: %1 " ) . arg( KGlobal : : locale ( ) - > formatDateTime ( datetime , false ) ) ;
item - > setDescriptionText ( " <qt> " + title + " </qt> " ) ;
TQString properties ;
@ -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 - > tq setAlignment( headerLabel - > tq alignment( ) | TQt : : SingleLine ) ;
headerLabel - > setAlignment( headerLabel - > alignment( ) | TQt : : SingleLine ) ;
item - > insertHeaderWidget ( 1 , headerLabel ) ;
KerryLabel * headerDirLabel = new KerryLabel ( item ) ;
@ -1055,7 +1055,7 @@ void SearchDlg::insertResult(BeagleSearch::beagle_result_struct *result,int inde
else {
TQDateTime datetime ;
datetime . setTime_t ( result - > last_index_time ) ;
title = i18n ( " Last modified: %1 " ) . tq arg( KGlobal : : locale ( ) - > formatDateTime ( datetime , false ) ) ;
title = i18n ( " Last modified: %1 " ) . arg( KGlobal : : locale ( ) - > formatDateTime ( datetime , false ) ) ;
}
item - > setDescriptionText ( " <qt> " + title + " </qt> " ) ;
@ -1086,7 +1086,7 @@ void SearchDlg::insertResult(BeagleSearch::beagle_result_struct *result,int inde
connect ( buttonGo , TQT_SIGNAL ( leftClickedURL ( ) ) , TQT_SLOT ( slotOpenDir ( ) ) ) ;
}
item - > score - > setText ( i18n ( " <p align= \" center \" >Score: %1</p> " ) . tq arg( result - > score , 0 , ' f ' , 1 ) ) ;
item - > score - > setText ( i18n ( " <p align= \" center \" >Score: %1</p> " ) . arg( result - > score , 0 , ' f ' , 1 ) ) ;
tableHits - > insertItem ( item , index ) ;
}
@ -1173,21 +1173,21 @@ void SearchDlg::displayResults(BeagleSearch::BeagleResultList &items)
show = true ;
break ;
case Today :
show = ( datetime . date ( ) = = TQDate : : tq currentDate( ) ) ;
show = ( datetime . date ( ) = = TQDate : : currentDate( ) ) ;
break ;
case SinceYesterday :
show = ( datetime . date ( ) > TQDate : : tq currentDate( ) . addDays ( - 1 ) ) ;
show = ( datetime . date ( ) > TQDate : : currentDate( ) . addDays ( - 1 ) ) ;
break ;
case ThisWeek :
show = ( datetime . date ( ) . year ( ) = = TQDate : : tq currentDate( ) . year ( ) & &
datetime . date ( ) . weekNumber ( ) = = TQDate : : tq currentDate( ) . weekNumber ( ) ) ;
show = ( datetime . date ( ) . year ( ) = = TQDate : : currentDate( ) . year ( ) & &
datetime . date ( ) . weekNumber ( ) = = TQDate : : currentDate( ) . weekNumber ( ) ) ;
break ;
case ThisMonth :
show = ( datetime . date ( ) . year ( ) = = TQDate : : tq currentDate( ) . year ( ) & &
datetime . date ( ) . month ( ) = = TQDate : : tq currentDate( ) . month ( ) ) ;
show = ( datetime . date ( ) . year ( ) = = TQDate : : currentDate( ) . year ( ) & &
datetime . date ( ) . month ( ) = = TQDate : : currentDate( ) . month ( ) ) ;
break ;
case ThisYear :
show = ( datetime . date ( ) . year ( ) = = TQDate : : tq currentDate( ) . 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 ) ;
}
update tq Status( ) ;
update Status( ) ;
}
void SearchDlg : : slotOpen ( )
@ -1428,7 +1428,7 @@ void SearchDlg::searchLostOutput(BeagleSearch::VanishedURIList &items)
tableHits - > setUpdatesEnabled ( true ) ;
}
update tq Status( ) ;
update Status( ) ;
}
void SearchDlg : : searchFinished ( )
@ -1438,7 +1438,7 @@ void SearchDlg::searchFinished()
still_searching = false ;
if ( displayed_results . count ( ) ) {
update tq Status( ) ;
update Status( ) ;
return ;
}
@ -1450,7 +1450,7 @@ void SearchDlg::searchFinished()
tableHits - > clear ( ) ;
HitWidget * item = new HitWidget ( TQString ( ) , TQString ( ) ) ;
TQLabel * headerLabel = new TQLabel ( item ) ;
headerLabel - > setText ( i18n ( " No results for \" %1 \" were found. " ) . tq arg( current_query . get ( ) ) ) ;
headerLabel - > setText ( i18n ( " No results for \" %1 \" were found. " ) . arg( current_query . get ( ) ) ) ;
item - > insertHeaderWidget ( 0 , headerLabel ) ;
item - > setIcon ( " messagebox_warning " ) ;
@ -1464,7 +1464,7 @@ void SearchDlg::searchFinished()
beagleJustStarted = false ;
}
item - > setDescriptionText ( text + " </qt> " ) ;
label tq Status- > setText ( " " ) ;
label Status- > setText ( " " ) ;
tableHits - > insertItem ( item ) ;
}
@ -1570,7 +1570,7 @@ void SearchDlg::keyPressEvent(TQKeyEvent *e)
tableHits - > setUpdatesEnabled ( false ) ;
fillTableHits ( ) ;
tableHits - > setUpdatesEnabled ( true ) ;
update tq Status( ) ;
update Status( ) ;
}
else
slotNext ( ) ;
@ -1584,7 +1584,7 @@ void SearchDlg::keyPressEvent(TQKeyEvent *e)
tableHits - > setUpdatesEnabled ( false ) ;
fillTableHits ( ) ;
tableHits - > setUpdatesEnabled ( true ) ;
update tq Status( ) ;
update Status( ) ;
}
else
slotPrevious ( ) ;