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.
50 lines
1.2 KiB
50 lines
1.2 KiB
15 years ago
|
/* -*- C++ -*- adept/packageinfo.h
|
||
|
written by Peter Rockai <me@mornfall.net> */
|
||
|
|
||
|
#include <apt-front/cache/entity/package.h>
|
||
|
#include <apt-front/cache/cache.h>
|
||
|
#include <adept/packageinfoui.h>
|
||
|
|
||
|
#ifndef EPT_PACKAGEINFO_H
|
||
|
#define EPT_PACKAGEINFO_H
|
||
|
|
||
|
namespace adept {
|
||
|
|
||
|
using namespace aptFront;
|
||
|
|
||
|
class PackageInfo : public PackageInfoUi, public cache::Observer
|
||
|
{
|
||
|
Q_OBJECT
|
||
|
public:
|
||
|
PackageInfo( QWidget *p, const char *n = 0 );
|
||
|
public slots:
|
||
|
void setVersion( cache::entity::Version v, bool = true );
|
||
|
void setPackage( cache::entity::Package v );
|
||
|
void adjustFontSize( int );
|
||
|
public:
|
||
|
void notifyPostChange( cache::component::Base * );
|
||
|
void notifyPostRebuild( cache::component::Base * );
|
||
|
void hideStatus();
|
||
|
protected:
|
||
|
cache::entity::StableVersion m_version;
|
||
|
bool m_specificVersion;
|
||
|
};
|
||
|
|
||
|
inline QString labelFormat( const QString &what,
|
||
|
const QString &txt, bool nobr = true )
|
||
|
{
|
||
|
QString ret = "<b><nobr>" + what + "</nobr></b> " + (nobr ? "<nobr>" : "")
|
||
|
+ txt + (nobr ? "</nobr>" : "");
|
||
|
return ret;
|
||
|
}
|
||
|
|
||
|
QColor actionColor( cache::entity::Package p );
|
||
|
QColor statusColor( cache::entity::Package p );
|
||
|
|
||
|
QString formatLongDescription( QString in );
|
||
|
QString colorify( QColor c, QString s );
|
||
|
|
||
|
}
|
||
|
|
||
|
#endif
|