_prefs_->addPreference( mod->moduleName() );
if( toCreate )
mod->createPreferences();
+ QtxPreferenceItem* item = _prefs_->findItem( mod->moduleName(), true );
+ if ( item && item->isEmpty() )
+ delete item;
}
}
}
{
int modCat = myPrefs->addPreference( mod->moduleName() );
lightMod->createPreferences();
- QtxPreferenceItem* item = myPrefs->findItem( modCat );
- if ( item && item->isEmpty() )
+ QtxPreferenceItem* item = myPrefs->findItem( mod->moduleName(), true );
+ if ( item && item->isEmpty() )
delete item;
}
}
libLightApp_la_CPPFLAGS=$(PYTHON_INCLUDES) $(QT_INCLUDES) $(CAS_CPPFLAGS) \
$(HDF5_INCLUDES) @KERNEL_CXXFLAGS@ -I$(srcdir)/../SUIT -I$(srcdir)/../STD \
-I$(srcdir)/../CAM -I$(srcdir)/../ObjBrowser -I$(srcdir)/../LogWindow \
- -I$(srcdir)/../Prs -I$(srcdir)/../Qtx -I$(srcdir)/../Event -I$(srcdir)/../Style
+ -I$(srcdir)/../Prs -I$(srcdir)/../Qtx -I$(srcdir)/../Event -I$(srcdir)/../Style
libLightApp_la_LDFLAGS=$(QT_MT_LIBS)
if ENABLE_VTKVIEWER
libLightApp_la_LIBADD= ../SUIT/libsuit.la ../STD/libstd.la ../CAM/libCAM.la \
../LogWindow/libLogWindow.la $(CAS_KERNEL) \
- ../Prs/libSalomePrs.la ../ObjBrowser/libObjBrowser.la \
+ ../Prs/libSalomePrs.la ../ObjBrowser/libObjBrowser.la ../Style/libSalomeStyle.la \
$(HDF5_LIBS) $(KERNEL_LDFLAGS) -lSalomeHDFPersist
if ENABLE_SALOMEOBJECT
# Module : SALOME
# $Header$
-# VSR: this is the original packages list
-#SUBDIRS = Qtx Style DDS QDS SUIT STD CAF CAM SUITApp LogWindow ObjBrowser Prs
-# VSR: already migrated to Qt4 packages
-SUBDIRS = Qtx DDS QDS SUIT SUITApp STD CAF CAM LogWindow Prs ObjBrowser
+SUBDIRS = Qtx Style DDS QDS SUIT SUITApp STD CAF CAM LogWindow Prs ObjBrowser
if ENABLE_SALOMEOBJECT
SUBDIRS += OBJECT
if ENABLE_QXGRAPHVIEWER
SUBDIRS += QxGraph
endif
-SUBDIRS += Event Style LightApp ResExporter
+SUBDIRS += Event LightApp ResExporter
if GUI_ENABLE_CORBA
SUBDIRS += TOOLSGUI SalomeApp Session SALOME_SWIG SALOME_PY SALOME_PYQT
nodist_salomeres_DATA= SUITApp_msg_en.qm
libSUITApp_la_CPPFLAGS=$(QT_INCLUDES) $(PYTHON_INCLUDES) \
- -I$(srcdir)/../SUIT -I$(srcdir)/../Qtx
+ -I$(srcdir)/../SUIT -I$(srcdir)/../Qtx -I$(srcdir)/../Style
libSUITApp_la_LDFLAGS=$(QT_MT_LIBS)
-libSUITApp_la_LIBADD=../Qtx/libqtx.la ../SUIT/libsuit.la
+libSUITApp_la_LIBADD=../Qtx/libqtx.la ../SUIT/libsuit.la ../Style/libSalomeStyle.la
if ENABLE_PYCONSOLE
libSUITApp_la_LDFLAGS+= -Xlinker -export-dynamic $(PYTHON_LIBS)
dist_SUITApp_SOURCES=SUITApp.cxx
SUITApp_CPPFLAGS=$(QT_INCLUDES) $(PYTHON_INCLUDES) \
- -I$(srcdir)/../SUIT -I$(srcdir)/../Qtx
+ -I$(srcdir)/../SUIT -I$(srcdir)/../Qtx -I$(srcdir)/../Style
-SUITApp_LDADD= libSUITApp.la ../Qtx/libqtx.la ../SUIT/libsuit.la
+SUITApp_LDADD= libSUITApp.la ../Qtx/libqtx.la ../SUIT/libsuit.la ../Style/libSalomeStyle.la
#include <SUIT_Session.h>
//#include <SUIT_Desktop.h>
#include <SUIT_ResourceMgr.h>
+#include <Style_Salome.h>
+#include <Style_Model.h>
// TODO
//#include <QtxSplash.h>
SUIT_Application* theApp = aSession->startApplication( argList.first() );
if ( theApp )
{
+ Style_Salome* aStyle = new Style_Salome();
+ aStyle->getModel()->initFromResource( theApp->resourceMgr() );
+ app.setStyle( aStyle );
+
if ( !noExceptHandling )
app.setHandler( aSession->handler() );
// Module : SALOME
#include <Container_init_python.hxx>
-#include "Utils_ORB_INIT.hxx"
-#include "Utils_SINGLETON.hxx"
-#include "SALOME_NamingService.hxx"
+#include <Utils_ORB_INIT.hxx>
+#include <Utils_SINGLETON.hxx>
+#include <SALOME_NamingService.hxx>
#include <QDir>
#include <QFile>
#include <QWaitCondition>
#include <QRegExp>
-#include "Utils_SALOME_Exception.hxx"
-#include "Utils_CorbaException.hxx"
-#include "SALOME_Event.h"
+#include <Utils_SALOME_Exception.hxx>
+#include <Utils_CorbaException.hxx>
+#include <SALOME_Event.h>
#include <SALOMEconfig.h>
#include CORBA_SERVER_HEADER(SALOME_Session)
#include <QtxSplash.h>
#include <Style_Salome.h>
#include <Style_Model.h>
-#include "SUIT_Tools.h"
-#include "SUIT_Session.h"
-#include "SUIT_Application.h"
-#include "SUIT_Desktop.h"
-#include "SUIT_ResourceMgr.h"
-#include "SUIT_ExceptionHandler.h"
+#include <SUIT_Tools.h>
+#include <SUIT_Session.h>
+#include <SUIT_Application.h>
+#include <SUIT_Desktop.h>
+#include <SUIT_ResourceMgr.h>
+#include <SUIT_ExceptionHandler.h>
/*! - read arguments, define list of server to launch with their arguments.
* - wait for naming service
Style_Model.cxx \
Style_Salome.cxx
+MOC_FILES= \
+ Style_Salome_moc.cxx
+nodist_libSalomeStyle_la_SOURCES= $(MOC_FILES)
+
libSalomeStyle_la_CPPFLAGS=$(QT_INCLUDES) \
- -I$(srcdir)/../Qtx -I$(srcdir)/../SUIT
+ -I$(srcdir)/../Qtx
libSalomeStyle_la_LDFLAGS=$(QT_MT_LIBS) \
- ../Qtx/libqtx.la ../SUIT/libsuit.la
+ ../Qtx/libqtx.la
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-// File: Style.h
-// Created: July, 2007
-// Author: OCC team
+// File : Style.h
+// Author : Natalia Ermolaeva, Open CASCADE S.A.S.
+//
+
+#ifndef STYLE_H
+#define STYLE_H
-#if defined STYLE_SALOME_EXPORTS
-#if defined WIN32
-#define STYLE_SALOME_EXPORT _declspec( dllexport )
-#else
-#define STYLE_SALOME_EXPORT
-#endif
-#else
#if defined WIN32
-#define STYLE_SALOME_EXPORT _declspec( dllimport )
+# if defined STYLE_SALOME_EXPORTS
+# define STYLE_SALOME_EXPORT _declspec( dllexport )
+# else
+# define STYLE_SALOME_EXPORT _declspec( dllimport )
+# endif
#else
-#define STYLE_SALOME_EXPORT
-#endif
+# define STYLE_SALOME_EXPORT
#endif
+#endif // STYLE_H
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-// File: Style_Model.cxx
-// Author: Natalia Ermolaeva
+// File : Style_Model.cxx
+// Author : Natalia Ermolaeva, Open CASCADE S.A.S.
+//
-#include <Style_Model.h>
+#include "Style_Model.h"
#include <QtxResourceMgr.h>
#include <QColor>
{
}
+QString Style_Model::sectionName()
+{
+ return "Theme";
+}
+
void Style_Model::reset()
{
ValuesMap::iterator anIt = myValues.begin(), anEnd = myValues.end();
setPredefinedStyle( getIntValue( defined_style ) );
}
-bool Style_Model::updateFromResource( QtxResourceMgr* theResMgr, QString thePropName )
+bool Style_Model::updateFromResource( QtxResourceMgr* theResMgr, const QString& thePropName )
{
bool retrieve = false;
if ( !theResMgr )
return aFont;
}
-QList<int> Style_Model::getGroups()
+QList<int> Style_Model::getGroups() const
{
- QList<int> values;
- StringMap::iterator anIt = myGroups.begin(), anEnd = myGroups.end();
- for ( ; anIt != anEnd; ++anIt )
- values.append( anIt.key() );
- return values;
+ return myGroups.keys();
}
-QString Style_Model::getGroupTitle( int theId )
+QString Style_Model::getGroupTitle( int theId ) const
{
return myGroups.contains( theId ) ? myGroups[theId].myTitle : "";
}
-int Style_Model::getGroupNbColumns( int theId )
+int Style_Model::getGroupNbColumns( int theId ) const
{
return myGroups.contains( theId ) ? myGroups[theId].myNbColumns : 1;
}
-QList<int> Style_Model::getGroupProps( int theId )
+QList<int> Style_Model::getGroupProps( int theId ) const
{
QList<int> values;
- ValuesMap::iterator anIt = myValues.begin(), anEnd = myValues.end();
+ ValuesMap::const_iterator anIt = myValues.begin(), anEnd = myValues.end();
for ( ; anIt != anEnd; ++anIt )
if ( anIt.value().myGroupId == theId )
values.append( anIt.key() );
}
-QString Style_Model::getPropTitle( int theId )
+QString Style_Model::getPropTitle( int theId ) const
{
return myValues.contains( theId ) ? myValues[theId].myTitle : "";
}
-Style_Model::PropType Style_Model::getPropType( int theId )
+Style_Model::PropType Style_Model::getPropType( int theId ) const
{
return myValues.contains( theId ) ? myValues[theId].myType : None;
}
-QString Style_Model::getPropName( int theId )
+QString Style_Model::getPropName( int theId ) const
{
return myValues.contains( theId ) ? myValues[theId].myName : "";
}
-void Style_Model::getSelector( int theId, QStringList& theLst, QList<QVariant>& theIds )
+void Style_Model::getSelector( int theId, QStringList& theLst, QList<QVariant>& theIds ) const
{
theLst.clear();
theIds.clear();
theIds.append( QVariant( i++ ) );
}
-void Style_Model::setDefValue( Properties theId, QVariant theValue )
+void Style_Model::setDefValue( Properties theId, const QVariant& theValue )
{
myValues[theId].myDefValue = theValue;
setValue( theId, theValue );
}
-void Style_Model::setValue( Properties theId, QVariant theValue )
+void Style_Model::setValue( Properties theId, const QVariant& theValue )
{
myValues[theId].myValue = theValue;
}
-void Style_Model::fillValue( Properties theId, QString theName,
- QString theTitle, Groups theGroupId, PropType theType )
+void Style_Model::fillValue( Properties theId, const QString& theName,
+ const QString& theTitle, Groups theGroupId, PropType theType )
{
StyleValue aValue;
aValue.myName = theName;
myValues[theId] = aValue;
}
-void Style_Model::fillGroup( Groups theId, QString theTitle, int theNbCols )
+void Style_Model::fillGroup( Groups theId, const QString& theTitle, int theNbCols )
{
GroupValue aValue;
aValue.myTitle = theTitle;
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-// File: Style_Model.h
-// Author: Natalia Ermolaeva
+// File : Style_Model.h
+// Author : Natalia Ermolaeva, Open CASCADE S.A.S.
+//
-#ifndef STYLE_MODEL_HEADER
-#define STYLE_MODEL_HEADER
+#ifndef STYLE_MODEL_H
+#define STYLE_MODEL_H
-#include <Style.h>
+#include "Style.h"
#include <QMap>
#include <QString>
Style_Model();
virtual ~Style_Model();
- static QString sectionName() { return "Theme"; }
+ static QString sectionName();
typedef enum { grp_style, grp_color, grp_col_values, grp_lines, grp_font, grp_value } Groups;
edit_rad, btn_rad, slider_rad, slider_increase,
hor_handle_delta, ver_handle_delta, split_handle_len,
dock_wdg_sep_extent } Properties;
+
typedef enum { None, Bool, Color, String, IntSpin, DblSpin, Selector, Font } PropType;
void reset();
- void setDefaults( QApplication* app );
- void initFromResource( QtxResourceMgr* theResMgr );
- bool updateFromResource( QtxResourceMgr* theResMgr, QString thePropName );
-
- void getValueTo( QtxResourceMgr* theResMgr, int theId, bool theIsDef );
- void setValueFrom( QtxResourceMgr* theResMgr, int theId );
-
- void setPredefinedStyle( int theType );
-
- double getDblValue( int theId, const bool theIsDef = false ) const;
- int getIntValue( int theId, const bool theIsDef = false ) const;
- bool getBoolValue( int theId, const bool theIsDef = false ) const;
- QColor getColorValue( int theId, const bool theIsDef = false ) const;
- QString getStringValue( int theId, const bool theIsDef = false ) const;
- QFont getFontValue( int theId, const bool theIsDef = false ) const;
-
- QList<int> getGroups();
- QString getGroupTitle( int theId );
- int getGroupNbColumns( int theId );
- QList<int> getGroupProps( int theId );
- QString getPropTitle( int theId );
- PropType getPropType( int theId );
- QString getPropName( int theId );
- void getSelector( int theId, QStringList& theLst, QList<QVariant>& theIds );
+ void setDefaults( QApplication* );
+ void initFromResource( QtxResourceMgr* );
+ bool updateFromResource( QtxResourceMgr*, const QString& );
+
+ void getValueTo( QtxResourceMgr*, int, bool );
+ void setValueFrom( QtxResourceMgr*, int );
+
+ void setPredefinedStyle( int );
+
+ double getDblValue( int, const bool = false ) const;
+ int getIntValue( int, const bool = false ) const;
+ bool getBoolValue( int, const bool = false ) const;
+ QColor getColorValue( int, const bool = false ) const;
+ QString getStringValue( int, const bool = false ) const;
+ QFont getFontValue( int, const bool = false ) const;
+
+ QList<int> getGroups() const;
+ QString getGroupTitle( int ) const;
+ int getGroupNbColumns( int ) const;
+ QList<int> getGroupProps( int ) const;
+ QString getPropTitle( int ) const;
+ PropType getPropType( int ) const;
+ QString getPropName( int ) const;
+ void getSelector( int, QStringList&, QList<QVariant>& ) const;
private:
- void setDefValue( Properties theId, QVariant theValue );
- void setValue( Properties theId, QVariant theValue );
+ void setDefValue( Properties, const QVariant& );
+ void setValue( Properties, const QVariant& );
- void fillValue( Properties theId, QString theName, QString theTitle,
- Groups theGroupId, PropType theType = Color );
- void fillGroup( Groups theId, QString theTitle, int theNbCols );
+ void fillValue( Properties, const QString&, const QString&,
+ Groups, PropType = Color );
+ void fillGroup( Groups, const QString&, int );
private:
typedef struct {
QStringList myLines;
};
-#endif
+#endif // STYLE_MODEL_H
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-// File: Style_Salome.cxx
-// Author: Natalia Ermolaeva
+// File : Style_Salome.cxx
+// Author : Natalia Ermolaeva, Open CASCADE S.A.S.
+//
-#include <Style_Salome.h>
-#include <Style_Tools.h>
-#include <Style_Model.h>
+#include "Style_Salome.h"
+#include "Style_Tools.h"
+#include "Style_Model.h"
#include <QApplication>
#include <QPainter>
{
}
+Style_Model* Style_Salome::getModel() const
+{
+ return myModel;
+}
+
void Style_Salome::updateSettings( QApplication* app )
{
updatePaletteColors();
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-// File: Style_Salome.h
-// Author: Natalia Ermolaeva
+// File : Style_Salome.h
+// Author : Natalia Ermolaeva, Open CASCADE S.A.S.
+//
-#ifndef STYLE_SALOME_HEADER
-#define STYLE_SALOME_HEADER
+#ifndef STYLE_SALOME_H
+#define STYLE_SALOME_H
-#include <Style.h>
+#include "Style.h"
#include <QWindowsStyle>
-#include <QStylePlugin>
#include <QMap>
class Style_Model;
class STYLE_SALOME_EXPORT Style_Salome : public QWindowsStyle
{
+ Q_OBJECT
public:
Style_Salome();
virtual ~Style_Salome();
- Style_Model* getModel() { return myModel; }
-
- void updateSettings( QApplication* app );
+ Style_Model* getModel() const;
- virtual void polish( QApplication* app );
- virtual void polish( QWidget *widget );
- virtual void unpolish( QWidget *widget );
- virtual void drawComplexControl( ComplexControl, const QStyleOptionComplex*,
- QPainter*, const QWidget* = 0 ) const;
+ void updateSettings( QApplication* );
- virtual void drawControl( ControlElement, const QStyleOption*, QPainter*, const QWidget* ) const;
- virtual void drawPrimitive( PrimitiveElement, const QStyleOption*,
- QPainter*, const QWidget* = 0 ) const;
- virtual int pixelMetric ( PixelMetric metric, const QStyleOption* opt = 0,
- const QWidget* w = 0 ) const;
- virtual QSize sizeFromContents ( ContentsType ct, const QStyleOption* opt,
- const QSize& contentsSize, const QWidget* w = 0 ) const;
- virtual QPixmap standardPixmap(StandardPixmap stPixmap, const QStyleOption *opt,
- const QWidget *widget = 0) const;
- virtual int styleHint ( StyleHint hint, const QStyleOption * option = 0,
- const QWidget * widget = 0, QStyleHintReturn * returnData = 0 ) const;
- virtual QRect subControlRect( ComplexControl, const QStyleOptionComplex*,
- SubControl, const QWidget* = 0 ) const;
- virtual QRect subElementRect( SubElement, const QStyleOption*, const QWidget* = 0 ) const;
+ virtual void polish( QApplication* );
+ virtual void polish( QWidget* );
+ virtual void unpolish( QWidget* );
+ virtual void drawComplexControl( ComplexControl, const QStyleOptionComplex*,
+ QPainter*, const QWidget* = 0 ) const;
+
+ virtual void drawControl( ControlElement, const QStyleOption*, QPainter*, const QWidget* ) const;
+ virtual void drawPrimitive( PrimitiveElement, const QStyleOption*,
+ QPainter*, const QWidget* = 0 ) const;
+ virtual int pixelMetric( PixelMetric, const QStyleOption* = 0,
+ const QWidget* = 0 ) const;
+ virtual QSize sizeFromContents ( ContentsType, const QStyleOption*,
+ const QSize&, const QWidget* = 0 ) const;
+ virtual QPixmap standardPixmap( StandardPixmap, const QStyleOption*,
+ const QWidget* = 0) const;
+ virtual int styleHint( StyleHint, const QStyleOption* = 0,
+ const QWidget* = 0, QStyleHintReturn* = 0 ) const;
+ virtual QRect subControlRect( ComplexControl, const QStyleOptionComplex*,
+ SubControl, const QWidget* = 0 ) const;
+ virtual QRect subElementRect( SubElement, const QStyleOption*, const QWidget* = 0 ) const;
private:
- void updatePaletteColors();
- void updateAllWidgets( QApplication* app );
- bool hasHover() const;
- void drawHoverRect( QPainter* p, const QRect& r, const double rad, const int type,
- const bool border ) const;
- void drawHandle( QPainter* p, const QRect& r, bool horiz, bool isRect = true ) const;
- void drawBackground( QPainter* p, const QRect& r, const bool fill,
- const bool grad = false, const bool horiz = true ) const;
- void drawBorder( QPainter* p, const QRect& r, bool horiz ) const;
+ void updatePaletteColors();
+ void updateAllWidgets( QApplication* );
+ bool hasHover() const;
+ void drawHoverRect( QPainter*, const QRect&, const double, const int,
+ const bool ) const;
+ void drawHandle( QPainter*, const QRect&, bool, bool = true ) const;
+ void drawBackground( QPainter*, const QRect&, const bool,
+ const bool = false, const bool = true ) const;
+ void drawBorder( QPainter*, const QRect&, bool ) const;
- QColor getColor( int id ) const;
- double getDblValue( int id ) const;
- int getIntValue( int id ) const;
- bool getBoolValue( int id ) const;
- QString getStringValue( int id ) const;
- QString titleText( const QString&, const int, const int, QFont& f ) const;
+ QColor getColor( int ) const;
+ double getDblValue( int ) const;
+ int getIntValue( int ) const;
+ bool getBoolValue( int ) const;
+ QString getStringValue( int ) const;
+ QString titleText( const QString&, const int, const int, QFont& ) const;
private:
- Style_Model* myModel;
+ Style_Model* myModel;
};
-#endif
+#endif // STYLE_SALOME_H
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-// File: Style_Tools.cxx
-// Author: Natalia Ermolaeva
+// File : Style_Tools.cxx
+// Author : Natalia Ermolaeva, Open CASCADE S.A.S.
+//
-#include <Style_Tools.h>
+#include "Style_Tools.h"
#include <QPainter>
#include <QPainterPath>
}
void Style_Tools::drawFocus( QPainter* p, const QPainterPath& path, const QColor& border,
- const bool& line )
+ const bool line )
{
QPen oldPen = p->pen();
QPen aPen = oldPen;
p->strokePath( path, border );
}
-int Style_Tools::getMinDelta( const QRect& rect, QSize size, const int defDelta )
+int Style_Tools::getMinDelta( const QRect& rect, const QSize& size, const int defDelta )
{
int aDelta = defDelta;
- int height = rect.height(), width = rect.width();
- int aTmpDelta = (height - size.rheight())/2;
- if ( aTmpDelta < aDelta )
- aDelta = aTmpDelta;
- aTmpDelta = (width - size.width())/2;
- if ( aTmpDelta < aDelta )
- aDelta = aTmpDelta;
+ aDelta = qMin( aDelta, ( rect.height() - size.height() ) / 2 );
+ aDelta = qMin( aDelta, ( rect.width() - size.width() ) / 2 );
return aDelta;
}
int Style_Tools::getMaxRect( const QRect& rect, const int defRect )
{
int aRect = defRect;
- int height2 = (int)rect.height()/2, width2 = (int)rect.width()/2;
- if ( aRect > height2 )
- aRect = height2;
- if ( aRect > width2 )
- aRect = width2;
+ aRect = qMin( aRect, rect.height() / 2 );
+ aRect = qMin( aRect, rect.width() / 2 );
return aRect;
}
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-// File: Style_Tools.h
-// Author: Natalia Ermolaeva
+// File : Style_Tools.h
+// Author : Natalia Ermolaeva, Open CASCADE S.A.S.
+//
-#ifndef STYLE_TOOLS_HEADER
-#define STYLE_TOOLS_HEADER
+#ifndef STYLE_TOOLS_H
+#define STYLE_TOOLS_H
-#include <Style.h>
+#include "Style.h"
#include <QPainterPath>
#include <QRect>
#include <QColor>
BottomLeft = 0x00000020,
BottomRight = 0x00000040
} RoundType;
+
typedef enum { WholePath, BottomPath, TopPath } ShadowType;
typedef enum { SlUp, SlDown, SlLeft, SlRight, SlNone } SliderType;
- static QPainterPath painterPath( const QRect& r );
- static QPainterPath substractPath( const QPainterPath& fromPath, const QPainterPath& path );
+ static QPainterPath painterPath( const QRect& );
+ static QPainterPath substractPath( const QPainterPath&, const QPainterPath& );
+
+ static QPainterPath roundRect( const QRect&, const double, int = 0, int = 0 );
- static QPainterPath roundRect( const QRect& r, const double rad, int type = 0,
- int shType = 0 );
+ static void roundRect( QPainter*, const QRect&, const double, const int,
+ const QColor&, const QColor&, bool = true, bool = true );
- static void roundRect( QPainter* p, const QRect& r, const double rad, const int type,
- const QColor& c1, const QColor& c2, bool fill = true,
- bool antial = true );
- static void shadowRect( QPainter* p, const QRect& r, const double rad,
- const double marg, const int shad, int type,
- const QColor& light, const QColor& dark, const QColor& border_top,
- const QColor& border_bot, const bool antialize, const bool isButton,
- const bool btnOn = false, const bool fill = true );
- static void shadowCheck( QPainter* p, const QRect& r, const double rad, const int type,
- const QColor& light, const QColor& dark,
- const QColor& border_top, const QColor& border_bot );
- static void arrowRect( QPainter* p, const QRect& re, const QColor& frame,
- const QColor& gr1, const QColor& gr2 );
- static void fillRect( QPainter* p, const QRect& re, const QColor& _c1,
- const QColor& _c2, const int alpha = 255 );
- static void drawArrow( QStyle::PrimitiveElement type, QPainter* p, const QRect& r,
- const QColor& pen, const QColor& brush );
- static QPainterPath tabRect( QPainter* p, const QRect& r, const int position, const double rad,
- const double delta, const QColor& light, const QColor& dark,
- const QColor& border_top, const QColor& border_bot,
- const bool selected, const bool isLast, const bool isHover,
- const bool focusRect = false, const bool draw = true );
- static void drawFocus( QPainter* p, const QRect& aRect, const double rad, const int type,
- const QColor& border );
- static void drawFocus( QPainter* p, const QPainterPath& path, const QColor& border,
- const bool& line = true );
- static void drawSlider( QPainter* p, const QRect& r, const double rad,
- SliderType type, const QColor& light, const QColor& dark,
- const QColor& border_top, const QColor& border_bot );
- static void highlightRect( QPainter* p, const QRect& rect, const double rad, const int type,
- const double marg, const QColor& center, const QColor& out_center,
- const QColor& border );
- static int getMinDelta( const QRect& rect, QSize size, const int defDelta );
- static int getMaxRect( const QRect& rect, const int defRect );
+ static void shadowRect( QPainter*, const QRect&, const double,
+ const double, const int, int,
+ const QColor&, const QColor&, const QColor&,
+ const QColor&, const bool, const bool,
+ const bool = false, const bool = true );
+ static void shadowCheck( QPainter*, const QRect&, const double, const int,
+ const QColor&, const QColor&,
+ const QColor&, const QColor& );
+ static void arrowRect( QPainter*, const QRect&, const QColor&,
+ const QColor&, const QColor& );
+ static void fillRect( QPainter*, const QRect&, const QColor&,
+ const QColor&, const int = 255 );
+ static void drawArrow( QStyle::PrimitiveElement, QPainter*, const QRect&,
+ const QColor&, const QColor& );
+ static QPainterPath tabRect( QPainter*, const QRect&, const int, const double,
+ const double, const QColor&, const QColor&,
+ const QColor&, const QColor&,
+ const bool, const bool, const bool,
+ const bool = false, const bool = true );
+ static void drawFocus( QPainter*, const QRect&, const double, const int,
+ const QColor& );
+ static void drawFocus( QPainter*, const QPainterPath&, const QColor&,
+ const bool = true );
+ static void drawSlider( QPainter*, const QRect&, const double,
+ SliderType, const QColor&, const QColor&,
+ const QColor&, const QColor& );
+ static void highlightRect( QPainter*, const QRect&, const double, const int,
+ const double, const QColor&, const QColor&,
+ const QColor& );
+ static int getMinDelta( const QRect&, const QSize&, const int );
+ static int getMaxRect( const QRect&, const int );
};
-#endif
+#endif // STYLE_TOOLS_H