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 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79
|
//=======================================================================
// pkg.h
//-----------------------------------------------------------------------
// This file is part of the package paco
// Copyright (C) 2004-2009 David Rosal
// For more information visit http://paco.sourceforge.net
//=======================================================================
#ifndef GPACO_PKG_H
#define GPACO_PKG_H
#include "paco/basepkg.h"
#include <glibmm/ustring.h>
#include <glibmm/refptr.h>
namespace Gdk
{
class Pixbuf;
}
namespace Gpaco {
typedef Paco::File File;
class PkgWindow;
enum {
TAB_FILES,
TAB_INFO,
TAB_REMOVE,
TAB_PACKAGE,
N_TABS
};
class Pkg : public Paco::BasePkg
{
public:
Pkg(Glib::ustring const&);
virtual ~Pkg();
float sizePercent() const { return mSizePercent; }
float filesPercent() const { return mFilesPercent; }
Glib::RefPtr<Gdk::Pixbuf> icon() const { return mpIcon; }
Glib::ustring const& summary() const { return mSummary; }
PkgWindow const* window() const { return mpWindow; }
PkgWindow* window() { return mpWindow; }
bool changed() const { return mChanged; }
void changed(bool set) { mChanged = set; }
bool listFilesInst() const { return mFileType & INSTALLED_FILES; }
bool listFilesMiss() const { return mFileType & MISSING_FILES; }
void switchListFilesInst() { mFileType ^= INSTALLED_FILES; }
void switchListFilesMiss() { mFileType ^= MISSING_FILES; }
void readLog();
void presentWindow(int);
void deleteWindow();
bool update(bool = true);
private:
float mSizePercent;
float mFilesPercent;
Glib::RefPtr<Gdk::Pixbuf> mpIcon;
Glib::ustring mSummary;
PkgWindow* mpWindow;
int mFileType;
bool mChanged;
void getIcon(Glib::ustring const& path);
};
} // namespace Gpaco
#endif // GPACO_PKG_H
|