Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 3443 → Rev 3444

/branches/Version13x/Scribus/scribus/dynamictip.cpp
22,18 → 22,18
{
colorList = pale;
listB = parent;
kind = 0;
kind = ColorListBox;
}
 
DynamicTip::DynamicTip( QTable* parent ) : QToolTip( parent->viewport() )
{
table = parent;
kind = 1;
kind = Table;
}
 
void DynamicTip::maybeTip( const QPoint &pos )
{
if (kind == 0)
if (kind == ColorListBox)
{
QListBoxItem* it = listB->itemAt(pos);
if (it != 0)
46,13 → 46,13
{
int c, m, y, k;
col.getCMYK(&c, &m, &y, &k);
tipText = QString("C = %1% M = %2% Y = %3% K = %4%").arg(qRound(c / 2.55)).arg(qRound(m / 2.55)).arg(qRound(y / 2.55)).arg(qRound(k / 2.55));
tipText = QString("C:%1% M:%2% Y:%3% K:%4%").arg(qRound(c / 2.55)).arg(qRound(m / 2.55)).arg(qRound(y / 2.55)).arg(qRound(k / 2.55));
}
else
{
int r, g, b;
col.getRawRGBColor(&r, &g, &b);
tipText = QString("R = %1 G = %2 B = %3").arg(r).arg(g).arg(b);
tipText = QString("R:%1 G:%2 B:%3").arg(r).arg(g).arg(b);
}
tip(listB->itemRect(it), tipText);
}
/branches/Version13x/Scribus/scribus/dynamictip.h
27,14 → 27,19
class SCRIBUS_API DynamicTip : public QToolTip
{
public:
enum TipType {
ColorListBox,
Table
};
 
DynamicTip( QListBox* parent, ColorList* pale );
DynamicTip( QTable* parent );
protected:
void maybeTip( const QPoint & );
ColorList* colorList;
QListBox* listB;
QTable* table;
int kind;
protected:
void maybeTip( const QPoint & );
TipType kind;
};
 
#endif