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