diff options
Diffstat (limited to 'src/filteritem.cpp')
-rw-r--r-- | src/filteritem.cpp | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/src/filteritem.cpp b/src/filteritem.cpp new file mode 100644 index 0000000..68f5eaf --- /dev/null +++ b/src/filteritem.cpp @@ -0,0 +1,36 @@ +/*************************************************************************** + copyright : (C) 2005-2006 by Robby Stephenson + email : [email protected] + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of version 2 of the GNU General Public License as * + * published by the Free Software Foundation; * + * * + ***************************************************************************/ + +#include "filteritem.h" +#include "tellico_kernel.h" + +#include <kiconloader.h> + +#include <qpixmap.h> + +using Tellico::FilterItem; + +FilterItem::FilterItem(GUI::ListView* parent_, Filter::Ptr filter_) + : GUI::CountedItem(parent_), m_filter(filter_) { + setText(0, filter_->name()); + setPixmap(0, SmallIcon(QString::fromLatin1("filter"))); +} + +void FilterItem::updateFilter(Filter::Ptr filter_) { + m_filter = filter_; + setText(0, m_filter->name()); +} + +void FilterItem::doubleClicked() { + Kernel::self()->modifyFilter(m_filter); +} |