OpenStudio:openstudio_lib
 All Classes Namespaces Functions Variables Enumerations Enumerator
Public Slots | Signals | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | List of all members
openstudio::OSItem Class Referenceabstract

#include <OSItem.hpp>

+ Inheritance diagram for openstudio::OSItem:

Public Slots

void onRemoveClicked ()
 

Signals

void itemClicked (OSItem *)
 
void itemRemoveClicked (OSItem *)
 
void itemReplacementDropped (OSItem *currentItem, const OSItemId &replacementItemId)
 

Public Member Functions

bool draggable () const
 
virtual bool equal (const OSItem *other) const =0
 
bool inspectable () const
 
bool isDefaulted () const
 
OSItemId itemId () const
 
QPixmap leftPixmap () const
 
 OSItem (const OSItemId &itemId, OSItemType osItemType=OSItemType::ListItem,*parent=nullptr)
 
OSItemType osItemType () const
 
bool removeable () const
 ! is the remove button visible More...
 
QPixmap rightPixmap () const
 
bool selected () const
 
void setAspectRatio (AspectRatio aspectRatio)
 
void setDraggable (bool draggable)
 
void setInspectable (bool inspectable)
 
void setIsDefaulted (bool isDefaulted)
 
void setLeftPixmap (const QPixmap &pixmap)
 
void setOSItemType (OSItemType osItemType)
 
void setRemoveable (bool removeable)
 ! show / hide the remove button More...
 
void setRightPixmap (const QPixmap &pixmap)
 
void setSelected (bool selected)
 
void setText (const QString &text)
 
void setUseLargeIcon (bool userLargeIcon)
 
QString text () const
 
bool useLargeIcon ()
 
virtual ~OSItem ()
 

Static Public Member Functions

static OSItemmakeItem (const OSItemId &itemId, OSItemType osItemType=OSItemType::ListItem)
 

Static Public Attributes

static const int BTN_HEIGHT = 20
 
static const int BTN_WIDTH = 20
 
static const int HEADER_HEIGHT = 40
 ! The height, if a header More...
 
static const int HEADER_WIDTH = ITEM_WIDTH
 ! The width, if a header More...
 
static const int IMAGE_HEIGHT = 30
 
static const int IMAGE_WIDTH = 30
 
static const int ITEM_HEIGHT = 60
 ! The height, if a rectangle More...
 
static const int ITEM_SIDE = 80
 ! The side length, if a square More...
 
static const int ITEM_WIDTH = 150
 ! The width, if a rectangle More...
 

Protected Member Functions

void dragEnterEvent (QDragEnterEvent *event) override
 
void dropEvent (QDropEvent *event) override
 
bool isBold ()
 
void leaveEvent (QEvent *event) override
 
void mouseMoveEvent (QMouseEvent *event) override
 
void mousePressEvent (QMouseEvent *event) override
 
void mouseReleaseEvent (QMouseEvent *event) override
 
void paintEvent (QPaintEvent *event) override
 
void setBold (bool isBold)
 
void setTextColor (QColor color=Qt::black)
 
QColor textColor ()
 

Protected Attributes

MeasureBadge * m_measureBadge
 

Constructor & Destructor Documentation

openstudio::OSItem::OSItem ( const OSItemId itemId,
OSItemType  osItemType = OSItemType::ListItem,
parent = nullptr 
)
virtual openstudio::OSItem::~OSItem ( )
inlinevirtual

Member Function Documentation

void openstudio::OSItem::dragEnterEvent ( QDragEnterEvent *  event)
overrideprotected
bool openstudio::OSItem::draggable ( ) const
void openstudio::OSItem::dropEvent ( QDropEvent *  event)
overrideprotected
virtual bool openstudio::OSItem::equal ( const OSItem other) const
pure virtual
bool openstudio::OSItem::inspectable ( ) const
bool openstudio::OSItem::isBold ( )
protected
bool openstudio::OSItem::isDefaulted ( ) const
void openstudio::OSItem::itemClicked ( OSItem )
signal
OSItemId openstudio::OSItem::itemId ( ) const
void openstudio::OSItem::itemRemoveClicked ( OSItem )
signal
void openstudio::OSItem::itemReplacementDropped ( OSItem currentItem,
const OSItemId replacementItemId 
)
signal
void openstudio::OSItem::leaveEvent ( QEvent *  event)
overrideprotected
QPixmap openstudio::OSItem::leftPixmap ( ) const
static OSItem* openstudio::OSItem::makeItem ( const OSItemId itemId,
OSItemType  osItemType = OSItemType::ListItem 
)
static
void openstudio::OSItem::mouseMoveEvent ( QMouseEvent *  event)
overrideprotected
void openstudio::OSItem::mousePressEvent ( QMouseEvent *  event)
overrideprotected
void openstudio::OSItem::mouseReleaseEvent ( QMouseEvent *  event)
overrideprotected
void openstudio::OSItem::onRemoveClicked ( )
slot
OSItemType openstudio::OSItem::osItemType ( ) const
void openstudio::OSItem::paintEvent ( QPaintEvent *  event)
overrideprotected
bool openstudio::OSItem::removeable ( ) const

! is the remove button visible

QPixmap openstudio::OSItem::rightPixmap ( ) const
bool openstudio::OSItem::selected ( ) const
void openstudio::OSItem::setAspectRatio ( AspectRatio  aspectRatio)
void openstudio::OSItem::setBold ( bool  isBold)
protected
void openstudio::OSItem::setDraggable ( bool  draggable)
void openstudio::OSItem::setInspectable ( bool  inspectable)
void openstudio::OSItem::setIsDefaulted ( bool  isDefaulted)
void openstudio::OSItem::setLeftPixmap ( const QPixmap &  pixmap)
void openstudio::OSItem::setOSItemType ( OSItemType  osItemType)
void openstudio::OSItem::setRemoveable ( bool  removeable)

! show / hide the remove button

void openstudio::OSItem::setRightPixmap ( const QPixmap &  pixmap)
void openstudio::OSItem::setSelected ( bool  selected)
void openstudio::OSItem::setText ( const QString &  text)
void openstudio::OSItem::setTextColor ( QColor  color = Qt::black)
protected
void openstudio::OSItem::setUseLargeIcon ( bool  userLargeIcon)
QString openstudio::OSItem::text ( ) const
QColor openstudio::OSItem::textColor ( )
protected
bool openstudio::OSItem::useLargeIcon ( )

Member Data Documentation

const int openstudio::OSItem::BTN_HEIGHT = 20
static
const int openstudio::OSItem::BTN_WIDTH = 20
static
const int openstudio::OSItem::HEADER_HEIGHT = 40
static

! The height, if a header

const int openstudio::OSItem::HEADER_WIDTH = ITEM_WIDTH
static

! The width, if a header

const int openstudio::OSItem::IMAGE_HEIGHT = 30
static
const int openstudio::OSItem::IMAGE_WIDTH = 30
static
const int openstudio::OSItem::ITEM_HEIGHT = 60
static

! The height, if a rectangle

const int openstudio::OSItem::ITEM_SIDE = 80
static

! The side length, if a square

const int openstudio::OSItem::ITEM_WIDTH = 150
static

! The width, if a rectangle

MeasureBadge* openstudio::OSItem::m_measureBadge
protected