@ -41,8 +41,6 @@
# include <tdelocale.h>
# include <kiconloader.h>
# include <kdebug.h>
//For compatibility with old versions of KDE
# include <tdeversion.h>
//Project includes
# include "view.h"
@ -69,7 +67,6 @@ View::View(TQWidget *parent) :
topLayout - > setAutoAdd ( true ) ;
# if defined(TDE_MAKE_VERSION) && TDE_VERSION >= TDE_MAKE_VERSION(3,3,0)
filterBar = new TQHBox ( this ) ;
filterBar - > setSpacing ( 5 ) ;
filterBar - > setSizePolicy ( TQSizePolicy ( TQSizePolicy : : Minimum , TQSizePolicy : : Fixed ) ) ;
@ -97,25 +94,19 @@ View::View(TQWidget *parent) :
label - > setBuddy ( searchFilter ) ;
toggleFilterBar ( ) ;
# endif
this - > initLogList ( ) ;
# if defined(TDE_MAKE_VERSION) && TDE_VERSION >= TDE_MAKE_VERSION(3,3,0)
//We initialize the table after, after the initialization of the table
search - > setListView ( table ) ;
//Connect the pressed signal of the clear button to the clear slot of "clear"
connect ( clearSearch , TQ_SIGNAL ( pressed ( ) ) , search , TQ_SLOT ( clear ( ) ) ) ;
# endif
}
View : : ~ View ( ) {
# if defined(TDE_MAKE_VERSION) && (TDE_VERSION >= TDE_MAKE_VERSION(3,3,0))
delete clearSearch ;
delete search ;
@ -123,7 +114,6 @@ View::~View() {
delete searchFilter ;
delete filterBar ;
# endif
kdDebug ( ) < < " Destroying View " < < endl ;
}
@ -154,13 +144,11 @@ bool View::isTooltipEnabled() {
}
void View : : toggleFilterBar ( ) {
# if defined(TDE_MAKE_VERSION) && TDE_VERSION >= TDE_MAKE_VERSION(3,3,0)
//The newly created bar is only displayed if the config file allow it
if ( KSystemLogConfig : : toggleFilterBar ( ) = = true )
filterBar - > show ( ) ;
else
filterBar - > hide ( ) ;
# endif
}
@ -244,7 +232,6 @@ void View::setLastItemSelected() {
}
void View : : updateSearchFilter ( ) {
# if defined(TDE_MAKE_VERSION) && TDE_VERSION >= TDE_MAKE_VERSION(3,3,0)
//We first delete all items
int count = searchFilter - > count ( ) - 1 ;
while ( count > = 0 ) {
@ -266,7 +253,6 @@ void View::updateSearchFilter() {
}
searchFilter - > setCurrentItem ( 0 ) ;
# endif
}
@ -361,7 +347,6 @@ void View::setSortEnabled(bool enabled) {
}
void View : : initSearchFilter ( TQWidget * filterBox ) {
# if defined(TDE_MAKE_VERSION) && TDE_VERSION >= TDE_MAKE_VERSION(3,3,0)
searchFilter = new TQComboBox ( filterBox ) ;
TQWhatsThis : : add ( searchFilter , i18n ( " <qt>Allows you to apply the item filter only on the specified column here. \" <i>All</i> \" column means no specific filter.</qt> " ) ) ;
@ -375,8 +360,6 @@ void View::initSearchFilter(TQWidget* filterBox) {
connect ( searchFilter , TQ_SIGNAL ( activated ( int ) ) , search , TQ_SLOT ( setFocus ( ) ) ) ;
connect ( searchFilter , TQ_SIGNAL ( activated ( int ) ) , this , TQ_SLOT ( changeColumnFilter ( int ) ) ) ;
connect ( searchFilter , TQ_SIGNAL ( activated ( int ) ) , search , TQ_SLOT ( updateSearch ( ) ) ) ;
# endif
}
@ -403,7 +386,6 @@ TDEListView* View::getLogList() {
void View : : changeColumnFilter ( int column ) {
# if defined(TDE_MAKE_VERSION) && TDE_VERSION >= TDE_MAKE_VERSION(3,3,0)
TQValueList < int > filterColumns ;
//The user select all columns
@ -430,7 +412,6 @@ void View::changeColumnFilter(int column) {
}
//search->updateSearch();
# endif
}