Commit 3ee719e0 authored by Dirk Wilden's avatar Dirk Wilden

removed warnings

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@10628 383ad7c9-94d9-4d36-a494-682f7c89f535
parent eb85b89d
...@@ -83,7 +83,7 @@ class Type { ...@@ -83,7 +83,7 @@ class Type {
virtual bool hasWidget () { return false; }; virtual bool hasWidget () { return false; };
/// Returns the configuration widget /// Returns the configuration widget
virtual TypeWidget *widget (QMap<QString, QString> _hints, QString _typeName, QWidget *_parent = NULL) { return 0; }; virtual TypeWidget *widget (QMap<QString, QString> /*_hints*/, QString /*_typeName*/, QWidget */*_parent*/ = NULL) { return 0; };
protected: protected:
QStringList types_; QStringList types_;
......
...@@ -53,7 +53,7 @@ namespace VSI { ...@@ -53,7 +53,7 @@ namespace VSI {
//============================================================================= //=============================================================================
/// Constructor /// Constructor
TypeWidget::TypeWidget(QMap< QString, QString > &_hints, QString _typeName, QWidget* _parent) : TypeWidget::TypeWidget(QMap< QString, QString > &/*_hints*/, QString /*_typeName*/, QWidget* _parent) :
QWidget (_parent) QWidget (_parent)
{ {
} }
......
...@@ -107,7 +107,7 @@ Arrow::~Arrow () ...@@ -107,7 +107,7 @@ Arrow::~Arrow ()
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// make the widget opaque if the mouse is over it // make the widget opaque if the mouse is over it
void Arrow::hoverEnterEvent (QGraphicsSceneHoverEvent *_event) void Arrow::hoverEnterEvent (QGraphicsSceneHoverEvent */*_event*/)
{ {
setOpacity (1.0); setOpacity (1.0);
} }
...@@ -115,7 +115,7 @@ void Arrow::hoverEnterEvent (QGraphicsSceneHoverEvent *_event) ...@@ -115,7 +115,7 @@ void Arrow::hoverEnterEvent (QGraphicsSceneHoverEvent *_event)
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// make the widget transparent if the mouse leaves it // make the widget transparent if the mouse leaves it
void Arrow::hoverLeaveEvent (QGraphicsSceneHoverEvent *_event) void Arrow::hoverLeaveEvent (QGraphicsSceneHoverEvent */*_event*/)
{ {
setOpacity ((highlight_)? 0.5 : 0.2); setOpacity ((highlight_)? 0.5 : 0.2);
} }
...@@ -266,7 +266,7 @@ void Arrow::setGeometry (const QRectF &_rect) ...@@ -266,7 +266,7 @@ void Arrow::setGeometry (const QRectF &_rect)
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// return size information for layouting // return size information for layouting
QSizeF Arrow::sizeHint (Qt::SizeHint _which, const QSizeF &_constraint) const QSizeF Arrow::sizeHint (Qt::SizeHint _which, const QSizeF &/*_constraint*/) const
{ {
QSizeF sh; QSizeF sh;
switch (_which) { switch (_which) {
......
...@@ -61,6 +61,7 @@ class GraphicsScene; ...@@ -61,6 +61,7 @@ class GraphicsScene;
class Arrow : public QObject, public QGraphicsPixmapItem, public QGraphicsLayoutItem class Arrow : public QObject, public QGraphicsPixmapItem, public QGraphicsLayoutItem
{ {
Q_OBJECT Q_OBJECT
Q_INTERFACES(QGraphicsLayoutItem)
public: public:
......
...@@ -94,7 +94,7 @@ Button::~Button () ...@@ -94,7 +94,7 @@ Button::~Button ()
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// glow on mouse enter // glow on mouse enter
void Button::hoverEnterEvent (QGraphicsSceneHoverEvent *_event) void Button::hoverEnterEvent (QGraphicsSceneHoverEvent */*_event*/)
{ {
glow_ = true; glow_ = true;
update (); update ();
...@@ -108,7 +108,7 @@ void Button::hoverEnterEvent (QGraphicsSceneHoverEvent *_event) ...@@ -108,7 +108,7 @@ void Button::hoverEnterEvent (QGraphicsSceneHoverEvent *_event)
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// stop glowing on mouse leave // stop glowing on mouse leave
void Button::hoverLeaveEvent (QGraphicsSceneHoverEvent *_event) void Button::hoverLeaveEvent (QGraphicsSceneHoverEvent */*_event*/)
{ {
glow_ = false; glow_ = false;
update (); update ();
......
...@@ -108,7 +108,7 @@ void ConnectionPoint::setGeometry (const QRectF &_rect) ...@@ -108,7 +108,7 @@ void ConnectionPoint::setGeometry (const QRectF &_rect)
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// size informations for layouting // size informations for layouting
QSizeF ConnectionPoint::sizeHint (Qt::SizeHint _which, const QSizeF &_constraint) const QSizeF ConnectionPoint::sizeHint (Qt::SizeHint _which, const QSizeF &/*_constraint*/) const
{ {
QSizeF sh; QSizeF sh;
switch (_which) { switch (_which) {
...@@ -186,7 +186,7 @@ void ConnectionPoint::setState(State _state) ...@@ -186,7 +186,7 @@ void ConnectionPoint::setState(State _state)
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// highlight connection if mouse over // highlight connection if mouse over
void ConnectionPoint::hoverEnterEvent (QGraphicsSceneHoverEvent *_event) void ConnectionPoint::hoverEnterEvent (QGraphicsSceneHoverEvent */*_event*/)
{ {
foreach (Connection *c, inout_->connections ()) foreach (Connection *c, inout_->connections ())
{ {
...@@ -205,7 +205,7 @@ void ConnectionPoint::hoverEnterEvent (QGraphicsSceneHoverEvent *_event) ...@@ -205,7 +205,7 @@ void ConnectionPoint::hoverEnterEvent (QGraphicsSceneHoverEvent *_event)
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// remove highlight // remove highlight
void ConnectionPoint::hoverLeaveEvent (QGraphicsSceneHoverEvent *_event) void ConnectionPoint::hoverLeaveEvent (QGraphicsSceneHoverEvent */*_event*/)
{ {
foreach (Connection *c, inout_->connections ()) foreach (Connection *c, inout_->connections ())
{ {
...@@ -239,7 +239,6 @@ void ConnectionPoint::paint(QPainter *_painter, const QStyleOptionGraphicsItem * ...@@ -239,7 +239,6 @@ void ConnectionPoint::paint(QPainter *_painter, const QStyleOptionGraphicsItem *
float wH = width_ / 2.0; float wH = width_ / 2.0;
float wT = width_ / 3.0; float wT = width_ / 3.0;
float wF = width_ / 4.0;
float wS = width_ / 6.0; float wS = width_ / 6.0;
QPainterPath path; QPainterPath path;
......
...@@ -66,6 +66,7 @@ class ElementInOut; ...@@ -66,6 +66,7 @@ class ElementInOut;
class ConnectionPoint : public QObject, public QGraphicsEllipseItem, public QGraphicsLayoutItem class ConnectionPoint : public QObject, public QGraphicsEllipseItem, public QGraphicsLayoutItem
{ {
Q_OBJECT Q_OBJECT
Q_INTERFACES(QGraphicsLayoutItem)
public: public:
......
...@@ -61,6 +61,7 @@ class SceneElement; ...@@ -61,6 +61,7 @@ class SceneElement;
class ElementArea : public QObject, public QGraphicsItem class ElementArea : public QObject, public QGraphicsItem
{ {
Q_OBJECT Q_OBJECT
Q_INTERFACES(QGraphicsItem)
public: public:
...@@ -83,7 +84,7 @@ class ElementArea : public QObject, public QGraphicsItem ...@@ -83,7 +84,7 @@ class ElementArea : public QObject, public QGraphicsItem
const QList<SceneElement *>& elements () const; const QList<SceneElement *>& elements () const;
/// for QGraphicsItem /// for QGraphicsItem
void paint (QPainter *_painter, const QStyleOptionGraphicsItem *_option, QWidget *_widget = 0) {}; void paint (QPainter */*_painter*/, const QStyleOptionGraphicsItem */*_option*/, QWidget */*_widget*/ = 0) {};
private: private:
GraphicsScene *scene_; GraphicsScene *scene_;
......
...@@ -149,8 +149,6 @@ void FunctionDisplay::paint (QPainter *_painter, const QStyleOptionGraphicsItem ...@@ -149,8 +149,6 @@ void FunctionDisplay::paint (QPainter *_painter, const QStyleOptionGraphicsItem
int w = geometry().width(); int w = geometry().width();
int h = geometry().height(); int h = geometry().height();
int div = 2;
_painter->setRenderHint(QPainter::Antialiasing, true); _painter->setRenderHint(QPainter::Antialiasing, true);
_painter->setBrush(QBrush(QColor(BACKGROUND_RED, _painter->setBrush(QBrush(QColor(BACKGROUND_RED,
...@@ -172,8 +170,6 @@ void FunctionDisplay::paint (QPainter *_painter, const QStyleOptionGraphicsItem ...@@ -172,8 +170,6 @@ void FunctionDisplay::paint (QPainter *_painter, const QStyleOptionGraphicsItem
path.lineTo (0, 0); path.lineTo (0, 0);
_painter->drawPath (path); _painter->drawPath (path);
float wH = w / 2.0;
float wT = w / 3.0;
QLinearGradient lG; QLinearGradient lG;
QRadialGradient rG; QRadialGradient rG;
......
...@@ -1117,7 +1117,7 @@ void GraphicsScene::contentChange () ...@@ -1117,7 +1117,7 @@ void GraphicsScene::contentChange ()
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
void VSI::GraphicsScene::sceneResized(const QRectF & _rect) void VSI::GraphicsScene::sceneResized(const QRectF & /*_rect*/)
{ {
if (dontMoveStart_) if (dontMoveStart_)
return; return;
......
...@@ -250,7 +250,6 @@ SceneElement::SceneElement (GraphicsScene *_scene, Element *_element) : ...@@ -250,7 +250,6 @@ SceneElement::SceneElement (GraphicsScene *_scene, Element *_element) :
{ {
ElementFunction *ef = new ElementFunction (f, this); ElementFunction *ef = new ElementFunction (f, this);
QGraphicsLinearLayout *hl = new QGraphicsLinearLayout (Qt::Horizontal);
Button *config = new Button ("Edit:" + f->shortDescription (), this); Button *config = new Button ("Edit:" + f->shortDescription (), this);
config->setBrush (Qt::black); config->setBrush (Qt::black);
config->setBackgroundBrush (Qt::lightGray); config->setBackgroundBrush (Qt::lightGray);
...@@ -363,8 +362,6 @@ void SceneElement::paint (QPainter *_painter, const QStyleOptionGraphicsItem *_o ...@@ -363,8 +362,6 @@ void SceneElement::paint (QPainter *_painter, const QStyleOptionGraphicsItem *_o
int w = geometry().width() - 20; int w = geometry().width() - 20;
int h = geometry().height(); int h = geometry().height();
int div = 2;
_painter->setRenderHint(QPainter::Antialiasing, true); _painter->setRenderHint(QPainter::Antialiasing, true);
if (isSelected ()) if (isSelected ())
_painter->setBrush(QBrush(QColor(SELECTED_BACKGROUND_RED, _painter->setBrush(QBrush(QColor(SELECTED_BACKGROUND_RED,
......
...@@ -132,7 +132,7 @@ void Text::setGeometry (const QRectF &_rect) ...@@ -132,7 +132,7 @@ void Text::setGeometry (const QRectF &_rect)
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// size information for layouting // size information for layouting
QSizeF Text::sizeHint (Qt::SizeHint _which, const QSizeF &_constraint) const QSizeF Text::sizeHint (Qt::SizeHint _which, const QSizeF &/*_constraint*/) const
{ {
QFontMetrics fn (font ()); QFontMetrics fn (font ());
QSizeF sh; QSizeF sh;
...@@ -185,11 +185,6 @@ void Text::paint (QPainter *_painter, const QStyleOptionGraphicsItem *_option, Q ...@@ -185,11 +185,6 @@ void Text::paint (QPainter *_painter, const QStyleOptionGraphicsItem *_option, Q
if (backgroundSet_) if (backgroundSet_)
{ {
float w = geometry ().size ().width ();
float wH = w / 2.0;
float wT = w / 3.0;
QPainterPath path; QPainterPath path;
path.moveTo (geometry ().size ().width () / 2, 0); path.moveTo (geometry ().size ().width () / 2, 0);
......
...@@ -66,6 +66,7 @@ class GraphicsScene; ...@@ -66,6 +66,7 @@ class GraphicsScene;
class Text : public QObject, public QGraphicsSimpleTextItem, public QGraphicsLayoutItem class Text : public QObject, public QGraphicsSimpleTextItem, public QGraphicsLayoutItem
{ {
Q_OBJECT Q_OBJECT
Q_INTERFACES(QGraphicsLayoutItem)
public: public:
......
...@@ -84,7 +84,7 @@ Trash::~Trash () ...@@ -84,7 +84,7 @@ Trash::~Trash ()
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// make the trash opaque if mouse is over and we have selected elements // make the trash opaque if mouse is over and we have selected elements
void Trash::hoverEnterEvent (QGraphicsSceneHoverEvent *_event) void Trash::hoverEnterEvent (QGraphicsSceneHoverEvent */*_event*/)
{ {
if (!scene_->selectedItems ().isEmpty ()) if (!scene_->selectedItems ().isEmpty ())
setOpacity (1.0); setOpacity (1.0);
...@@ -93,7 +93,7 @@ void Trash::hoverEnterEvent (QGraphicsSceneHoverEvent *_event) ...@@ -93,7 +93,7 @@ void Trash::hoverEnterEvent (QGraphicsSceneHoverEvent *_event)
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// make trash transparent on mouse leave // make trash transparent on mouse leave
void Trash::hoverLeaveEvent (QGraphicsSceneHoverEvent *_event) void Trash::hoverLeaveEvent (QGraphicsSceneHoverEvent */*_event*/)
{ {
setOpacity (0.4); setOpacity (0.4);
} }
...@@ -101,7 +101,7 @@ void Trash::hoverLeaveEvent (QGraphicsSceneHoverEvent *_event) ...@@ -101,7 +101,7 @@ void Trash::hoverLeaveEvent (QGraphicsSceneHoverEvent *_event)
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// delete selected elements on mouse press // delete selected elements on mouse press
void Trash::mousePressEvent (QGraphicsSceneMouseEvent *_event) void Trash::mousePressEvent (QGraphicsSceneMouseEvent */*_event*/)
{ {
if (!scene_->selectedItems ().isEmpty ()) if (!scene_->selectedItems ().isEmpty ())
foreach (QGraphicsItem *e, scene_->selectedItems ()) foreach (QGraphicsItem *e, scene_->selectedItems ())
...@@ -140,7 +140,7 @@ void Trash::setGeometry (const QRectF &_rect) ...@@ -140,7 +140,7 @@ void Trash::setGeometry (const QRectF &_rect)
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// size information for layouting // size information for layouting
QSizeF Trash::sizeHint (Qt::SizeHint _which, const QSizeF &_constraint) const QSizeF Trash::sizeHint (Qt::SizeHint _which, const QSizeF &/*_constraint*/) const
{ {
QSizeF sh; QSizeF sh;
switch (_which) { switch (_which) {
......
...@@ -62,6 +62,7 @@ class GraphicsScene; ...@@ -62,6 +62,7 @@ class GraphicsScene;
class Trash : public QObject, public QGraphicsPixmapItem, public QGraphicsLayoutItem class Trash : public QObject, public QGraphicsPixmapItem, public QGraphicsLayoutItem
{ {
Q_OBJECT Q_OBJECT
Q_INTERFACES(QGraphicsLayoutItem)
public: public:
......
...@@ -95,7 +95,7 @@ ZoomButton::~ZoomButton () ...@@ -95,7 +95,7 @@ ZoomButton::~ZoomButton ()
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// make the widget opaque if the mouse is over it // make the widget opaque if the mouse is over it
void ZoomButton::hoverEnterEvent (QGraphicsSceneHoverEvent *_event) void ZoomButton::hoverEnterEvent (QGraphicsSceneHoverEvent */*_event*/)
{ {
setOpacity (1.0); setOpacity (1.0);
} }
...@@ -103,7 +103,7 @@ void ZoomButton::hoverEnterEvent (QGraphicsSceneHoverEvent *_event) ...@@ -103,7 +103,7 @@ void ZoomButton::hoverEnterEvent (QGraphicsSceneHoverEvent *_event)
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// make the widget transparent if the mouse leaves it // make the widget transparent if the mouse leaves it
void ZoomButton::hoverLeaveEvent (QGraphicsSceneHoverEvent *_event) void ZoomButton::hoverLeaveEvent (QGraphicsSceneHoverEvent */*_event*/)
{ {
setOpacity (0.4); setOpacity (0.4);
} }
...@@ -206,7 +206,7 @@ void ZoomButton::setGeometry (const QRectF &_rect) ...@@ -206,7 +206,7 @@ void ZoomButton::setGeometry (const QRectF &_rect)
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// size information for layouting // size information for layouting
QSizeF ZoomButton::sizeHint (Qt::SizeHint _which, const QSizeF &_constraint) const QSizeF ZoomButton::sizeHint (Qt::SizeHint _which, const QSizeF &/*_constraint*/) const
{ {
QSizeF sh; QSizeF sh;
switch (_which) { switch (_which) {
......
...@@ -59,6 +59,7 @@ class GraphicsScene; ...@@ -59,6 +59,7 @@ class GraphicsScene;
class ZoomButton : public QObject, public QGraphicsPixmapItem, public QGraphicsLayoutItem class ZoomButton : public QObject, public QGraphicsPixmapItem, public QGraphicsLayoutItem
{ {
Q_OBJECT Q_OBJECT
Q_INTERFACES(QGraphicsLayoutItem)
public: public:
......
...@@ -102,7 +102,7 @@ ToolBoxElement::~ToolBoxElement () ...@@ -102,7 +102,7 @@ ToolBoxElement::~ToolBoxElement ()
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// Paint a rounded rect as background // Paint a rounded rect as background
void ToolBoxElement::paintEvent(QPaintEvent *_event) void ToolBoxElement::paintEvent(QPaintEvent */*_event*/)
{ {
QPainter p (this); QPainter p (this);
p.setRenderHint(QPainter::Antialiasing); p.setRenderHint(QPainter::Antialiasing);
......
...@@ -60,7 +60,7 @@ TypeAny::TypeAny() ...@@ -60,7 +60,7 @@ TypeAny::TypeAny()
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
bool TypeAny::canConvertTo(QString _type) bool TypeAny::canConvertTo(QString /*_type*/)
{ {
return true; return true;
} }
......
...@@ -155,9 +155,6 @@ Qt::ItemFlags TreeModel::flags(const QModelIndex &index) const ...@@ -155,9 +155,6 @@ Qt::ItemFlags TreeModel::flags(const QModelIndex &index) const
else else
flags = Qt::ItemIsEnabled; flags = Qt::ItemIsEnabled;
// Get the corresponding tree item
TreeItem *item = static_cast<TreeItem*>(index.internalPointer());
return flags; return flags;
} }
......
...@@ -177,7 +177,7 @@ void ObjectPickDialog::activated(const QModelIndex & _index) ...@@ -177,7 +177,7 @@ void ObjectPickDialog::activated(const QModelIndex & _index)
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
void ObjectPickDialog::slotMouseEventClick(QMouseEvent * _event, bool _double) void ObjectPickDialog::slotMouseEventClick(QMouseEvent * _event, bool /*_double*/)
{ {
unsigned int nodeIdx, targetIdx; unsigned int nodeIdx, targetIdx;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment