summaryrefslogtreecommitdiffstats
path: root/tdm/kfrontend/themer
diff options
context:
space:
mode:
Diffstat (limited to 'tdm/kfrontend/themer')
-rw-r--r--tdm/kfrontend/themer/tdmitem.cpp21
-rw-r--r--tdm/kfrontend/themer/tdmitem.h1
-rw-r--r--tdm/kfrontend/themer/tdmlabel.h6
-rw-r--r--tdm/kfrontend/themer/tdmthemer.cpp6
-rw-r--r--tdm/kfrontend/themer/tdmthemer.h1
5 files changed, 27 insertions, 8 deletions
diff --git a/tdm/kfrontend/themer/tdmitem.cpp b/tdm/kfrontend/themer/tdmitem.cpp
index f5eabdb56..26a4887c1 100644
--- a/tdm/kfrontend/themer/tdmitem.cpp
+++ b/tdm/kfrontend/themer/tdmitem.cpp
@@ -204,6 +204,22 @@ KdmItem::findNode( const TQString &_id ) const
return 0;
}
+KdmItem *
+KdmItem::findNodeByType( const TQString &_type ) const
+{
+ if (itemType == _type)
+ return const_cast<KdmItem *>( this );
+
+ TQValueList<KdmItem *>::ConstIterator it;
+ for (it = m_children.begin(); it != m_children.end(); ++it) {
+ KdmItem *t = (*it)->findNodeByType( _type );
+ if (t)
+ return t;
+ }
+
+ return 0;
+}
+
void
KdmItem::setWidget( TQWidget *widget )
{
@@ -336,11 +352,6 @@ KdmItem::paint( TQPainter *p, const TQRect &rect )
else {
// We have compositing support!
TQRgb blend_color = tqRgba(m_backgroundModifier, m_backgroundModifier, m_backgroundModifier, 0); // RGBA overlay
- float alpha = tqAlpha(blend_color) / 255.;
- int pixel = tqAlpha(blend_color) << 24 |
- int(tqRed(blend_color) * alpha) << 16 |
- int(tqGreen(blend_color) * alpha) << 8 |
- int(tqBlue(blend_color) * alpha);
TQImage img( myWidget->size(), 32 );
img = img.convertDepth(32);
diff --git a/tdm/kfrontend/themer/tdmitem.h b/tdm/kfrontend/themer/tdmitem.h
index be7fa65d3..d2aeed69c 100644
--- a/tdm/kfrontend/themer/tdmitem.h
+++ b/tdm/kfrontend/themer/tdmitem.h
@@ -152,6 +152,7 @@ public:
}
KdmItem *findNode( const TQString &id ) const;
+ KdmItem *findNodeByType( const TQString &type ) const;
virtual void setWidget( TQWidget *widget );
TQWidget *widget() const { return myWidget; }
virtual void setLayoutItem( TQLayoutItem *item );
diff --git a/tdm/kfrontend/themer/tdmlabel.h b/tdm/kfrontend/themer/tdmlabel.h
index 8b955fca5..e45d68091 100644
--- a/tdm/kfrontend/themer/tdmlabel.h
+++ b/tdm/kfrontend/themer/tdmlabel.h
@@ -40,6 +40,9 @@ public:
KdmLabel( KdmItem *parent, const TQDomNode &node, const char *name = 0 );
void setText( const TQString &txt );
+ /* Method to lookup the caption associated with an item */
+ TQString lookupStock( const TQString &stock );
+
protected:
// reimplemented; returns the minimum size of rendered text
virtual TQSize sizeHint();
@@ -71,9 +74,6 @@ public slots:
void slotAccel();
private:
- /* Method to lookup the caption associated with an item */
- TQString lookupStock( const TQString &stock );
-
/* Lookup variables in the text */
TQString lookupText( const TQString &t );
diff --git a/tdm/kfrontend/themer/tdmthemer.cpp b/tdm/kfrontend/themer/tdmthemer.cpp
index d6d051cf8..6c27b7629 100644
--- a/tdm/kfrontend/themer/tdmthemer.cpp
+++ b/tdm/kfrontend/themer/tdmthemer.cpp
@@ -117,6 +117,12 @@ KdmThemer::findNode( const TQString &item ) const
return rootItem->findNode( item );
}
+KdmItem *
+KdmThemer::findNodeByType( const TQString &item ) const
+{
+ return rootItem->findNodeByType( item );
+}
+
void
KdmThemer::updateGeometry( bool force )
{
diff --git a/tdm/kfrontend/themer/tdmthemer.h b/tdm/kfrontend/themer/tdmthemer.h
index 2b8865b4d..785a116da 100644
--- a/tdm/kfrontend/themer/tdmthemer.h
+++ b/tdm/kfrontend/themer/tdmthemer.h
@@ -72,6 +72,7 @@ public:
virtual // just to put the reference in the vmt
KdmItem *findNode( const TQString & ) const;
+ KdmItem *findNodeByType( const TQString & ) const;
void updateGeometry( bool force ); // force = true for external calls