|
|
@ -136,7 +136,7 @@ PhaseStyle::~PhaseStyle()
|
|
|
|
// --------
|
|
|
|
// --------
|
|
|
|
// Initialize application specific
|
|
|
|
// 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)) {
|
|
|
|
if (ceData.widgetObjectTypes.contains(TQAPPLICATION_OBJECT_NAME_STRING)) {
|
|
|
|
TQApplication *app = reinterpret_cast<TQApplication*>(ptr);
|
|
|
|
TQApplication *app = reinterpret_cast<TQApplication*>(ptr);
|
|
|
@ -149,7 +149,7 @@ void PhaseStyle::applicationPolish(TQStyleControlElementData ceData, ControlElem
|
|
|
|
// --------
|
|
|
|
// --------
|
|
|
|
// Initialize the appearance of a widget
|
|
|
|
// 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)) {
|
|
|
|
if (ceData.widgetObjectTypes.contains(TQWIDGET_OBJECT_NAME_STRING)) {
|
|
|
|
TQWidget *widget = reinterpret_cast<TQWidget*>(ptr);
|
|
|
|
TQWidget *widget = reinterpret_cast<TQWidget*>(ptr);
|
|
|
@ -211,7 +211,7 @@ void PhaseStyle::polish(TQPalette &pal)
|
|
|
|
// ----------
|
|
|
|
// ----------
|
|
|
|
// Undo the initialization of a widget's appearance
|
|
|
|
// 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)) {
|
|
|
|
if (ceData.widgetObjectTypes.contains(TQWIDGET_OBJECT_NAME_STRING)) {
|
|
|
|
TQWidget *widget = reinterpret_cast<TQWidget*>(ptr);
|
|
|
|
TQWidget *widget = reinterpret_cast<TQWidget*>(ptr);
|
|
|
@ -412,7 +412,7 @@ void PhaseStyle::drawPhasePanel(TQPainter *painter,
|
|
|
|
void PhaseStyle::drawPhaseTab(TQPainter *painter,
|
|
|
|
void PhaseStyle::drawPhaseTab(TQPainter *painter,
|
|
|
|
int x, int y, int w, int h,
|
|
|
|
int x, int y, int w, int h,
|
|
|
|
const TQColorGroup &group,
|
|
|
|
const TQColorGroup &group,
|
|
|
|
TQStyleControlElementData ceData,
|
|
|
|
const TQStyleControlElementData &ceData,
|
|
|
|
ControlElementFlags /*elementFlags*/,
|
|
|
|
ControlElementFlags /*elementFlags*/,
|
|
|
|
const TQStyleOption &option,
|
|
|
|
const TQStyleOption &option,
|
|
|
|
SFlags flags) const
|
|
|
|
SFlags flags) const
|
|
|
@ -578,7 +578,7 @@ void PhaseStyle::drawPhaseTab(TQPainter *painter,
|
|
|
|
|
|
|
|
|
|
|
|
void PhaseStyle::drawPrimitive(TQ_PrimitiveElement element,
|
|
|
|
void PhaseStyle::drawPrimitive(TQ_PrimitiveElement element,
|
|
|
|
TQPainter *painter,
|
|
|
|
TQPainter *painter,
|
|
|
|
TQStyleControlElementData ceData,
|
|
|
|
const TQStyleControlElementData &ceData,
|
|
|
|
ControlElementFlags elementFlags,
|
|
|
|
ControlElementFlags elementFlags,
|
|
|
|
const TQRect &rect,
|
|
|
|
const TQRect &rect,
|
|
|
|
const TQColorGroup &group,
|
|
|
|
const TQColorGroup &group,
|
|
|
@ -1036,7 +1036,7 @@ void PhaseStyle::drawPrimitive(TQ_PrimitiveElement element,
|
|
|
|
|
|
|
|
|
|
|
|
void PhaseStyle::drawKStylePrimitive(KStylePrimitive element,
|
|
|
|
void PhaseStyle::drawKStylePrimitive(KStylePrimitive element,
|
|
|
|
TQPainter *painter,
|
|
|
|
TQPainter *painter,
|
|
|
|
TQStyleControlElementData ceData,
|
|
|
|
const TQStyleControlElementData &ceData,
|
|
|
|
ControlElementFlags elementFlags,
|
|
|
|
ControlElementFlags elementFlags,
|
|
|
|
const TQRect &rect,
|
|
|
|
const TQRect &rect,
|
|
|
|
const TQColorGroup &group,
|
|
|
|
const TQColorGroup &group,
|
|
|
@ -1155,7 +1155,7 @@ void PhaseStyle::drawKStylePrimitive(KStylePrimitive element,
|
|
|
|
|
|
|
|
|
|
|
|
void PhaseStyle::drawControl(TQ_ControlElement element,
|
|
|
|
void PhaseStyle::drawControl(TQ_ControlElement element,
|
|
|
|
TQPainter *painter,
|
|
|
|
TQPainter *painter,
|
|
|
|
TQStyleControlElementData ceData,
|
|
|
|
const TQStyleControlElementData &ceData,
|
|
|
|
ControlElementFlags elementFlags,
|
|
|
|
ControlElementFlags elementFlags,
|
|
|
|
const TQRect &rect,
|
|
|
|
const TQRect &rect,
|
|
|
|
const TQColorGroup &group,
|
|
|
|
const TQColorGroup &group,
|
|
|
@ -1599,7 +1599,7 @@ void PhaseStyle::drawControl(TQ_ControlElement element,
|
|
|
|
|
|
|
|
|
|
|
|
void PhaseStyle::drawControlMask(TQ_ControlElement element,
|
|
|
|
void PhaseStyle::drawControlMask(TQ_ControlElement element,
|
|
|
|
TQPainter *painter,
|
|
|
|
TQPainter *painter,
|
|
|
|
TQStyleControlElementData ceData,
|
|
|
|
const TQStyleControlElementData &ceData,
|
|
|
|
ControlElementFlags elementFlags,
|
|
|
|
ControlElementFlags elementFlags,
|
|
|
|
const TQRect &rect,
|
|
|
|
const TQRect &rect,
|
|
|
|
const TQStyleOption &option,
|
|
|
|
const TQStyleOption &option,
|
|
|
@ -1623,7 +1623,7 @@ void PhaseStyle::drawControlMask(TQ_ControlElement element,
|
|
|
|
|
|
|
|
|
|
|
|
void PhaseStyle::drawComplexControl(TQ_ComplexControl control,
|
|
|
|
void PhaseStyle::drawComplexControl(TQ_ComplexControl control,
|
|
|
|
TQPainter *painter,
|
|
|
|
TQPainter *painter,
|
|
|
|
TQStyleControlElementData ceData,
|
|
|
|
const TQStyleControlElementData &ceData,
|
|
|
|
ControlElementFlags elementFlags,
|
|
|
|
ControlElementFlags elementFlags,
|
|
|
|
const TQRect &rect,
|
|
|
|
const TQRect &rect,
|
|
|
|
const TQColorGroup &group,
|
|
|
|
const TQColorGroup &group,
|
|
|
@ -1921,7 +1921,7 @@ void PhaseStyle::drawComplexControl(TQ_ComplexControl control,
|
|
|
|
|
|
|
|
|
|
|
|
void PhaseStyle::drawComplexControlMask(TQ_ComplexControl control,
|
|
|
|
void PhaseStyle::drawComplexControlMask(TQ_ComplexControl control,
|
|
|
|
TQPainter *painter,
|
|
|
|
TQPainter *painter,
|
|
|
|
const TQStyleControlElementData ceData,
|
|
|
|
const TQStyleControlElementData &ceData,
|
|
|
|
const ControlElementFlags elementFlags,
|
|
|
|
const ControlElementFlags elementFlags,
|
|
|
|
const TQRect &rect,
|
|
|
|
const TQRect &rect,
|
|
|
|
const TQStyleOption &option,
|
|
|
|
const TQStyleOption &option,
|
|
|
@ -1945,7 +1945,7 @@ void PhaseStyle::drawComplexControlMask(TQ_ComplexControl control,
|
|
|
|
// -------------
|
|
|
|
// -------------
|
|
|
|
// Get the pixel metric for metric
|
|
|
|
// 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
|
|
|
|
// not using widget's font, so that all metrics are uniform
|
|
|
|
int em = TQMAX(TQApplication::fontMetrics().strikeOutPos() * 3, 17);
|
|
|
|
int em = TQMAX(TQApplication::fontMetrics().strikeOutPos() * 3, 17);
|
|
|
@ -2010,7 +2010,7 @@ int PhaseStyle::pixelMetric(PixelMetric metric, TQStyleControlElementData ceData
|
|
|
|
// ---------
|
|
|
|
// ---------
|
|
|
|
// Return subrect for the widget in logical coordinates
|
|
|
|
// 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) {
|
|
|
|
switch (rect) {
|
|
|
|
case SR_ComboBoxFocusRect: {
|
|
|
|
case SR_ComboBoxFocusRect: {
|
|
|
@ -2031,7 +2031,7 @@ TQRect PhaseStyle::subRect(SubRect rect, const TQStyleControlElementData ceData,
|
|
|
|
// Get metrics for subcontrols of complex controls
|
|
|
|
// Get metrics for subcontrols of complex controls
|
|
|
|
|
|
|
|
|
|
|
|
TQRect PhaseStyle::querySubControlMetrics(TQ_ComplexControl control,
|
|
|
|
TQRect PhaseStyle::querySubControlMetrics(TQ_ComplexControl control,
|
|
|
|
TQStyleControlElementData ceData,
|
|
|
|
const TQStyleControlElementData &ceData,
|
|
|
|
ControlElementFlags elementFlags,
|
|
|
|
ControlElementFlags elementFlags,
|
|
|
|
SubControl subcontrol,
|
|
|
|
SubControl subcontrol,
|
|
|
|
const TQStyleOption &option,
|
|
|
|
const TQStyleOption &option,
|
|
|
@ -2129,7 +2129,7 @@ TQRect PhaseStyle::querySubControlMetrics(TQ_ComplexControl control,
|
|
|
|
// Returns the size of widget based on the contentsize
|
|
|
|
// Returns the size of widget based on the contentsize
|
|
|
|
|
|
|
|
|
|
|
|
TQSize PhaseStyle::sizeFromContents(ContentsType contents,
|
|
|
|
TQSize PhaseStyle::sizeFromContents(ContentsType contents,
|
|
|
|
TQStyleControlElementData ceData,
|
|
|
|
const TQStyleControlElementData &ceData,
|
|
|
|
ControlElementFlags elementFlags,
|
|
|
|
ControlElementFlags elementFlags,
|
|
|
|
const TQSize &contentsize,
|
|
|
|
const TQSize &contentsize,
|
|
|
|
const TQStyleOption &option,
|
|
|
|
const TQStyleOption &option,
|
|
|
@ -2220,7 +2220,7 @@ TQSize PhaseStyle::sizeFromContents(ContentsType contents,
|
|
|
|
// -------------
|
|
|
|
// -------------
|
|
|
|
// Is the toolbar "flat"
|
|
|
|
// 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) return true; // not on a toolbar
|
|
|
|
if (!toolbar->isMovingEnabled()) return true; // immobile toolbars are flat
|
|
|
|
if (!toolbar->isMovingEnabled()) return true; // immobile toolbars are flat
|
|
|
@ -2230,7 +2230,7 @@ bool PhaseStyle::flatToolbar(const TQStyleControlElementData ceData, const Contr
|
|
|
|
return false;
|
|
|
|
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;
|
|
|
|
int ret;
|
|
|
|
|
|
|
|
|
|
|
@ -2259,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
|
|
|
|
// Grab events we are interested in. Most of this routine is to handle the
|
|
|
|
// exceptions to the normal styling rules.
|
|
|
|
// 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)) {
|
|
|
|
if (ceData.widgetObjectTypes.contains(TQOBJECT_OBJECT_NAME_STRING)) {
|
|
|
|
TQObject* object = reinterpret_cast<TQObject*>(source);
|
|
|
|
TQObject* object = reinterpret_cast<TQObject*>(source);
|
|
|
|