SymbolBox.h
Go to the documentation of this file.
/***************************************************************************
File : SymbolBox.h
Project : QtiPlot
--------------------------------------------------------------------
Copyright : (C) 2006 by Ion Vasilief
Email (use @ for *) : ion_vasilief*yahoo.fr
Description : Plot symbol combo box
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program 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 General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the Free Software *
* Foundation, Inc., 51 Franklin Street, Fifth Floor, *
* Boston, MA 02110-1301 USA *
* *
***************************************************************************/
#ifndef SYMBOLBOX_H
#define SYMBOLBOX_H
#include <QComboBox>
#include <qwt_symbol.h>
class SymbolBox : public QComboBox
{
Q_OBJECT
public:
SymbolBox(bool showNoSymbol = true, QWidget *parent = 0);
void setStyle(const QwtSymbol::Style& c);
QwtSymbol::Style selectedSymbol() const;
static QwtSymbol::Style style(int index);
static int symbolIndex(const QwtSymbol::Style& style);
static QList<int> defaultSymbols();
signals:
void activated(SymbolBox *);
protected:
void init(bool showNoSymbol);
void focusInEvent(QFocusEvent *);
private:
static const QwtSymbol::Style symbols[];
};
#endif
SymbolBox::symbolIndex
static int symbolIndex(const QwtSymbol::Style &style)
Definition: SymbolBox.cpp:168
SymbolBox
A modified QComboBox allowing to choose a QwtSmbol style.
Definition: SymbolBox.h:40
SymbolBox::setStyle
void setStyle(const QwtSymbol::Style &c)
Definition: SymbolBox.cpp:150
SymbolBox::init
void init(bool showNoSymbol)
Definition: SymbolBox.cpp:59
SymbolBox::activated
void activated(SymbolBox *)
Signal emitted when the box gains focus.
SymbolBox::defaultSymbols
static QList< int > defaultSymbols()
Definition: SymbolBox.cpp:185
SymbolBox::focusInEvent
void focusInEvent(QFocusEvent *)
Definition: SymbolBox.cpp:194
SymbolBox::style
static QwtSymbol::Style style(int index)
Definition: SymbolBox.cpp:177
SymbolBox::symbols
static const QwtSymbol::Style symbols[]
Definition: SymbolBox.h:66
SymbolBox::selectedSymbol
QwtSymbol::Style selectedSymbol() const
Definition: SymbolBox.cpp:159
SymbolBox::SymbolBox
SymbolBox(bool showNoSymbol=true, QWidget *parent=0)
Constructor.
Definition: SymbolBox.cpp:54