y = double( yPos );
aViewerCS->transform( *aEMFCS, x, y );
- const char* str = aText.toLatin1().data();
int nHeight = 35*14; // height of font
int nWidth = 35*12; // average character width
int nEscapement = 0; // angle of escapement
int nOrientation = 0; // base-line orientation angle
int fnWeight = FW_NORMAL; // font weight
- DWORD fdwItalic = FALSE; // italic attribute option
- DWORD fdwUnderline = FALSE; // underline attribute option
- DWORD fdwStrikeOut = FALSE; // strikeout attribute option
+ DWORD fdwItalic = false; // italic attribute option
+ DWORD fdwUnderline = false; // underline attribute option
+ DWORD fdwStrikeOut = false; // strikeout attribute option
DWORD fdwCharSet = ANSI_CHARSET; // character set identifier
DWORD fdwOutputPrecision = OUT_DEFAULT_PRECIS; // output precision
DWORD fdwClipPrecision = CLIP_DEFAULT_PRECIS; // clipping precision
HGDIOBJ old1 = SelectObject( dc, aFont );
HGDIOBJ old2 = SelectObject( dc, aBrush );
- TextOut( dc, x, y, str, aText.length() );
+ TextOut( dc, x, y, aText.toLatin1().constData(), aText.length() );
SelectObject ( dc, old1 );
SelectObject ( dc, old2 );
Qt::WindowStaysOnTopHint | Qt::FramelessWindowHint | Qt::Tool | Qt::X11BypassWindowManagerHint );
mypLabel->setObjectName("ObjectTipText");
mypLabel->setMargin( 1 );
- //mypLabel->setAutoMask( FALSE );
+ //mypLabel->setAutoMask( false );
mypLabel->setFrameStyle( QFrame::Plain | QFrame::Box );
mypLabel->setLineWidth( 1 );
mypLabel->setAlignment( Qt::AlignAbsolute | Qt::AlignTop );
ADD_EXECUTABLE(HelpBrowser ${HelpBrowser_SOURCES})
TARGET_LINK_LIBRARIES(HelpBrowser ${_link_LIBRARIES})
-INSTALL(TARGETS HelpBrowser EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_BINS})
\ No newline at end of file
+INSTALL(TARGETS HelpBrowser EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_BINS})
Qt::HANDLE mutex;
if (doCreate) {
- QT_WA( { mutex = CreateMutexW(NULL, FALSE, (LPCWSTR)mname.utf16()); },
- { mutex = CreateMutexA(NULL, FALSE, mname.toLocal8Bit().constData()); } );
+ QT_WA( { mutex = CreateMutexW(NULL, false, (LPCWSTR)mname.utf16()); },
+ { mutex = CreateMutexA(NULL, false, mname.toLocal8Bit().constData()); } );
if (!mutex) {
qErrnoWarning("QtLockedFile::lock(): CreateMutex failed");
return 0;
}
}
else {
- QT_WA( { mutex = OpenMutexW(SYNCHRONIZE | MUTEX_MODIFY_STATE, FALSE, (LPCWSTR)mname.utf16()); },
- { mutex = OpenMutexA(SYNCHRONIZE | MUTEX_MODIFY_STATE, FALSE, mname.toLocal8Bit().constData()); } );
+ QT_WA( { mutex = OpenMutexW(SYNCHRONIZE | MUTEX_MODIFY_STATE, false, (LPCWSTR)mname.utf16()); },
+ { mutex = OpenMutexA(SYNCHRONIZE | MUTEX_MODIFY_STATE, false, mname.toLocal8Bit().constData()); } );
if (!mutex) {
if (GetLastError() != ERROR_FILE_NOT_FOUND)
qErrnoWarning("QtLockedFile::lock(): OpenMutex failed");
}
if (rmutexes.size()) {
DWORD res = WaitForMultipleObjects(rmutexes.size(), rmutexes.constData(),
- TRUE, block ? INFINITE : 0);
+ true, block ? INFINITE : 0);
if (res != WAIT_OBJECT_0 && res != WAIT_ABANDONED) {
if (res != WAIT_TIMEOUT)
qErrnoWarning("QtLockedFile::lock(): WaitForMultipleObjects failed");
}
if(dwMap) {
- QList<QDockWidget*> dwList = qFindChildren<QDockWidget*>( desktop() );
+ QList<QDockWidget*> dwList = desktop()->findChildren<QDockWidget*>();
for ( QList<QDockWidget*>::iterator dit = dwList.begin(); dit != dwList.end(); ++dit )
{
QDockWidget* dw = *dit;
QList<QWidget*> wlist = createdWidgets();
for ( QList<QWidget*>::const_iterator wit = wlist.begin(); wit != wlist.end(); ++wit )
- lst += (*wit)->findChildren<QtxComboBox *>();
+ lst += (*wit)->findChildren<QtxComboBox*>();
return lst;
}
/*!
* \brief Constructor
*
-* Constructor sets myModule in NULL and myIsAutoResumed in TRUE
+* Constructor sets myModule in NULL and myIsAutoResumed in \c true
*/
LightApp_Operation::LightApp_Operation()
: SUIT_Operation( 0 ),
* Autoresume property is used during automatic resuming operation. If operation is
* suspended and cursor is moved above dialog of the operation then operation is resumed
* automatically (if possible). It can be resumed only program call otherwise (see
-* LightApp_SwitchOp for more description). This property is TRUE by default and may be
+* LightApp_SwitchOp for more description). This property is \c true by default and may be
* changed with setAutoResumed() method call.
*/
bool LightApp_Operation::isAutoResumed() const
/*!
\brief Checks whether the interactive operation is in progress.
- \return TRUE if the interaction is performed on IO object meaning
+ \return \c true if the interaction is performed on IO object meaning
that no other operations in viewer should be processed.
*/
bool OCCViewer_ClipPlaneInteractor::isPerforming() const
/*!
\brief Checks whether the interactive plane can be clicked.
- \return TRUE if the click interaction is supported for the plane.
+ \return \c true if the click interaction is supported for the plane.
*/
bool OCCViewer_ClipPlaneInteractor::isClickable( const Handle(AIS_Plane)& thePlane )
{
/*!
\brief Checks whether the interactive plane can be dragged.
- \return TRUE if the dragging interaction is supported for the plane.
+ \return \c true if the dragging interaction is supported for the plane.
*/
bool OCCViewer_ClipPlaneInteractor::isDraggable( const Handle(AIS_Plane)& thePlane )
{
#include <QtxActionToolMgr.h>
#include <QtxMultiAction.h>
-#include <QtGui>
#include <QLocale>
#include <QFileDialog>
#include <QMessageBox>
#include <QApplication>
+#include <QProcess>
#include <QStatusBar>
+#include <QTextStream>
/*!
\class PyViewer_ViewWindow
QString pattern = title.toLower();
QToolBar* res = 0;
- QList<QToolBar*> toolbars = mw->findChildren<QToolBar*>( );
+ QList<QToolBar*> toolbars = mw->findChildren<QToolBar*>();
for ( QList<QToolBar*>::iterator it = toolbars.begin(); it != toolbars.end() && !res; ++it )
{
if ( (*it)->windowTitle().toLower() == pattern )
if ( e->key() == Qt::Key_Tab && e->modifiers() & Qt::ControlModifier )
{
- QObject* tab = this->findChild<QTabWidget*>( );
+ QObject* tab = this->findChild<QTabWidget*>();
if ( tab && !property( "in_tab_event" ).toBool() ) {
setProperty( "in_tab_event", true );
QApplication::sendEvent( tab, e );
if ( !mw )
return;
- QList<QToolBar*> toolbars = mw->findChildren<QToolBar*>( );
+ QList<QToolBar*> toolbars = mw->findChildren<QToolBar*>();
for ( QList<QToolBar*>::iterator it = toolbars.begin(); it != toolbars.end(); ++it )
{
QToolBar* tb = *it;
if ( !mw )
return;
- QList<QDockWidget*> dockwidgets = mw->findChildren<QDockWidget*>( );
+ QList<QDockWidget*> dockwidgets = mw->findChildren<QDockWidget*>();
for ( QList<QDockWidget*>::iterator it = dockwidgets.begin(); it != dockwidgets.end(); ++it )
{
QDockWidget* dw = *it;
myMain->layout()->removeEventFilter( this );
}
- QTimer* t = myMain->layout()->findChild<QTimer*>( );
+ QTimer* t = myMain->layout()->findChild<QTimer*>();
if ( t ) {
if ( on )
t->installEventFilter( this );
myModWidget_layout->setMargin( 0 );
myClose = new QToolButton( myBtnWidget );
- myClose->setIcon( QIcon( QPixmap( close_xpm ) ) );
+ myClose->setIcon( QPixmap( close_xpm ) );
myClose->setAutoRaise( true );
myBtnWidget_layout->addWidget( wrapWidget( myBtnWidget, myClose ) );
connect( myClose, SIGNAL( clicked() ), this, SLOT( hide() ) );
myData->installEventFilter( this );
myToFirst = new QToolButton( myBtnWidget );
- myToFirst->setIcon( QIcon( QPixmap( first_xpm ) ) );
+ myToFirst->setIcon( QPixmap( first_xpm ) );
myToFirst->setAutoRaise( true );
myBtnWidget_layout->addWidget( wrapWidget( myBtnWidget, myToFirst ), 0 );
connect( myToFirst, SIGNAL( clicked() ), this, SLOT( findFirst() ) );
myToFirst->installEventFilter( this );
myPrev = new QToolButton( myBtnWidget );
- myPrev->setIcon( QIcon( QPixmap( prev_xpm ) ) );
+ myPrev->setIcon( QPixmap( prev_xpm ) );
myPrev->setAutoRaise( true );
myBtnWidget_layout->addWidget( wrapWidget( myBtnWidget, myPrev ), 0 );
connect( myPrev, SIGNAL( clicked() ), this, SLOT( findPrevious() ) );
myPrev->installEventFilter( this );
myNext = new QToolButton( myBtnWidget );
- myNext->setIcon( QIcon( QPixmap( next_xpm ) ) );
+ myNext->setIcon( QPixmap( next_xpm ) );
myNext->setAutoRaise( true );
myBtnWidget_layout->addWidget( wrapWidget( myBtnWidget, myNext ), 0 );
connect( myNext, SIGNAL( clicked() ), this, SLOT( findNext() ) );
myNext->installEventFilter( this );
myToLast = new QToolButton( myBtnWidget );
- myToLast->setIcon( QIcon( QPixmap( last_xpm ) ) );
+ myToLast->setIcon( QPixmap( last_xpm ) );
myToLast->setAutoRaise( true );
myBtnWidget_layout->addWidget( wrapWidget( myBtnWidget, myToLast ), 0 );
connect( myToLast, SIGNAL( clicked() ), this, SLOT( findLast() ) );
\param wid_to widget specified the destination area
\param before specifies whether the first widget has to be moved before or after
the second widget
- \return TRUE if operation is completed successfully, FALSE otherwise
+ \return \c true if operation is completed successfully, \c false otherwise
*/
bool QtxWorkstack::move( QWidget* wid, QWidget* wid_to, const bool before )
{
/*!
\brief Group all windows in one area
- \return TRUE if operation is completed successfully, FALSE otherwise
+ \return \c true if operation is completed successfully, \c false otherwise
*/
void QtxWorkstack::stack()
{
// Buttons for possibility of switching the variants of split
myButtonPrevious = new QPushButton( this );
- myButtonPrevious->setIcon( QIcon( QPixmap( prev_xpm ) ) );
+ myButtonPrevious->setIcon( QPixmap( prev_xpm ) );
myButtonPrevious->setAutoDefault(true);
myButtonPrevious->setEnabled( false );
myButtonNext = new QPushButton( this );
- myButtonNext->setIcon( QIcon( QPixmap( next_xpm ) ) );
+ myButtonNext->setIcon( QPixmap( next_xpm ) );
myButtonNext->setAutoDefault(true);
myButtonNext->setEnabled( false );
%Module SalomePyQtGUILight
-%Import QtGui/QtGuimod.sip
%Import QtCore/QtCoremod.sip
+%Import QtGui/QtGuimod.sip
%If (Qt_5_0_0 -)
%Import QtWidgets/QtWidgetsmod.sip
%End
%Feature ENABLE_CORBA
%Feature ENABLE_PLOT2D
-%Import QtGui/QtGuimod.sip
%Import QtCore/QtCoremod.sip
+%Import QtGui/QtGuimod.sip
%If (Qt_5_0_0 -)
%Import QtWidgets/QtWidgetsmod.sip
%End
onOpenDoc( aName );
}
-/*! \retval true, if document was opened successful, else false.*/
+/*! \retval \c true, if document was opened successful, else \c false.*/
bool STD_Application::onOpenDoc( const QString& aName )
{
if ( !abortAllOperations() )
}
/*!Check the application on closing.
- * \retval true if possible, else false
+ * \retval \c true if possible, else \c false
*/
bool STD_Application::isPossibleToClose( bool& closePermanently )
{
onSaveAsDoc();
}
-/*! \retval TRUE, if doument saved successful, else FALSE.*/
+/*! \retval \c true, if document saved successfully, else \c false.*/
bool STD_Application::onSaveAsDoc()
{
SUIT_Study* study = activeStudy();
}
}
-/*!\retval true, if document opened successful, else false.*/
+/*!\retval \c true, if document opened successfully, else \c false.*/
bool STD_Application::useFile(const QString& theFileName)
{
bool res = SUIT_Application::useFile( theFileName );
}
}
-/*!\retval TRUE, if view manager \a vm, already in view manager list (\a myViewMgrs).*/
+/*!\retval \c true, if view manager \a vm, already in view manager list (\a myViewMgrs).*/
bool STD_Application::containsViewManager( SUIT_ViewManager* vm ) const
{
return myViewMgrs.contains( vm );
setActiveViewManager( vm );
}
-/*!Sets status bar show, if \on = true, else status bar hide.*/
+/*!Shows status bar, if on is \c true, else hides status bar.*/
void STD_Application::onViewStatusBar( bool on )
{
if ( on )
}
/*! Add action to widget \a wid.
- *\retval TRUE - successful, FALSE - not successful.
+ *\retval true - successful, false - not successful.
*/
bool SUIT_ActionOperation::addTo( QWidget* wid )
{
}
/*!
- \return FALSE if application can not be closed (because of non saved data for example).
- This method called by SUIT_Session whin closing of application was requested.
+ \return \c false if application can not be closed (because of non saved data for example).
+ This method called by SUIT_Session when closing of application was requested.
*/
bool SUIT_Application::isPossibleToClose( bool& )
{
/*!
Show/hide menu item corresponding to action
\param a - action
- \param on - if it is true, the item will be shown, otherwise it will be hidden
+ \param on - if it is \c true, the item will be shown, otherwise it will be hidden
*/
void SUIT_Application::setMenuShown( QAction* a, const bool on )
{
/*!
Show/hide menu item corresponding to action
\param id - identificator of action in menu manager
- \param on - if it is true, the item will be shown, otherwise it will be hidden
+ \param on - if it is \c true, the item will be shown, otherwise it will be hidden
*/
void SUIT_Application::setMenuShown( const int id, const bool on )
{
/*!
Show/hide tool button corresponding to action
\param a - action
- \param on - if it is true, the button will be shown, otherwise it will be hidden
+ \param on - if it is \c true, the button will be shown, otherwise it will be hidden
*/
void SUIT_Application::setToolShown( QAction* a, const bool on )
{
/*!
Show/hide menu item corresponding to action
\param id - identificator of action in tool manager
- \param on - if it is true, the button will be shown, otherwise it will be hidden
+ \param on - if it is \c true, the button will be shown, otherwise it will be hidden
*/
void SUIT_Application::setToolShown( const int id, const bool on )
{
/*!
Show/hide both menu item and tool button corresponding to action
\param a - action
- \param on - if it is true, the item will be shown, otherwise it will be hidden
+ \param on - if it is \c true, the item will be shown, otherwise it will be hidden
*/
void SUIT_Application::setActionShown( QAction* a, const bool on )
{
/*!
Show/hide both menu item and tool button corresponding to action
\param id - identificator in both menu manager and tool manager
- \param on - if it is true, the item will be shown, otherwise it will be hidden
+ \param on - if it is \c true, the item will be shown, otherwise it will be hidden
*/
void SUIT_Application::setActionShown( const int id, const bool on )
{
\param tip - tool tip
\param key - shortcut
\param parent - parent object
- \param toggle - if it is TRUE the action will be a toggle action, otherwise it will be a command action
+ \param toggle - if it is \c true the action will be a toggle action, otherwise it will be a command action
\param reciever - object that contains slot
\param member - slot to be called when action is activated
*/
//! Returns main widget (Desktop) of the application (if it exists)
virtual SUIT_Desktop* desktop();
- /*! Returns FALSE if application can not be closed (because of non saved data for example).
+ /*! Returns \c false if application can not be closed (because of non saved data for example).
This method called by SUIT_Session whin closing of application was requested. */
virtual bool isPossibleToClose( bool& );
/*!
* Checks: Is key null?
- *\retval TRUE - if null, esle false.
+ *\retval \c true - if null, esle \c false.
*/
bool SUIT_DataObjectKeyHandle::isNull() const
{
/*!
* Operator less.
- *\retval boolean. TRUE - If current key less than \a kw.
+ *\retval boolean. \c true - If current key less than \a kw.
*/
bool SUIT_DataObjectKeyHandle::operator<( const SUIT_DataObjectKeyHandle& kw ) const
{
/*!
* Operator is equal.
- *\retval boolean. TRUE - If current key equal \a kw.
+ *\retval boolean. \c true - If current key equal \a kw.
*/
bool SUIT_DataObjectKeyHandle::operator==( const SUIT_DataObjectKeyHandle& kw ) const
{
* \brief Test the flags of operation
* \param f - flags of operation to be tested
*
-* Returns TRUE if the specified flags setted in the operation (see Flags enumeration)
+* Returns \c true if the specified flags setted in the operation (see Flags enumeration)
*/
bool SUIT_Operation::testFlags( const int f ) const
{
/*!
* \brief Verifies whether operator is ready to start.
- * \return TRUE if operation is ready to start
+ * \return \c true if operation is ready to start
*
-* Default implementation returns TRUE. Redefine this method to add own verifications
+* Default implementation returns \c true. Redefine this method to add own verifications
*/
bool SUIT_Operation::isReadyToStart() const
{
/*!
* \brief Sets slot which is called when operation is started
- * \param theReceiver - object containing slot
- * \param theSlot - slot of theReceiver object
- * \return TR if slot was connected successfully, FALSE otherwise
-*
-* Sets slot which is called when operation is started. There is no point in
-* using this method. It would be better to inherit own operator from base
-* one and redefine startOperation method
-*/
+ * \param theReceiver - object containing slot
+ * \param theSlot - slot of theReceiver object
+ * \return \c true if slot was connected successfully, \c false otherwise
+ *
+ * Sets slot which is called when operation is started. There is no point in
+ * using this method. It would be better to inherit own operator from base
+ * one and redefine startOperation method
+ */
bool SUIT_Operation::setSlot( const QObject* theReceiver, const char* theSlot )
{
return connect( this, SIGNAL( callSlot() ), theReceiver, theSlot );
/*!
* \brief Verifies whether given operator is valid for this one
* \param theOtherOp - other operation
- * \return Returns TRUE if the given operator is valid for this one
+ * \return Returns \c true if the given operator is valid for this one
*
* Verifies whether given operator is valid for this one (i.e. can be started "above"
* this operator)
/*!
* \brief Verifies whether this operator can be always started above any already runnig one
- * \return Returns TRUE if current operation must not be checked for ActiveOperation->IsValid( this )
+ * \return Returns \c true if current operation must not be checked for ActiveOperation->IsValid( this )
*
* This method must be redefined in derived operation if operation of derived class
-* must be always can start above any launched one. Default implementation returns FALSE,
+* must be always can start above any launched one. Default implementation returns \c false,
* so it is being checked for IsValid, but some operations may overload IsGranted()
* In this case they will always start, no matter what operation is running.
*/
/*!
* \brief Verifies whether operation is an runned one (state()==Running)
- * \return TRUE if operation is active, FALSE otherwise
+ * \return \c true if operation is active, \c false otherwise
*
-* Verifies whether operation is an running. Returns TRUE if state of operator
+* Verifies whether operation is an running. Returns \c true if state of operator
* is Running
*/
bool SUIT_Operation::isRunning() const
/*!
* \brief Verifies whether operation is an active for study.
- * \return TRUE if operation is active, FALSE otherwise
+ * \return \c true if operation is active, \c false otherwise
*
-* Verifies whether operation is an active on. Returns TRUE if this operator
+* Verifies whether operation is an active on. Returns \c true if this operator
* is active for study
*/
bool SUIT_Operation::isActive() const
}
/*!
- * \brief Returns TRUE if transaction is opened.
+ * \brief Returns \c true if transaction is opened.
*/
bool SUIT_Operation::hasTransaction() const
{
}
/*!
- *\retval TRUE - if study saved, else FALSE.
+ *\retval \c true - if study saved, else \c false.
*/
bool SUIT_Study::isSaved() const
{
}
/*!
- *\retval TRUE - if study modified, else FALSE.
+ *\retval \c true - if study modified, else \c false.
*/
bool SUIT_Study::isModified() const
{
}
/*!
- * Open document. Sets file name. return true.
+ * Open document. Sets file name. return \c true.
*/
bool SUIT_Study::openDocument( const QString& fileName )
{
}
/*!
- *\retval TRUE - if document saved successful, else FALSE.
+ *\retval \c true - if document saved successful, else \c false.
*/
bool SUIT_Study::saveDocument()
{
/*!
* \brief Starts operation
* \param theOp - operation to be started
- * \param toCheck - if parameters is equal TRUE then checking performed whether
+ * \param toCheck - if parameters is equal \c true then checking performed whether
* all already started operations allow to start this operation above them (default
- * value is TRUE
- * \return TRUE if operation is started, FALSE otherwise
+ * value is \c true
+ * \return \c true if operation is started, \c false otherwise
*
* Verifies whether theOp operation can be started above already started ones (if toCheck
-* parameter is equal TRUE) and starts it
+* parameter is equal \c true) and starts it
*/
bool SUIT_Study::start( SUIT_Operation* theOp, const bool toCheck )
{
/*!
* \brief Aborts operation
* \param theOp - operation to be aborted
- * \return TRUE if operation is aborted successfully
+ * \return \c true if operation is aborted successfully
*
* Verifies whether operation already started and aborts it in this case (sets execution
* status to Rejected and stops operation)
/*!
* \brief Commits operation
* \param theOp - operation to be committed
- * \return TRUE if operation is committed successfully
+ * \return \c true if operation is committed successfully
*
* Verifies whether operation already started and commits it in this case (sets execution
* status to Accepted and stops operation)
/*!
* \brief Commits operation
* \param theOp - operation to be committed
- * \return TRUE if operation is suspended successfully
+ * \return \c true if operation is suspended successfully
*
* Verifies whether operation already started and suspends it in this case. Operations
* ususlly are suspended to start other one above them.
/*!
* \brief Resumes operation
* \param theOp - operation to be resumed
- * \return TRUE if operation is aborted successfully
+ * \return \c true if operation is aborted successfully
*
* Verifies whether operation already started but suspended and resumesit in this case.
*/
}
/*!
- * \brief Returns TRUE if transaction is opened.
+ * \brief Returns \c true if transaction is opened.
*/
bool SUIT_Study::hasTransaction() const
{
for (int i = 1; i < qApp->arguments().size(); i++) {
QRegExp rxs ("--study-hdf=(.+)");
- if ( rxs.indexIn( QString(qApp->arguments()[i]) ) >= 0 && rxs.capturedTexts().count() > 1 ) {
+ if ( rxs.indexIn( qApp->arguments()[i] ) >= 0 && rxs.capturedTexts().count() > 1 ) {
QString file = rxs.capturedTexts()[1];
QFileInfo fi ( file );
QString extension = fi.suffix().toLower();
}
else {
QRegExp rxp ("--pyscript=\\[(.+)\\]");
- if ( rxp.indexIn( QString(qApp->arguments()[i]) ) >= 0 && rxp.capturedTexts().count() > 1 ) {
+ if ( rxp.indexIn( qApp->arguments()[i] ) >= 0 && rxp.capturedTexts().count() > 1 ) {
// pyscript
QStringList dictList = rxp.capturedTexts()[1].split("},", QString::SkipEmptyParts);
for (int k = 0; k < dictList.count(); ++k) {
+++ /dev/null
-# -*- coding: utf-8 -*-
-# Copyright (C) 2012-2015 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-
-# Form implementation generated from reading ui file 'minmax.ui'
-#
-# Created: Thu Mar 1 15:23:57 2012
-# by: PyQt4 UI code generator 4.8.1
-#
-# WARNING! All changes made in this file will be lost!
-
-from PyQt4 import QtCore, QtGui
-
-try:
- _fromUtf8 = QtCore.QString.fromUtf8
-except AttributeError:
- _fromUtf8 = lambda s: s
-
-class Ui_Dialog(object):
- def setupUi(self, Dialog):
- Dialog.setObjectName(_fromUtf8("Dialog"))
- Dialog.resize(178, 156)
- Dialog.setSizeGripEnabled(True)
- self.gridLayout = QtGui.QGridLayout(Dialog)
- self.gridLayout.setObjectName(_fromUtf8("gridLayout"))
- self.label_2 = QtGui.QLabel(Dialog)
- self.label_2.setObjectName(_fromUtf8("label_2"))
- self.gridLayout.addWidget(self.label_2, 0, 0, 1, 1)
- self.mesh = QtGui.QLineEdit(Dialog)
- self.mesh.setReadOnly(True)
- self.mesh.setObjectName(_fromUtf8("mesh"))
- self.gridLayout.addWidget(self.mesh, 0, 1, 1, 2)
- self.label_3 = QtGui.QLabel(Dialog)
- self.label_3.setObjectName(_fromUtf8("label_3"))
- self.gridLayout.addWidget(self.label_3, 1, 0, 1, 1)
- self.control = QtGui.QComboBox(Dialog)
- self.control.setObjectName(_fromUtf8("control"))
- self.gridLayout.addWidget(self.control, 1, 1, 1, 2)
- self.label = QtGui.QLabel(Dialog)
- self.label.setObjectName(_fromUtf8("label"))
- self.gridLayout.addWidget(self.label, 2, 0, 1, 1)
- self.minvalue = QtGui.QLineEdit(Dialog)
- self.minvalue.setReadOnly(True)
- self.minvalue.setObjectName(_fromUtf8("minvalue"))
- self.gridLayout.addWidget(self.minvalue, 2, 1, 1, 2)
- self.label_4 = QtGui.QLabel(Dialog)
- self.label_4.setObjectName(_fromUtf8("label_4"))
- self.gridLayout.addWidget(self.label_4, 3, 0, 1, 1)
- self.maxvalue = QtGui.QLineEdit(Dialog)
- self.maxvalue.setReadOnly(True)
- self.maxvalue.setObjectName(_fromUtf8("maxvalue"))
- self.gridLayout.addWidget(self.maxvalue, 3, 1, 1, 2)
- self.buttonBox = QtGui.QDialogButtonBox(Dialog)
- self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
- self.buttonBox.setStandardButtons(QtGui.QDialogButtonBox.Close|QtGui.QDialogButtonBox.Help)
- self.buttonBox.setObjectName(_fromUtf8("buttonBox"))
- self.gridLayout.addWidget(self.buttonBox, 4, 0, 1, 3)
-
- self.retranslateUi(Dialog)
- QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(_fromUtf8("rejected()")), Dialog.OnCancel)
- QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(_fromUtf8("helpRequested()")), Dialog.helpMessage)
- QtCore.QObject.connect(self.control, QtCore.SIGNAL(_fromUtf8("activated(QString)")), Dialog.compute_minmax)
- QtCore.QMetaObject.connectSlotsByName(Dialog)
- Dialog.setTabOrder(self.mesh, self.control)
- Dialog.setTabOrder(self.control, self.minvalue)
- Dialog.setTabOrder(self.minvalue, self.maxvalue)
- Dialog.setTabOrder(self.maxvalue, self.buttonBox)
-
- def retranslateUi(self, Dialog):
- Dialog.setWindowTitle(QtGui.QApplication.translate("Dialog", "Get min and max value of control", None, QtGui.QApplication.UnicodeUTF8))
- self.label_2.setText(QtGui.QApplication.translate("Dialog", "Mesh", None, QtGui.QApplication.UnicodeUTF8))
- self.label_3.setText(QtGui.QApplication.translate("Dialog", "Control", None, QtGui.QApplication.UnicodeUTF8))
- self.label.setText(QtGui.QApplication.translate("Dialog", "Min", None, QtGui.QApplication.UnicodeUTF8))
- self.label_4.setText(QtGui.QApplication.translate("Dialog", "Max", None, QtGui.QApplication.UnicodeUTF8))
-
switch ( type )
{
case QtDebugMsg:
- //MESSAGE( "Debug: " << qPrintable(msg) );
+#ifdef QT_DEBUG_MESSAGE
+ MESSAGE( "Debug: " << qPrintable( QString(msg) ) );
+#endif
break;
case QtWarningMsg:
- MESSAGE( "Warning: " << qPrintable(msg) );
+ MESSAGE( "Warning: " << qPrintable( QString(msg) ) );
break;
case QtFatalMsg:
- MESSAGE( "Fatal: " << qPrintable(msg) );
+ MESSAGE( "Fatal: " << qPrintable( QString(msg) ) );
break;
}
}
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-#include <QtGui>
#include <QInputDialog>
+#include <QContextMenuEvent>
#include "mainwindow.hxx"
#include "TreeModel.hxx"
// Author: Guillaume Boulant (EDF/R&D)
-#include <QtGui>
-
#include "TreeItem.hxx"
#include "TreeModel.hxx"
* call virtual method IsValid( const int theId ).
* \param theActor - actor
* \param theCellId - cell id.
- * \retval TRUE - if cell id is valid, else false.
+ * \retval \c true - if cell id is valid, else \c false.
*/
bool VTKViewer_Filter::IsValid( VTKViewer_Actor* theActor, const int theCellId )
{
}
-/*!\retval TRUE if needs redrawing*/
+/*!\retval \c true if needs redrawing*/
bool VTKViewer_InteractorStyle::needsRedrawing()
{
return State == VTK_INTERACTOR_STYLE_CAMERA_ZOOM ||
/*!Checks: is valid cell(node) with id \a theId in actor \a theActor.
*\param theActor - VTKViewer_Actor pointer.
*\param theId - cell id.
- *\param theIsNode - boolean flag, if true - node, else - cell.
+ *\param theIsNode - boolean flag, if \c true - node, else - cell.
*/
bool VTKViewer_InteractorStyle::IsValid( VTKViewer_Actor* theActor,
const int theId,
//
#include "GenericDialog.h"
+#include <QDebug>
-GenericDialog::GenericDialog(QDialog *parent) : QDialog(parent)
+GenericDialog::GenericDialog(QDialog* parent) : QDialog(parent)
{
ui.setupUi(this); // A faire en premier
// buttonbox (inherited features)
}
-QFrame * GenericDialog::getPanel() {
+QFrame* GenericDialog::getPanel() {
return ui.centralPanel;
}
-QDialogButtonBox * GenericDialog::getButtonBox() {
+QDialogButtonBox* GenericDialog::getButtonBox() {
return ui.buttonBox;
}
-
-#include <QDebug>
void GenericDialog::accept() {
qDebug() << "accept() is not implemented yet";
QDialog::accept();
#ifndef _GenericDialog_HXX
#define _GenericDialog_HXX
-#include <QtGui>
+#include <QDialog>
+
#include "ui_GenericDialog.h"
+class QFrame;
+class QDialogButtonBox;
+
class GenericDialog : public QDialog
{
Q_OBJECT
-
+
public:
- GenericDialog(QDialog *parent = 0);
+ GenericDialog(QDialog* parent = 0);
- protected:
- QFrame * getPanel();
+protected:
+ QFrame* getPanel();
QDialogButtonBox * getButtonBox();
-
- protected slots:
- void accept();
- //void reject();
-
- private:
+
+protected slots:
+ void accept();
+
+private:
Ui_GenericDialog ui; // instance of the class defined in ui_GenericDialog.h
};
#include "__CLASSNAME__.h"
-__CLASSNAME__::__CLASSNAME__(QDialog *parent) : GenericDialog(parent)
+__CLASSNAME__::__CLASSNAME__(QDialog* parent) : GenericDialog(parent)
{
ui.setupUi(this->getPanel());
}
#ifndef ___CLASSNAME___HXX
#define ___CLASSNAME___HXX
-#include <QtGui>
#include "ui___CLASSNAME__.h"
#include "GenericDialog.h"
class __CLASSNAME__ : public GenericDialog
{
Q_OBJECT
-
- public:
- __CLASSNAME__(QDialog *parent = 0);
-
- private:
+
+public:
+ __CLASSNAME__(QDialog* parent = 0);
+
+private:
Ui___CLASSNAME__ ui; // instance of the class defined in ui___CLASSNAME__.hxx
};
#include "__CLASSNAME__.h"
+#include <QDebug>
-__CLASSNAME__::__CLASSNAME__(QDialog *parent) : QDialog(parent)
+__CLASSNAME__::__CLASSNAME__(QDialog* parent) : QDialog(parent)
{
ui.setupUi(this); // A faire en premier
// buttonbox (inherited features)
}
-#include <QDebug>
void __CLASSNAME__::accept() {
qDebug() << "accept() is not implemented yet";
QDialog::accept();
#ifndef ___CLASSNAME___HXX
#define ___CLASSNAME___HXX
-#include <QtGui>
+#include <QDialog>
+
#include "ui___CLASSNAME__.h"
class __CLASSNAME__ : public QDialog
{
Q_OBJECT
-
- public:
- __CLASSNAME__(QDialog *parent = 0);
-
- protected slots:
- void accept();
- //void reject();
-
- private:
+
+public:
+ __CLASSNAME__(QDialog* parent = 0);
+
+protected slots:
+ void accept();
+
+private:
Ui___CLASSNAME__ ui; // instance of the class defined in ui___CLASSNAME__.hxx
};
// (gboulant - 12/10/2010)
//
#include <QApplication>
-#include <QtGui>
#include "GDialogTest.h"
void TEST_show() {
- GDialogTest * dialog = new GDialogTest();
+ GDialogTest* dialog = new GDialogTest();
dialog->show();
}
-int main(int argc, char *argv[])
+int main(int argc, char* argv[])
{
QApplication app(argc, argv);
TEST_show();
// (gboulant - 12/10/2010)
//
#include <QApplication>
-#include <QtGui>
#include "QDialogTest.h"
void TEST_show() {
- QDialogTest * dialog = new QDialogTest();
+ QDialogTest* dialog = new QDialogTest();
dialog->show();
}
-int main(int argc, char *argv[])
+int main(int argc, char* argv[])
{
QApplication app(argc, argv);
TEST_show();