virtual TreeModel_ItemBasePtr createChild (int theRow, int theColumn) Standard_OVERRIDE;
//! Initializes the current item. It creates a backup of the specific item information
- virtual void initItem() const {}
+ virtual void initItem() const Standard_OVERRIDE {}
protected:
#include <QWidget>
#include <Standard_WarningsRestore.hxx>
-const int DEFAULT_COLUMN_WIDTH = 500;
-const int DEFAULT_ICON_SIZE = 40;
+static const int DEFAULT_ICON_SIZE = 40;
// =======================================================================
// function : Constructor
//! Returns flags for the item: ItemIsEnabled | Qt::ItemIsSelectable
//! \param theIndex a model index
//! \return flags
- Qt::ItemFlags flags (const QModelIndex& theIndex) const
+ virtual Qt::ItemFlags flags (const QModelIndex& theIndex) const Standard_OVERRIDE
{ return theIndex.isValid() ? Qt::ItemIsEnabled | Qt::ItemIsSelectable : Qt::NoItemFlags; }
private:
: TreeModel_ItemBase (theParent, theRow, theColumn), myIsCurrentItem (false) {}
//! Initializes the current item. It creates a backup of the specific item information
- void initItem() const;
+ virtual void initItem() const Standard_OVERRIDE;
//! Returns number of children attributes, initializes item is necessary
int getRowCount() const;
#include <QWidget>
#include <Standard_WarningsRestore.hxx>
-const int COLUMN_EXPORT_WIDTH = 20;
-const int COLUMN_TYPE_WIDTH = 70;
-const int COLUMN_POINTER_WIDTH = 110;
-const int COLUMN_REFERENCE_WIDTH = 90;
-const int COLUMN_EVOLUTION_WIDTH = 90;
+static const int COLUMN_EXPORT_WIDTH = 20;
// =======================================================================
// function : Constructor
//! Initializes the content of the pane by the parameter attribute
//! \param theAttribute an OCAF attribute
- Standard_EXPORT void Init (const Handle(TDF_Attribute)& theAttribute);
+ Standard_EXPORT virtual void Init (const Handle(TDF_Attribute)& theAttribute) Standard_OVERRIDE;
//! Returns information for the given attribute
//! \param theAttribute a current attribute
protected:
//! Defines widths of table columns
//! \return container of widths
- Standard_EXPORT virtual QMap<int, int> getTableColumnWidths() const;
+ Standard_EXPORT virtual QMap<int, int> getTableColumnWidths() const Standard_OVERRIDE;
};
#include <QWidget>
#include <Standard_WarningsRestore.hxx>
-static const int DEFAULT_ROW_HEIGHT = 30;
-
// =======================================================================
// function : Constructor
// purpose :
//! Returns data value for the role.
//! \param theItemRole a value role
//! \return the value
- virtual QVariant initValue(const int theItemRole) const;
+ virtual QVariant initValue(const int theItemRole) const Standard_OVERRIDE;
//! \return number of children.
virtual int initRowCount() const Standard_OVERRIDE { return myShapes.Size(); }
//! Returns data value for the role.
//! \param theRole a value role
//! \return the value
- Standard_EXPORT virtual QVariant initValue(const int theRole) const;
+ Standard_EXPORT virtual QVariant initValue(const int theRole) const Standard_OVERRIDE;
//! \return number of children.
Standard_EXPORT virtual int initRowCount() const Standard_OVERRIDE;
#include <QToolButton>
#include <Standard_WarningsRestore.hxx>
-const int FONT_POINT_SIZE = 18;
-const int ICON_SIZE = 40;
+static const int ICON_SIZE = 40;
-const int OPEN_DIALOG_WIDTH = 550;
-const int OPEN_DIALOG_HEIGHT = 200;
+static const int OPEN_DIALOG_WIDTH = 550;
+static const int OPEN_DIALOG_HEIGHT = 200;
-const int MARGIN_DIALOG = 4;
-const int SPACING_DIALOG = 2;
+static const int MARGIN_DIALOG = 4;
+static const int SPACING_DIALOG = 2;
// =======================================================================
// function : StartButton
#include <QVBoxLayout>
#include <Standard_WarningsRestore.hxx>
-const int DEFAULT_TEXT_VIEW_WIDTH = 800;
-const int DEFAULT_TEXT_VIEW_HEIGHT = 700;
-const int DEFAULT_TEXT_VIEW_POSITION_X = 430;
-const int DEFAULT_TEXT_VIEW_POSITION_Y = 30;
-const int DEFAULT_TEXT_VIEW_DELTA = 100;
-
-const int DEFAULT_SHAPE_VIEW_WIDTH = 900;
-const int DEFAULT_SHAPE_VIEW_HEIGHT = 450;
-const int DEFAULT_SHAPE_VIEW_POSITION_X = 60;
-const int DEFAULT_SHAPE_VIEW_POSITION_Y = 60;
-
-const int SHAPEVIEW_DEFAULT_TREE_VIEW_WIDTH = 600;
-const int SHAPEVIEW_DEFAULT_TREE_VIEW_HEIGHT = 500;
-
-const int SHAPEVIEW_DEFAULT_VIEW_WIDTH = 300;
-const int SHAPEVIEW_DEFAULT_VIEW_HEIGHT = 1000;
+static const int DEFAULT_SHAPE_VIEW_WIDTH = 900;
+static const int DEFAULT_SHAPE_VIEW_HEIGHT = 450;
+static const int DEFAULT_SHAPE_VIEW_POSITION_X = 60;
+static const int DEFAULT_SHAPE_VIEW_POSITION_Y = 60;
+
+static const int SHAPEVIEW_DEFAULT_TREE_VIEW_WIDTH = 600;
+static const int SHAPEVIEW_DEFAULT_TREE_VIEW_HEIGHT = 500;
+
+static const int SHAPEVIEW_DEFAULT_VIEW_WIDTH = 300;
+static const int SHAPEVIEW_DEFAULT_VIEW_HEIGHT = 1000;
// =======================================================================
// function : Constructor
#include <QWidget>
#include <Standard_WarningsRestore.hxx>
-const int FONT_POINT_SIZE = 18;
-const int ICON_SIZE = 40;
+static const int ICON_SIZE = 40;
-const int OPEN_DIALOG_WIDTH = 550;
-const int OPEN_DIALOG_HEIGHT = 200;
+static const int OPEN_DIALOG_WIDTH = 550;
+static const int OPEN_DIALOG_HEIGHT = 200;
-const int MARGIN_DIALOG = 4;
-const int SPACING_DIALOG = 2;
+static const int MARGIN_DIALOG = 4;
+static const int SPACING_DIALOG = 2;
-const int RECENT_FILES_CACHE_SIZE = 10;
+static const int RECENT_FILES_CACHE_SIZE = 10;
TInspector_Communicator* MyCommunicator;
QTextStream aTextStream (&aFile);
QStringList aDocumentStr = aDomDocument.toString().split ("\n");
for (QStringList::ConstIterator aContentIt = aDocumentStr.begin(); aContentIt != aDocumentStr.end(); ++aContentIt)
- aTextStream << *aContentIt << endl;
+ {
+ aTextStream << *aContentIt << '\n';
+ }
aFile.close();
}
protected:
//! Returns stream value of the item to fulfill property panel.
//! \return stream value or dummy
- Standard_EXPORT virtual void initStream (Standard_OStream& theOStream) const;
+ Standard_EXPORT virtual void initStream (Standard_OStream& theOStream) const Standard_OVERRIDE;
//! Initializes the current item. It creates a backup of the specific item information
//! Does nothing as context has been already set into item
Qt::ItemFlags TreeModel_ModelBase::flags (const QModelIndex& theIndex) const
{
if (!theIndex.isValid())
- return 0;
+ {
+ return Qt::ItemFlags();
+ }
return Qt::ItemIsEnabled | Qt::ItemIsSelectable;
}
//! \param theColumn a model index column
//! \param theRole a view role
//! \return true if the value is changed
- virtual bool SetData (const int theRow, const int theColumn, const QVariant& theValue, int)
+ virtual bool SetData (const int theRow, const int theColumn, const QVariant& theValue, int) Standard_OVERRIDE
{
if (theColumn != 1 || theRow < 2 || theRow > 5)
return false;
//! Returns editable flag for color RGB and alpha rows
//! \return flags
- Qt::ItemFlags Flags (const QModelIndex& theIndex) const
+ virtual Qt::ItemFlags Flags (const QModelIndex& theIndex) const Standard_OVERRIDE
{
Qt::ItemFlags aFlags = ViewControl_TableModelValues::Flags (theIndex);
//! Returns flags for the item: ItemIsEnabled | Qt::ItemIsSelectable
//! \param theIndex a model index
//! \return flags
- Qt::ItemFlags flags (const QModelIndex& theIndex) const
+ virtual Qt::ItemFlags flags (const QModelIndex& theIndex) const Standard_OVERRIDE
{ return myModelValues ? myModelValues->Flags (theIndex) : Qt::NoItemFlags; }
private: