Darrell Anderson 12 years ago
commit 527beadab6

@ -109,7 +109,7 @@ bool dotNETstyle::inheritsKHTML(const TQWidget* w) const
}
}
void dotNETstyle::polish(TQStyleControlElementData ceData, ControlElementFlags elementFlags, void *ptr)
void dotNETstyle::polish(const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void *ptr)
{
if (ceData.widgetObjectTypes.contains(TQWIDGET_OBJECT_NAME_STRING)) {
TQWidget *widget = reinterpret_cast<TQWidget*>(ptr);
@ -149,7 +149,7 @@ void dotNETstyle::polish(TQStyleControlElementData ceData, ControlElementFlags e
}
}
void dotNETstyle::unPolish(TQStyleControlElementData ceData, ControlElementFlags elementFlags, void *ptr)
void dotNETstyle::unPolish(const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void *ptr)
{
winstyle->unPolish(ceData, elementFlags, ptr);
@ -378,7 +378,7 @@ void dotNETstyle::renderPanel(TQPainter *p,
void dotNETstyle::drawKStylePrimitive(KStylePrimitive kpe,
TQPainter *p,
TQStyleControlElementData ceData,
const TQStyleControlElementData &ceData,
ControlElementFlags elementFlags,
const TQRect &r,
const TQColorGroup &cg,
@ -427,7 +427,7 @@ void dotNETstyle::drawKStylePrimitive(KStylePrimitive kpe,
// This function draws primitive elements as well as their masks.
void dotNETstyle::drawPrimitive(TQ_PrimitiveElement pe,
TQPainter *p,
TQStyleControlElementData ceData,
const TQStyleControlElementData &ceData,
ControlElementFlags elementFlags,
const TQRect &r,
const TQColorGroup &cg,
@ -799,7 +799,7 @@ void dotNETstyle::drawPrimitive(TQ_PrimitiveElement pe,
void dotNETstyle::drawControl(TQ_ControlElement element,
TQPainter *p,
TQStyleControlElementData ceData,
const TQStyleControlElementData &ceData,
ControlElementFlags elementFlags,
const TQRect &r,
const TQColorGroup &cg,
@ -1088,9 +1088,8 @@ void dotNETstyle::drawControl(TQ_ControlElement element,
}
case CE_PushButton: {
TQPushButton *button = (TQPushButton *)widget;
TQRect br = r;
bool btnDefault = button->isDefault();
bool btnDefault = (elementFlags & CEF_IsDefault);
static int di = pixelMetric(PM_ButtonDefaultIndicator, ceData, elementFlags);
br.addCoords(di, di, -di, -di);
@ -1406,7 +1405,7 @@ void dotNETstyle::drawControl(TQ_ControlElement element,
void dotNETstyle::drawControlMask(TQ_ControlElement element,
TQPainter *p,
TQStyleControlElementData ceData,
const TQStyleControlElementData &ceData,
ControlElementFlags elementFlags,
const TQRect &r,
const TQStyleOption &opt,
@ -1436,7 +1435,7 @@ void dotNETstyle::drawControlMask(TQ_ControlElement element,
void dotNETstyle::drawComplexControlMask(ComplexControl c,
TQPainter *p,
const TQStyleControlElementData ceData,
const TQStyleControlElementData &ceData,
const ControlElementFlags elementFlags,
const TQRect &r,
const TQStyleOption &o,
@ -1465,7 +1464,7 @@ void dotNETstyle::drawComplexControlMask(ComplexControl c,
void dotNETstyle::drawComplexControl(ComplexControl control,
TQPainter *p,
TQStyleControlElementData ceData,
const TQStyleControlElementData &ceData,
ControlElementFlags elementFlags,
const TQRect &r,
const TQColorGroup &cg,
@ -1581,8 +1580,6 @@ void dotNETstyle::drawComplexControl(ComplexControl control,
// TOOLBUTTON
// ----------
case CC_ToolButton: {
const TQToolButton *tb = (const TQToolButton *) widget;
TQRect button, menuarea;
button = querySubControlMetrics(control, ceData, elementFlags, SC_ToolButton, opt, widget);
menuarea = querySubControlMetrics(control, ceData, elementFlags, SC_ToolButtonMenu, opt, widget);
@ -1600,11 +1597,9 @@ void dotNETstyle::drawComplexControl(ComplexControl control,
// If we're pressed, on, or raised...
if (bflags & (Style_Down | Style_On | Style_Raised)) {
drawPrimitive(PE_ButtonTool, p, ceData, elementFlags, button, cg, bflags, opt);
} else if (tb->parentWidget() &&
tb->parentWidget()->backgroundPixmap() &&
!tb->parentWidget()->backgroundPixmap()->isNull()) {
TQPixmap pixmap = *(tb->parentWidget()->backgroundPixmap());
p->drawTiledPixmap( r, pixmap, tb->pos() );
} else if (!ceData.parentWidgetData.bgPixmap.isNull()) {
TQPixmap pixmap = ceData.parentWidgetData.bgPixmap;
p->drawTiledPixmap( r, pixmap, ceData.pos );
}
}
@ -1616,8 +1611,8 @@ void dotNETstyle::drawComplexControl(ComplexControl control,
drawPrimitive(PE_ArrowDown, p, ceData, elementFlags, menuarea, cg, mflags, opt);
}
if (tb->hasFocus() && !tb->focusProxy()) {
TQRect fr = tb->rect();
if ((elementFlags & CEF_HasFocus) && !(elementFlags & CEF_HasFocusProxy)) {
TQRect fr = ceData.rect;
fr.addCoords(2, 2, -2, -2);
drawPrimitive(PE_FocusRect, p, ceData, elementFlags, fr, cg);
}
@ -1723,7 +1718,7 @@ void dotNETstyle::drawComplexControl(ComplexControl control,
}
TQRect dotNETstyle::subRect(SubRect r, const TQStyleControlElementData ceData, const ControlElementFlags elementFlags, const TQWidget *widget) const
TQRect dotNETstyle::subRect(SubRect r, const TQStyleControlElementData &ceData, const ControlElementFlags elementFlags, const TQWidget *widget) const
{
// Don't use KStyles progressbar subrect
switch (r) {
@ -1751,7 +1746,7 @@ TQRect dotNETstyle::subRect(SubRect r, const TQStyleControlElementData ceData, c
}
TQRect dotNETstyle::querySubControlMetrics(ComplexControl control,
TQStyleControlElementData ceData,
const TQStyleControlElementData &ceData,
ControlElementFlags elementFlags,
SubControl subcontrol,
const TQStyleOption &opt,
@ -1809,7 +1804,7 @@ TQRect dotNETstyle::querySubControlMetrics(ComplexControl control,
return KStyle::querySubControlMetrics(control, ceData, elementFlags, subcontrol, opt, widget);
}
int dotNETstyle::pixelMetric(PixelMetric m, TQStyleControlElementData ceData, ControlElementFlags elementFlags, const TQWidget *widget) const
int dotNETstyle::pixelMetric(PixelMetric m, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, const TQWidget *widget) const
{
switch(m) {
// TABS
@ -1912,7 +1907,7 @@ int dotNETstyle::pixelMetric(PixelMetric m, TQStyleControlElementData ceData, Co
TQSize dotNETstyle::sizeFromContents(ContentsType t,
TQStyleControlElementData ceData,
const TQStyleControlElementData &ceData,
ControlElementFlags elementFlags,
const TQSize &s,
const TQStyleOption &opt,
@ -2070,7 +2065,7 @@ void dotNETstyle::slotDestroyed()
m_widgets.remove( (TQWidget*) sender() );
}
bool dotNETstyle::objectEventHandler( TQStyleControlElementData ceData, ControlElementFlags, void* source, TQEvent *ev )
bool dotNETstyle::objectEventHandler( const TQStyleControlElementData &ceData, ControlElementFlags, void* source, TQEvent *ev )
{
if (ceData.widgetObjectTypes.contains(TQOBJECT_OBJECT_NAME_STRING)) {
TQObject* obj = reinterpret_cast<TQObject*>(source);
@ -2107,7 +2102,7 @@ bool dotNETstyle::objectEventHandler( TQStyleControlElementData ceData, ControlE
return false;
}
int dotNETstyle::styleHint(StyleHint sh, TQStyleControlElementData ceData, ControlElementFlags elementFlags, const TQStyleOption &opt, TQStyleHintReturn *returnData, const TQWidget *w) const
int dotNETstyle::styleHint(StyleHint sh, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, const TQStyleOption &opt, TQStyleHintReturn *returnData, const TQWidget *w) const
{
int ret;

@ -42,14 +42,14 @@ public:
virtual ~dotNETstyle();
bool inheritsKHTML( const TQWidget* widget ) const;
void polish( TQStyleControlElementData ceData, ControlElementFlags elementFlags, void * );
void unPolish( TQStyleControlElementData ceData, ControlElementFlags elementFlags, void * );
void polish( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void * );
void unPolish( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void * );
void renderMenuBlendPixmap( KPixmap&, const TQColorGroup&, const TQPopupMenu * ) const;
void drawKStylePrimitive( KStylePrimitive kpe,
TQPainter* p,
TQStyleControlElementData ceData,
const TQStyleControlElementData &ceData,
ControlElementFlags elementFlags,
const TQRect &r,
const TQColorGroup &cg,
@ -59,7 +59,7 @@ public:
void drawPrimitive( TQ_PrimitiveElement pe,
TQPainter *p,
TQStyleControlElementData ceData,
const TQStyleControlElementData &ceData,
ControlElementFlags elementFlags,
const TQRect &r,
const TQColorGroup &cg,
@ -68,7 +68,7 @@ public:
void drawControl( TQ_ControlElement element,
TQPainter *p,
TQStyleControlElementData ceData,
const TQStyleControlElementData &ceData,
ControlElementFlags elementFlags,
const TQRect &r,
const TQColorGroup &cg,
@ -76,11 +76,11 @@ public:
const TQStyleOption& = TQStyleOption::Default,
const TQWidget *widget = 0 ) const;
void drawControlMask( TQ_ControlElement, TQPainter *, TQStyleControlElementData ceData, ControlElementFlags elementFlags, const TQRect &, const TQStyleOption &, const TQWidget * = 0) const;
void drawControlMask( TQ_ControlElement, TQPainter *, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, const TQRect &, const TQStyleOption &, const TQWidget * = 0) const;
void drawComplexControl( ComplexControl control,
TQPainter *p,
TQStyleControlElementData ceData,
const TQStyleControlElementData &ceData,
ControlElementFlags elementFlags,
const TQRect &r,
const TQColorGroup &cg,
@ -90,14 +90,14 @@ public:
const TQStyleOption& = TQStyleOption::Default,
const TQWidget *widget = 0 ) const;
int pixelMetric( PixelMetric m, TQStyleControlElementData ceData, ControlElementFlags elementFlags,
int pixelMetric( PixelMetric m, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags,
const TQWidget *widget = 0 ) const;
TQRect subRect( SubRect r, const TQStyleControlElementData ceData, const ControlElementFlags elementFlags,
TQRect subRect( SubRect r, const TQStyleControlElementData &ceData, const ControlElementFlags elementFlags,
const TQWidget *widget = 0 ) const;
TQRect querySubControlMetrics( ComplexControl control,
TQStyleControlElementData ceData,
const TQStyleControlElementData &ceData,
ControlElementFlags elementFlags,
SubControl subcontrol,
const TQStyleOption &opt = TQStyleOption::Default,
@ -105,20 +105,20 @@ public:
void drawComplexControlMask(TQStyle::ComplexControl c,
TQPainter *p,
const TQStyleControlElementData ceData,
const TQStyleControlElementData &ceData,
const ControlElementFlags elementFlags,
const TQRect &r,
const TQStyleOption &o=TQStyleOption::Default,
const TQWidget *w = 0) const;
TQSize sizeFromContents(TQStyle::ContentsType t,
TQStyleControlElementData ceData,
const TQStyleControlElementData &ceData,
ControlElementFlags elementFlags,
const TQSize &s,
const TQStyleOption &o,
const TQWidget *w = 0) const;
int styleHint(TQ_StyleHint, TQStyleControlElementData ceData, ControlElementFlags elementFlags,
int styleHint(TQ_StyleHint, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags,
const TQStyleOption & = TQStyleOption::Default,
TQStyleHintReturn * = 0, const TQWidget * = 0 ) const;
@ -139,7 +139,7 @@ protected:
const TQRect &r,
const TQColorGroup &g) const;
bool objectEventHandler( TQStyleControlElementData ceData, ControlElementFlags elementFlags, void* source, TQEvent *e );
bool objectEventHandler( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void* source, TQEvent *e );
void updatePalette( TQComboBox * );
void updatePalette( TQToolBar * );

@ -136,7 +136,7 @@ PhaseStyle::~PhaseStyle()
// --------
// Initialize application specific
void PhaseStyle::applicationPolish(TQStyleControlElementData ceData, ControlElementFlags, void *ptr)
void PhaseStyle::applicationPolish(const TQStyleControlElementData &ceData, ControlElementFlags, void *ptr)
{
if (ceData.widgetObjectTypes.contains(TQAPPLICATION_OBJECT_NAME_STRING)) {
TQApplication *app = reinterpret_cast<TQApplication*>(ptr);
@ -149,7 +149,7 @@ void PhaseStyle::applicationPolish(TQStyleControlElementData ceData, ControlElem
// --------
// Initialize the appearance of a widget
void PhaseStyle::polish(TQStyleControlElementData ceData, ControlElementFlags elementFlags, void *ptr)
void PhaseStyle::polish(const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void *ptr)
{
if (ceData.widgetObjectTypes.contains(TQWIDGET_OBJECT_NAME_STRING)) {
TQWidget *widget = reinterpret_cast<TQWidget*>(ptr);
@ -211,7 +211,7 @@ void PhaseStyle::polish(TQPalette &pal)
// ----------
// Undo the initialization of a widget's appearance
void PhaseStyle::unPolish(TQStyleControlElementData ceData, ControlElementFlags elementFlags, void *ptr)
void PhaseStyle::unPolish(const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void *ptr)
{
if (ceData.widgetObjectTypes.contains(TQWIDGET_OBJECT_NAME_STRING)) {
TQWidget *widget = reinterpret_cast<TQWidget*>(ptr);
@ -412,7 +412,7 @@ void PhaseStyle::drawPhasePanel(TQPainter *painter,
void PhaseStyle::drawPhaseTab(TQPainter *painter,
int x, int y, int w, int h,
const TQColorGroup &group,
TQStyleControlElementData ceData,
const TQStyleControlElementData &ceData,
ControlElementFlags /*elementFlags*/,
const TQStyleOption &option,
SFlags flags) const
@ -578,7 +578,7 @@ void PhaseStyle::drawPhaseTab(TQPainter *painter,
void PhaseStyle::drawPrimitive(TQ_PrimitiveElement element,
TQPainter *painter,
TQStyleControlElementData ceData,
const TQStyleControlElementData &ceData,
ControlElementFlags elementFlags,
const TQRect &rect,
const TQColorGroup &group,
@ -1036,7 +1036,7 @@ void PhaseStyle::drawPrimitive(TQ_PrimitiveElement element,
void PhaseStyle::drawKStylePrimitive(KStylePrimitive element,
TQPainter *painter,
TQStyleControlElementData ceData,
const TQStyleControlElementData &ceData,
ControlElementFlags elementFlags,
const TQRect &rect,
const TQColorGroup &group,
@ -1155,7 +1155,7 @@ void PhaseStyle::drawKStylePrimitive(KStylePrimitive element,
void PhaseStyle::drawControl(TQ_ControlElement element,
TQPainter *painter,
TQStyleControlElementData ceData,
const TQStyleControlElementData &ceData,
ControlElementFlags elementFlags,
const TQRect &rect,
const TQColorGroup &group,
@ -1599,7 +1599,7 @@ void PhaseStyle::drawControl(TQ_ControlElement element,
void PhaseStyle::drawControlMask(TQ_ControlElement element,
TQPainter *painter,
TQStyleControlElementData ceData,
const TQStyleControlElementData &ceData,
ControlElementFlags elementFlags,
const TQRect &rect,
const TQStyleOption &option,
@ -1623,7 +1623,7 @@ void PhaseStyle::drawControlMask(TQ_ControlElement element,
void PhaseStyle::drawComplexControl(TQ_ComplexControl control,
TQPainter *painter,
TQStyleControlElementData ceData,
const TQStyleControlElementData &ceData,
ControlElementFlags elementFlags,
const TQRect &rect,
const TQColorGroup &group,
@ -1643,13 +1643,6 @@ void PhaseStyle::drawComplexControl(TQ_ComplexControl control,
switch (control) {
case CC_ComboBox: {
const TQComboBox * combo = ::tqqt_cast<const TQComboBox*>(widget);
if (!combo) {
KStyle::drawComplexControl(control, painter, ceData, elementFlags, rect, group,
flags, controls, active, option, widget);
return;
}
sunken = (active == SC_ComboBoxArrow);
drawPhaseButton(painter, x, y, w, h, group,
(flags & Style_MouseOver)
@ -1669,7 +1662,7 @@ void PhaseStyle::drawComplexControl(TQ_ComplexControl control,
}
if (controls & SC_ComboBoxEditField) { // draw edit box
if (combo->editable()) { // editable box
if (elementFlags & CEF_IsEditable) { // editable box
subrect = visualRect(querySubControlMetrics(CC_ComboBox,
ceData, elementFlags, SC_ComboBoxEditField, TQStyleOption::Default, widget), ceData, elementFlags);
x2 = subrect.right(); y2 = subrect.bottom();
@ -1679,9 +1672,9 @@ void PhaseStyle::drawComplexControl(TQ_ComplexControl control,
painter->drawLine(x2+2, y, x2+2, y2-1);
painter->setPen(group.button());
painter->drawPoint(x2+2, y2);
} else if (combo->hasFocus()) { // non editable box
} else if (elementFlags & CEF_HasFocus) { // non editable box
subrect = visualRect(subRect(SR_ComboBoxFocusRect, ceData, elementFlags,
combo), ceData, elementFlags);
widget), ceData, elementFlags);
drawPrimitive(PE_FocusRect, painter, ceData, elementFlags, subrect, group,
Style_FocusAtBorder,
TQStyleOption(group.highlight()));
@ -1694,18 +1687,11 @@ void PhaseStyle::drawComplexControl(TQ_ComplexControl control,
case CC_ScrollBar: {
// always a three button scrollbar
const TQScrollBar *sb = ::tqqt_cast<const TQScrollBar*>(widget);
if (!sb) {
KStyle::drawComplexControl(control, painter, ceData, elementFlags, rect, group,
flags, controls, active, option, widget);
return;
}
TQRect srect;
bool horizontal = (sb->orientation() == Qt::Horizontal);
bool horizontal = (ceData.orientation == TQt::Horizontal);
SFlags scrollflags = (horizontal ? Style_Horizontal : Style_Default);
if (sb->minValue() == sb->maxValue()) scrollflags |= Style_Default;
if (ceData.minSteps == ceData.maxSteps) scrollflags |= Style_Default;
else scrollflags |= Style_Enabled;
// addline
@ -1765,7 +1751,7 @@ void PhaseStyle::drawComplexControl(TQ_ComplexControl control,
// slider
if (controls & SC_ScrollBarSlider) {
if (sb->minValue() == sb->maxValue()) {
if (ceData.minSteps == ceData.maxSteps) {
// maxed out
srect = querySubControlMetrics(control, ceData, elementFlags,
SC_ScrollBarGroove, option, widget);
@ -1780,7 +1766,7 @@ void PhaseStyle::drawComplexControl(TQ_ComplexControl control,
scrollflags | ((active == SC_ScrollBarSlider)
? Style_Down : Style_Default));
// focus
if (sb->hasFocus()) {
if (elementFlags & CEF_HasFocus) {
srect.addCoords(2, 2, -2, -2);
drawPrimitive(PE_FocusRect, painter, ceData, elementFlags, srect, group,
Style_Default);
@ -1852,11 +1838,6 @@ void PhaseStyle::drawComplexControl(TQ_ComplexControl control,
case CC_ToolButton: {
const TQToolButton *btn = ::tqqt_cast<const TQToolButton*>(widget);
if (!btn) {
KStyle::drawComplexControl(control, painter, ceData, elementFlags, rect, group,
flags, controls, active, option, widget);
return;
}
TQToolBar *toolbar;
bool horiz = true;
@ -1866,32 +1847,29 @@ void PhaseStyle::drawComplexControl(TQ_ComplexControl control,
y2 = rect.bottom();
// check for TQToolBar parent
if (btn->parent() && btn->parent()->inherits(TQTOOLBAR_OBJECT_NAME_STRING)) {
toolbar = ::tqqt_cast<TQToolBar*>(btn->parent());
if (toolbar) {
horiz = (toolbar->orientation() == Qt::Horizontal);
if (normal) { // draw background
if (flatToolbar(ceData, elementFlags, toolbar)) {
// toolbar not floating or in a TQMainWindow
painter->fillRect(rect, group.background());
if (ceData.parentWidgetData.widgetObjectTypes.contains(TQTOOLBAR_OBJECT_NAME_STRING)) {
toolbar = (btn)?::tqqt_cast<TQToolBar*>(btn->parent()):NULL;
horiz = (ceData.toolBarData.orientation == TQt::Horizontal);
if (normal) { // draw background
if (toolbar && flatToolbar(ceData, elementFlags, toolbar)) {
// toolbar not floating or in a TQMainWindow
painter->fillRect(rect, group.background());
} else {
drawPhaseGradient(painter, rect, group.background(),
!horiz, 0, 0,
ceData.parentWidgetData.rect.width()-3,
ceData.parentWidgetData.rect.height()-3, true);
painter->setPen(group.mid());
if (horiz) {
painter->drawLine(x, y2, x2, y2);
} else {
drawPhaseGradient(painter, rect, group.background(),
!horiz, 0, 0,
toolbar->width()-3,
toolbar->height()-3, true);
painter->setPen(group.mid());
if (horiz) {
painter->drawLine(x, y2, x2, y2);
} else {
painter->drawLine(x2, y, x2, y2);
}
painter->drawLine(x2, y, x2, y2);
}
}
}
}
// check for TQToolBarExtensionWidget parent
else if (btn->parent() &&
btn->parent()->inherits(TQTOOLBAREXTENSION)) {
else if (btn && ceData.parentWidgetData.widgetObjectTypes.contains(TQTOOLBAREXTENSION)) {
TQWidget *extension;
if ((extension = ::tqqt_cast<TQWidget*>(btn->parent()))) {
toolbar = ::tqqt_cast<TQToolBar*>(extension->parent());
@ -1906,11 +1884,10 @@ void PhaseStyle::drawComplexControl(TQ_ComplexControl control,
}
}
// check for background pixmap
else if (normal && btn->parentWidget() &&
btn->parentWidget()->backgroundPixmap() &&
!btn->parentWidget()->backgroundPixmap()->isNull()) {
TQPixmap pixmap = *(btn->parentWidget()->backgroundPixmap());
painter->drawTiledPixmap(rect, pixmap, btn->pos());
else if (normal &&
!ceData.parentWidgetData.bgPixmap.isNull()) {
TQPixmap pixmap = ceData.parentWidgetData.bgPixmap;
painter->drawTiledPixmap(rect, pixmap, ceData.pos);
}
// everything else
else if (normal) {
@ -1944,7 +1921,7 @@ void PhaseStyle::drawComplexControl(TQ_ComplexControl control,
void PhaseStyle::drawComplexControlMask(TQ_ComplexControl control,
TQPainter *painter,
const TQStyleControlElementData ceData,
const TQStyleControlElementData &ceData,
const ControlElementFlags elementFlags,
const TQRect &rect,
const TQStyleOption &option,
@ -1968,7 +1945,7 @@ void PhaseStyle::drawComplexControlMask(TQ_ComplexControl control,
// -------------
// Get the pixel metric for metric
int PhaseStyle::pixelMetric(PixelMetric metric, TQStyleControlElementData ceData, ControlElementFlags elementFlags, const TQWidget *widget) const
int PhaseStyle::pixelMetric(PixelMetric metric, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, const TQWidget *widget) const
{
// not using widget's font, so that all metrics are uniform
int em = TQMAX(TQApplication::fontMetrics().strikeOutPos() * 3, 17);
@ -2033,7 +2010,7 @@ int PhaseStyle::pixelMetric(PixelMetric metric, TQStyleControlElementData ceData
// ---------
// Return subrect for the widget in logical coordinates
TQRect PhaseStyle::subRect(SubRect rect, const TQStyleControlElementData ceData, const ControlElementFlags elementFlags, const TQWidget *widget) const
TQRect PhaseStyle::subRect(SubRect rect, const TQStyleControlElementData &ceData, const ControlElementFlags elementFlags, const TQWidget *widget) const
{
switch (rect) {
case SR_ComboBoxFocusRect: {
@ -2054,7 +2031,7 @@ TQRect PhaseStyle::subRect(SubRect rect, const TQStyleControlElementData ceData,
// Get metrics for subcontrols of complex controls
TQRect PhaseStyle::querySubControlMetrics(TQ_ComplexControl control,
TQStyleControlElementData ceData,
const TQStyleControlElementData &ceData,
ControlElementFlags elementFlags,
SubControl subcontrol,
const TQStyleOption &option,
@ -2152,7 +2129,7 @@ TQRect PhaseStyle::querySubControlMetrics(TQ_ComplexControl control,
// Returns the size of widget based on the contentsize
TQSize PhaseStyle::sizeFromContents(ContentsType contents,
TQStyleControlElementData ceData,
const TQStyleControlElementData &ceData,
ControlElementFlags elementFlags,
const TQSize &contentsize,
const TQStyleOption &option,
@ -2243,7 +2220,7 @@ TQSize PhaseStyle::sizeFromContents(ContentsType contents,
// -------------
// Is the toolbar "flat"
bool PhaseStyle::flatToolbar(const TQStyleControlElementData ceData, const ControlElementFlags elementFlags, const TQToolBar *toolbar) const
bool PhaseStyle::flatToolbar(const TQStyleControlElementData &ceData, const ControlElementFlags elementFlags, const TQToolBar *toolbar) const
{
if (!toolbar) return true; // not on a toolbar
if (!toolbar->isMovingEnabled()) return true; // immobile toolbars are flat
@ -2253,7 +2230,7 @@ bool PhaseStyle::flatToolbar(const TQStyleControlElementData ceData, const Contr
return false;
}
int PhaseStyle::styleHint(StyleHint sh, TQStyleControlElementData ceData, ControlElementFlags elementFlags, const TQStyleOption &opt, TQStyleHintReturn *returnData, const TQWidget *w) const
int PhaseStyle::styleHint(StyleHint sh, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, const TQStyleOption &opt, TQStyleHintReturn *returnData, const TQWidget *w) const
{
int ret;
@ -2282,7 +2259,7 @@ int PhaseStyle::styleHint(StyleHint sh, TQStyleControlElementData ceData, Contro
// Grab events we are interested in. Most of this routine is to handle the
// exceptions to the normal styling rules.
bool PhaseStyle::objectEventHandler( TQStyleControlElementData ceData, ControlElementFlags elementFlags, void* source, TQEvent *event )
bool PhaseStyle::objectEventHandler( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void* source, TQEvent *event )
{
if (ceData.widgetObjectTypes.contains(TQOBJECT_OBJECT_NAME_STRING)) {
TQObject* object = reinterpret_cast<TQObject*>(source);

@ -62,14 +62,14 @@ class PhaseStyle : public KStyle
PhaseStyle();
virtual ~PhaseStyle();
void applicationPolish(TQStyleControlElementData ceData, ControlElementFlags elementFlags, void *);
void polish(TQStyleControlElementData ceData, ControlElementFlags elementFlags, void *);
void applicationPolish(const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void *);
void polish(const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void *);
void polish(TQPalette &pal);
void unPolish(TQStyleControlElementData ceData, ControlElementFlags elementFlags, void *);
void unPolish(const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void *);
void drawPrimitive(TQ_PrimitiveElement element,
TQPainter *painter,
TQStyleControlElementData ceData,
const TQStyleControlElementData &ceData,
ControlElementFlags elementFlags,
const TQRect &rect,
const TQColorGroup &group,
@ -78,7 +78,7 @@ class PhaseStyle : public KStyle
void drawKStylePrimitive(KStylePrimitive element,
TQPainter *painter,
TQStyleControlElementData ceData,
const TQStyleControlElementData &ceData,
ControlElementFlags elementFlags,
const TQRect &rect,
const TQColorGroup &group,
@ -88,7 +88,7 @@ class PhaseStyle : public KStyle
void drawControl(TQ_ControlElement element,
TQPainter *painter,
TQStyleControlElementData ceData,
const TQStyleControlElementData &ceData,
ControlElementFlags elementFlags,
const TQRect &rect,
const TQColorGroup &group,
@ -98,7 +98,7 @@ class PhaseStyle : public KStyle
void drawControlMask(TQ_ControlElement element,
TQPainter *painter,
TQStyleControlElementData ceData,
const TQStyleControlElementData &ceData,
ControlElementFlags elementFlags,
const TQRect &rect,
const TQStyleOption &option = TQStyleOption::Default,
@ -106,7 +106,7 @@ class PhaseStyle : public KStyle
void drawComplexControl(TQ_ComplexControl control,
TQPainter *painter,
TQStyleControlElementData ceData,
const TQStyleControlElementData &ceData,
ControlElementFlags elementFlags,
const TQRect &rect,
const TQColorGroup &group,
@ -118,32 +118,32 @@ class PhaseStyle : public KStyle
void drawComplexControlMask(TQ_ComplexControl control,
TQPainter *painter,
const TQStyleControlElementData ceData,
const TQStyleControlElementData &ceData,
const ControlElementFlags elementFlags,
const TQRect &rect,
const TQStyleOption &option = TQStyleOption::Default,
const TQWidget *widget = 0) const;
int pixelMetric(PixelMetric metric, TQStyleControlElementData ceData, ControlElementFlags elementFlags,
int pixelMetric(PixelMetric metric, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags,
const TQWidget *widget = 0) const;
TQRect subRect(SubRect rect, const TQStyleControlElementData ceData, const ControlElementFlags elementFlags, const TQWidget *widget = 0) const;
TQRect subRect(SubRect rect, const TQStyleControlElementData &ceData, const ControlElementFlags elementFlags, const TQWidget *widget = 0) const;
TQRect querySubControlMetrics(TQ_ComplexControl control,
TQStyleControlElementData ceData,
const TQStyleControlElementData &ceData,
ControlElementFlags elementFlags,
SubControl subcontrol,
const TQStyleOption &option = TQStyleOption::Default,
const TQWidget *widget = 0) const;
TQSize sizeFromContents(ContentsType contents,
TQStyleControlElementData ceData,
const TQStyleControlElementData &ceData,
ControlElementFlags elementFlags,
const TQSize &contentsize,
const TQStyleOption& option = TQStyleOption::Default,
const TQWidget *widget = 0) const;
int styleHint(TQ_StyleHint, TQStyleControlElementData ceData, ControlElementFlags elementFlags,
int styleHint(TQ_StyleHint, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags,
const TQStyleOption & = TQStyleOption::Default,
TQStyleHintReturn * = 0, const TQWidget * = 0 ) const;
@ -174,7 +174,7 @@ class PhaseStyle : public KStyle
void drawPhaseTab(TQPainter *painter,
int x, int y, int w, int h,
const TQColorGroup &group,
TQStyleControlElementData ceData,
const TQStyleControlElementData &ceData,
ControlElementFlags elementFlags,
const TQStyleOption &option,
const SFlags flags) const;
@ -187,9 +187,9 @@ class PhaseStyle : public KStyle
int pw=-1, int ph=-1,
bool reverse=false) const;
bool flatToolbar(const TQStyleControlElementData ceData, const ControlElementFlags elementFlags, const TQToolBar *toolbar) const;
bool flatToolbar(const TQStyleControlElementData &ceData, const ControlElementFlags elementFlags, const TQToolBar *toolbar) const;
bool objectEventHandler( TQStyleControlElementData ceData, ControlElementFlags elementFlags, void* source, TQEvent *e );
bool objectEventHandler( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void* source, TQEvent *e );
private:
TQMap<unsigned int, TQIntDict<GradientSet> > * gradients;

@ -5,8 +5,8 @@ Name[ar]=هواء
Name[bg]=Въздух
Name[bn_IN]=বাতাস
Name[cs]=Vzduch
Name[csb]=Lëft
Name[el]=Αέρας
Name[csb]=Lëft
Name[el]=Αέρας
Name[en_GB]=Air
Name[eo]=Aero
Name[es]=Aire
@ -14,7 +14,7 @@ Name[eu]=Airea
Name[gl]=Aire
Name[gu]=હવા
Name[hi]=हवा
Name[hu]=Levegő
Name[hu]=Levegő
Name[ia]=Air
Name[id]=Udara
Name[is]=Loft

@ -1,6 +1,7 @@
[Wallpaper]
File=antique_chess.jpg
Name=Antique Chess
Name[cs]=Šachy
Name[de]=Antiquität Schach
Name[en_GB]=Antique Chess
Name[es]=Ajedrez
@ -19,4 +20,4 @@ Name[sv]=Schack
Name[uk]=Шахи
Name[x-test]=xxChessxx
ImageType=pixmap
Author=Risto Saukonpää
Author=Risto Saukonpää

@ -3,6 +3,7 @@ File=autumn_leaves.jpg
Name=Autumn Leaves
Name[ca]=Tardor
Name[ca@valencia]=Tardor
Name[cs]=Podzimní listí
Name[da]=Autumn
Name[de]=Herbst Lassen
Name[en_GB]=Autumn Leaves

@ -1,6 +1,7 @@
[Wallpaper]
File=crystal_fire.png
Name=Crystal Fire
Name[cs]=Křišťálový oheň
Name[de]=Crystal Feuer
Name[en_GB]=Crystal Fire
Name[ru]=Кристальный Огонь

@ -1,6 +1,7 @@
[Wallpaper]
File=curls_on_green.jpg
Name=Curls on Green
Name[cs]=Kadeře na zeleni
Name[da]=Curls on Green
Name[en_GB]=Curls on Green
Name[eo]=Bukloj sur verda

@ -1,6 +1,7 @@
[Wallpaper]
File=damselfly.jpg
Name=Damselfly
Name[cs]=Vážka
Name[da]=Damselfly
Name[de]=Kleinlibelle
Name[en_GB]=Damselfly
@ -17,9 +18,9 @@ Name[sr]=Водена девица
Name[sr@ijekavian]=Водена дјевица
Name[sr@ijekavianlatin]=Vodena djevica
Name[sr@latin]=Vodena devica
Name[sv]=Jungfruslända
Name[sv]=Jungfruslända
Name[uk]=Рівнокрила бабка
Name[x-test]=xxDamselflyxx
Name[zh_TW]=Damselfly
ImageType=pixmap
Author=Risto Saukonpää
Author=Risto Saukonpää

@ -2,6 +2,7 @@
File=fulmine.jpg
Name=Fulmine
Name[ca]=Explosió
Name[cs]=Blesk
Name[de]=Gewitter
Name[eo]=Fulmo
Name[es]=Rayo

@ -1,6 +1,7 @@
[Wallpaper]
File=golden_dome.jpg
Name=Golden Dome
Name[cs]=Zlatý dóm
Name[ru]=Золотой Свод
ImageType=pixmap
Author=Tomasz Wiszkowski

@ -2,6 +2,7 @@
File=kubical.png
Name=Kubical
Name[ca]=Kubic
Name[cs]=Kostka
Name[da]=Kubisk
Name[de]=Würfelig
Name[eo]=Kubeca

@ -1,6 +1,7 @@
[Wallpaper]
File=landscape_keltern.jpg
Name=Landscape Keltern
Name=Кельтернcкий пейзаж
Name[cs]=Kelternská krajina
Name[ru]=Кельтернcкий пейзаж
ImageType=pixmap
Author=Dennis G.

@ -1,10 +1,11 @@
[Wallpaper]
File=sunset_field.jpg
Name=Sunset Field
Name[cs]=Pole v západu slunce
Name[de]=Sonnenuntergang Feld
Name[en_GB]=Sunset Field
Name[es]=Campo
Name[et]=Väli
Name[et]=Väli
Name[fi]=Pelto
Name[it]=Campo
Name[nb]=Eng
@ -20,4 +21,4 @@ Name[sr@latin]=Polje
Name[uk]=Поле
Name[x-test]=xxFieldxx
ImageType=pixmap
Author=Risto Saukonpää
Author=Risto Saukonpää

Loading…
Cancel
Save