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/libadept/groupeddesktopselector.h

41 lines
1.1 KiB

/** -*- C++ -*-
@file adept/groupeddestkopselector.h
@author Peter Rockai <me@mornfall.net>
*/
#include <kjanuswidget.h>
#include <apt-front/cache/entity/desktop.h>
namespace adept {
using namespace aptFront;
using namespace aptFront::cache;
// XXX needs fixing
class GroupedDesktopSelector : public KJanusWidget, cache::Observer
{
Q_OBJECT
public:
struct IconPolicy {
virtual TQString iconForGroup( TQString group ) { return group; }
};
GroupedDesktopSelector( TQWidget *p = 0, const char *n = 0 );
void fill( component::Desktop::EntityRange r );
void setPolicy( IconPolicy *p ) { m_policy = p; }
IconPolicy *policy() { return m_policy; }
virtual void notifyPreRebuild( cache::component::Base * );
virtual void notifyPostRebuild( cache::component::Base * );
public slots:
void clear();
void fill();
signals:
void request( cache::entity::Package, cache::component::State::Action );
void showDescription( cache::entity::Desktop );
protected:
IconPolicy *m_policy;
std::vector< TQWidget * > m_pages;
// IconPolicy m_defaultPolicy;
};
}