Loading...
Searching...
No Matches
colorTable.h
Go to the documentation of this file.
#ifndef BALL_VIEW_WIDGETS_COLOR_TABLE_H
#define BALL_VIEW_WIDGETS_COLOR_TABLE_H
#include <QtWidgets/QTableWidget>
#ifndef BALL_VIEW_KERNEL_PREFERENCESENTRY
# include <BALL/VIEW/KERNEL/preferencesEntry.h>
#endif
#ifndef BALL_VIEW_KERNEL_COMMON_H
# include <BALL/VIEW/KERNEL/common.h>
#endif
#ifndef BALL_VIEW_DATATYPE_COLORRGBA_H
# include <BALL/VIEW/DATATYPE/colorRGBA.h>
#endif
namespace BALL
{
namespace VIEW
{
class BALL_VIEW_EXPORT ColorTable
: public QTableWidget,
public PreferencesEntry::ExtendedPreferencesObject
{
Q_OBJECT
public:
ColorTable(QWidget* parent = 0, const char* name = 0);
void setNamesTitle(const String& string);
String getNamesTitle() const;
void setContent(const vector<String>& names, const vector<ColorRGBA>& colors);
void setColors(const vector<ColorRGBA>& colors);
const vector<ColorRGBA>& getColors() const
{ return colors_;}
const vector<String>& getNames() const
{ return names_;}
virtual bool getValue(String&) const;
virtual bool setValue(const String& value);
private Q_SLOTS:
void beginEdit(int row, int col);
virtual void mousePressEvent(QMouseEvent* event);
private:
vector<ColorRGBA> colors_;
vector<String> names_;
bool setting_content_;
};
}
}
#endif //BALL_VIEW_WIDGETS_COLOR_TABLE_H
BALL_VIEW_EXPORT
#define BALL_VIEW_EXPORT
Definition COMMON/global.h:52
common.h
BALL::String
Definition string.h:57
BALL::VIEW::ColorTable::setContent
void setContent(const vector< String > &names, const vector< ColorRGBA > &colors)
BALL::VIEW::ColorTable::getNames
const vector< String > & getNames() const
Definition colorTable.h:45
BALL::VIEW::ColorTable::setNamesTitle
void setNamesTitle(const String &string)
BALL::VIEW::ColorTable::setValue
virtual bool setValue(const String &value)
Overload this in derived classes!
BALL::VIEW::ColorTable::getNamesTitle
String getNamesTitle() const
BALL::VIEW::ColorTable::ColorTable
ColorTable(QWidget *parent=0, const char *name=0)
BALL::VIEW::ColorTable::getColors
const vector< ColorRGBA > & getColors() const
Definition colorTable.h:42
BALL::VIEW::ColorTable::getValue
virtual bool getValue(String &) const
Overload this in derived classes!
BALL::VIEW::ColorTable::setColors
void setColors(const vector< ColorRGBA > &colors)
BALL::VIEW::PreferencesEntry::ExtendedPreferencesObject
Definition preferencesEntry.h:79
QMouseEvent
QTableWidget
QWidget
colorRGBA.h
BALL::VIEW
Definition constraints.h:35
BALL
Definition constants.h:13
preferencesEntry.h