blob: a54f7aa85c324416f2f79fc496eeb00dee14f7c8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
/** -*- C++ -*-
@file adept/groupeddestkopselector.h
@author Peter Rockai <[email protected]>
*/
#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 QString iconForGroup( QString group ) { return group; }
};
GroupedDesktopSelector( QWidget *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< QWidget * > m_pages;
// IconPolicy m_defaultPolicy;
};
}
|