myAreaRect->hide();
}
-
/*
- \class CloseButton
+ \class QtxWorkstackAreaTitleButton
\brief Workstack area close button.
\internal
*/
-class CloseButton : public QAbstractButton
-{
-public:
- CloseButton( QWidget* );
-
- QSize sizeHint() const;
- QSize minimumSizeHint() const;
-
- void enterEvent( QEvent* );
- void leaveEvent( QEvent* );
- void paintEvent( QPaintEvent* );
-};
/*!
\brief Constructor
\internal
\param parent parent widget
*/
-CloseButton::CloseButton( QWidget* parent )
+QtxWorkstackAreaTitleButton::QtxWorkstackAreaTitleButton( QWidget* parent )
: QAbstractButton( parent )
{
setFocusPolicy( Qt::NoFocus );
\internal
\return size value
*/
-QSize CloseButton::sizeHint() const
+QSize QtxWorkstackAreaTitleButton::sizeHint() const
{
ensurePolished();
int dim = 0;
\internal
\return minimum size value
*/
-QSize CloseButton::minimumSizeHint() const
+QSize QtxWorkstackAreaTitleButton::minimumSizeHint() const
{
return sizeHint();
}
\internal
\param event mouse enter event
*/
-void CloseButton::enterEvent( QEvent *event )
+void QtxWorkstackAreaTitleButton::enterEvent( QEvent *event )
{
if ( isEnabled() )
update();
\internal
\param event mouse leave event
*/
-void CloseButton::leaveEvent( QEvent *event )
+void QtxWorkstackAreaTitleButton::leaveEvent( QEvent *event )
{
if( isEnabled() )
update();
\internal
\param event paint event
*/
-void CloseButton::paintEvent( QPaintEvent* )
+void QtxWorkstackAreaTitleButton::paintEvent( QPaintEvent* )
{
QPainter p( this );
myBar = new QtxWorkstackTabBar( top );
tl->addWidget( myBar, 1 );
- CloseButton* close = new CloseButton( top );
+ QtxWorkstackAreaTitleButton* close = new QtxWorkstackAreaTitleButton( top );
close->setIcon( style()->standardIcon( QStyle::SP_TitleBarCloseButton ) );
myClose = close;
tl->addWidget( myClose );
#include <QTabBar>
#include <QEvent>
#include <QMap>
+#include <QAbstractButton>
class QAction;
class QSplitter;
friend class QtxWorkstackDrag;
};
+class QtxWorkstackAreaTitleButton : public QAbstractButton
+{
+ Q_OBJECT
+public:
+ QtxWorkstackAreaTitleButton( QWidget* );
+
+ QSize sizeHint() const;
+ QSize minimumSizeHint() const;
+
+ void enterEvent( QEvent* );
+ void leaveEvent( QEvent* );
+ void paintEvent( QPaintEvent* );
+};
+
class QtxWorkstackArea : public QFrame
{
Q_OBJECT