summaryrefslogtreecommitdiffstats
path: root/adept/libadept/packagedetails.h
blob: 5951928e37cfa77f95e3688f2022d14d1379fcd6 (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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
/* -*- C++ -*- adept/packagedetails.h
   written by Peter Rockai <me@mornfall.net> */

#include <apt-front/cache/entity/package.h>
#include <adept/packagedetailsui.h>
#include <adept/lister.h>

#include <tqmutex.h>
#include <tqguardedptr.h>

#ifndef EPT_PACKGEDETAILS_H
#define EPT_PACKGEDETAILS_H

class TDEToolBarButton;
class TQThread;

namespace adept {

using namespace aptFront;

class PackageDetails : public PackageDetailsUi, public Lister::RangeProvider,
                       public cache::Observer
{
    Q_OBJECT
  
public:
    enum ButtonID { BForward, BBack, BShow };
    PackageDetails( TQWidget *p = 0, const char *n = 0 );
    void setPackage( cache::entity::Package );
    void setHasForward( bool );
    void setHasBack( bool );
    virtual Lister::Range listerRange();
    void notifyPostChange( cache::component::Base * );
    void notifyPreRebuild( cache::component::Base * );
    void notifyPostRebuild( cache::component::Base * );
signals:
    void showList();
    void back();
    void forward();
    void detailsRequested( Lister::Entity );
protected slots:
    void loadFileList();
    void updateLogical();
protected:
    void loadFileListWorker();
    cache::entity::StablePackage m_package;
    TQMutex m_qtMutex;
    TQThread *m_thread;
    TQGuardedPtr< EntityActor > m_logicalAct, m_removeAct;
    int m_fileListRunning;

};

}

#endif