You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
adept/adept/adept/filterwidget.cpp

37 lines
982 B

#include <apt-front/predicate/combinators.h>
#include <apt-front/predicate/factory.h>
#include <klocale.h>
#include <klineedit.h>
#include "filterwidget.h"
using namespace aptFront;
using namespace adept;
void FilterWidget::connectLister( Lister *l ) {
connect( this, SIGNAL( drop( ListerPredicate ) ),
l, SLOT( interactiveDrop( ListerPredicate ) ) );
connect( this, SIGNAL( changed( ListerPredicate ) ),
l, SLOT( interactiveAnd( ListerPredicate ) ) );
connect( this, SIGNAL( apply( ListerPredicate ) ),
l, SLOT( baseAnd( ListerPredicate ) ) );
}
void FilterWidget::changedInternal() {
setEnabled( false );
emit drop( m_old );
emit changed( m_old = predicate() );
setEnabled( true );
setFocus();
}
void FilterWidget::applyInternal() {
// check for emptiness?
setEnabled( false );
emit drop( m_old );
emit apply( m_old = predicate() );
reset();
setEnabled( true );
setFocus();
}