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

38 lines
1.0 KiB

#include <cstddef>
#include <apt-front/predicate/combinators.h>
#include <apt-front/predicate/factory.h>
#include <tdelocale.h>
#include <klineedit.h>
#include "filterwidget.h"
using namespace aptFront;
using namespace adept;
void FilterWidget::connectLister( Lister *l ) {
connect( this, TQT_SIGNAL( drop( ListerPredicate ) ),
l, TQT_SLOT( interactiveDrop( ListerPredicate ) ) );
connect( this, TQT_SIGNAL( changed( ListerPredicate ) ),
l, TQT_SLOT( interactiveAnd( ListerPredicate ) ) );
connect( this, TQT_SIGNAL( apply( ListerPredicate ) ),
l, TQT_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();
}