myStatusBar( 0 ),
myOpaque( true ),
myResizer( 0 ),
- myMouseMove( 0 )
+ myMouseMove( 0 ),
+ myResizerEnabled( true )
{
}
myOpaque = on;
}
+/*!
+ \brief Returns whether a resizer is enabled or not
+ \return boolean flag
+ */
+bool QtxMainWindow::isResizerEnabled() const
+{
+ return myResizerEnabled;
+}
+
+/*!
+ \brief Sets a flag that controls whether a resizer is enabled or not
+ \param on boolean flag
+ */
+void QtxMainWindow::setResizerEnabled( bool on )
+{
+ myResizerEnabled = on;
+}
+
+
/*!
\brief Dump main window geometry to the string.
\return string represenation of the window geometry
QMouseEvent* me = static_cast<QMouseEvent*>( e );
myResizer->setFinalEvent( new QMouseEvent( me->type(), me->pos(), me->globalPos(),
me->button(), me->buttons(), me->modifiers() ) );
- myResizer = 0;
+ if(myResizer) {
+ delete myResizer;
+ myResizer = 0;
+ }
return true;
}
}
if ( status ) {
QMouseEvent* me = static_cast<QMouseEvent*>( e );
- myResizer = new Resizer( me->globalPos(), o, this );
+ if(myResizerEnabled)
+ myResizer = new Resizer( me->globalPos(), o, this );
+ else {
+ if(myResizer) {
+ delete myResizer;
+ myResizer = 0;
+ }
+ }
}
}
}
bool isOpaqueResize() const;
void setOpaqueResize( bool );
+ bool isResizerEnabled() const;
+ void setResizerEnabled( bool );
+
bool isDockableMenuBar() const;
void setDockableMenuBar( const bool );
bool myOpaque;
Resizer* myResizer;
QMouseEvent* myMouseMove;
+
+ bool myResizerEnabled;
};
#endif // QTXMAINWINDOW_H