Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 44607
Collapse All | Expand All

(-)klickety/piece.cpp (+6 lines)
Lines 9-14 const char *KLPieceInfo::DEFAULT_COLORS[ Link Here
9
    "#C86464", "#64C864", "#6464C8", "#C8C864", "#C864C8"
9
    "#C86464", "#64C864", "#6464C8", "#C8C864", "#C864C8"
10
};
10
};
11
11
12
QColor KLPieceInfo::defaultColor(uint i) const
13
{
14
  if ( i>=nbColors() ) return QColor();
15
  return QColor(DEFAULT_COLORS[i]);
16
}
17
12
QString KLPieceInfo::colorLabel(uint i) const
18
QString KLPieceInfo::colorLabel(uint i) const
13
{
19
{
14
    return i18n("Color #%1:").arg(i+1);
20
    return i18n("Color #%1:").arg(i+1);
(-)klickety/piece.h (-2 / +1 lines)
Lines 25-32 class KLPieceInfo : public GPieceInfo Link Here
25
25
26
    virtual uint nbColors() const             { return NB_BLOCK_TYPES; }
26
    virtual uint nbColors() const             { return NB_BLOCK_TYPES; }
27
    virtual QString colorLabel(uint i) const;
27
    virtual QString colorLabel(uint i) const;
28
    virtual QColor defaultColor(uint i) const
28
    virtual QColor defaultColor(uint i) const;
29
        { return QColor(DEFAULT_COLORS[i]); }
30
29
31
 protected:
30
 protected:
32
    void draw(QPixmap *, uint blockType, uint blockMode,
31
    void draw(QPixmap *, uint blockType, uint blockMode,
(-)ksirtet/ksirtet/piece.cpp (+5 lines)
Lines 54-59 const char *KSPieceInfo::DEFAULT_COLORS[ Link Here
54
    "#C8C8C8"
54
    "#C8C8C8"
55
};
55
};
56
56
57
QColor KSPieceInfo::defaultColor(uint i) const
58
{
59
  if ( i>=nbColors() ) return QColor();
60
  return QColor(DEFAULT_COLORS[i]);
61
}
57
62
58
void KSPieceInfo::draw(QPixmap *pixmap, uint blockType, uint,
63
void KSPieceInfo::draw(QPixmap *pixmap, uint blockType, uint,
59
                       bool lighted) const
64
                       bool lighted) const
(-)ksirtet/ksirtet/piece.h (-2 / +1 lines)
Lines 32-39 class KSPieceInfo : public GPieceInfo Link Here
32
32
33
    virtual uint nbColors() const { return NB_FORMS + 1; }
33
    virtual uint nbColors() const { return NB_FORMS + 1; }
34
    virtual QString colorLabel(uint i) const { return i18n(COLOR_LABELS[i]); }
34
    virtual QString colorLabel(uint i) const { return i18n(COLOR_LABELS[i]); }
35
    virtual QColor defaultColor(uint i) const
35
    virtual QColor defaultColor(uint i) const;
36
        { return QColor(DEFAULT_COLORS[i]); }
37
36
38
 private:
37
 private:
39
    virtual void draw(QPixmap *, uint blockType, uint blockMode,
38
    virtual void draw(QPixmap *, uint blockType, uint blockMode,
(-)kfouleggs/piece.cpp (+6 lines)
Lines 19-24 const char *FEPieceInfo::DEFAULT_COLORS[ Link Here
19
    "#64C864", "#64C8C8", "#C86464", "#C864C8", "#C8C8C8"
19
    "#64C864", "#64C8C8", "#C86464", "#C864C8", "#C8C8C8"
20
};
20
};
21
21
22
QColor FEPieceInfo::defaultColor(uint i) const
23
{ 
24
  if ( i>=nbColors() ) return QColor();
25
  return QColor(DEFAULT_COLORS[i]);
26
}
27
22
QString FEPieceInfo::colorLabel(uint i) const
28
QString FEPieceInfo::colorLabel(uint i) const
23
{
29
{
24
    return (i==NB_NORM_BLOCK_TYPES ? i18n("Garbage color:")
30
    return (i==NB_NORM_BLOCK_TYPES ? i18n("Garbage color:")
(-)kfouleggs/piece.h (-2 / +1 lines)
Lines 28-35 class FEPieceInfo : public GPieceInfo Link Here
28
28
29
    virtual uint nbColors() const { return NB_NORM_BLOCK_TYPES + 1; }
29
    virtual uint nbColors() const { return NB_NORM_BLOCK_TYPES + 1; }
30
    virtual QString colorLabel(uint i) const;
30
    virtual QString colorLabel(uint i) const;
31
    virtual QColor defaultColor(uint i) const
31
    virtual QColor defaultColor(uint i) const;
32
        { return QColor(DEFAULT_COLORS[i]); }
33
32
34
 private:
33
 private:
35
    void draw(QPixmap *, uint blockType, uint blockMode, bool lighted) const;
34
    void draw(QPixmap *, uint blockType, uint blockMode, bool lighted) const;

Return to bug 44607