OpenStudioCore:openstudio_lib
 All Classes Namespaces Functions Variables Enumerations Enumerator
Public Slots | Signals | Public Member Functions | List of all members
openstudio::ScriptItem Class Reference

#include <ScriptItem.hpp>

+ Inheritance diagram for openstudio::ScriptItem:

Public Slots

void setOSArgument (const ruleset::OSArgument &arg)
 
- Public Slots inherited from openstudio::OSItem
void onRemoveClicked ()
 

Signals

void argChanged ()
 
- Signals inherited from openstudio::OSItem
void itemClicked (OSItem *)
 
void itemRemoveClicked (OSItem *)
 
void itemReplacementDropped (OSItem *currentItem, const OSItemId &replacementItemId)
 

Public Member Functions

openstudio::path argsDbPath () const
 
void deleteDb ()
 
virtual bool equal (const openstudio::OSItem *) const override
 
bool isUserScript () const
 
std::vector< ruleset::OSArgument > osArguments () const
 
openstudio::path path () const
 
void refreshArgumentsFromScript (runmanager::RunManager t_rm)
 
bool removed () const
 
openstudio::path resourcesPath () const
 Returns the resources path that corresponds to this script's path, if possible. More...
 
void saveArgumentsToDb ()
 
 ScriptItem (const openstudio::path &t_path, OSItemType type,*parent=nullptr)
 
void setIsUserScript (bool isUserScript)
 
bool updateArgumentsFromDb ()
 
boost::optional
< ruleset::UserScriptInfo > 
userScriptInfo () const
 
virtual ~ScriptItem ()
 
- Public Member Functions inherited from openstudio::OSItem
bool draggable () const
 
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 ()
 

Additional Inherited Members

- Static Public Member Functions inherited from openstudio::OSItem
static OSItemmakeItem (const OSItemId &itemId, OSItemType osItemType=OSItemType::ListItem)
 
- Static Public Attributes inherited from openstudio::OSItem
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 inherited from openstudio::OSItem
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 inherited from openstudio::OSItem
MeasureBadge * m_measureBadge
 

Constructor & Destructor Documentation

openstudio::ScriptItem::ScriptItem ( const openstudio::path &  t_path,
OSItemType  type,
parent = nullptr 
)
virtual openstudio::ScriptItem::~ScriptItem ( )
inlinevirtual

Member Function Documentation

void openstudio::ScriptItem::argChanged ( )
signal
openstudio::path openstudio::ScriptItem::argsDbPath ( ) const
void openstudio::ScriptItem::deleteDb ( )
virtual bool openstudio::ScriptItem::equal ( const openstudio::OSItem ) const
overridevirtual

Implements openstudio::OSItem.

bool openstudio::ScriptItem::isUserScript ( ) const
std::vector<ruleset::OSArgument> openstudio::ScriptItem::osArguments ( ) const
openstudio::path openstudio::ScriptItem::path ( ) const
void openstudio::ScriptItem::refreshArgumentsFromScript ( runmanager::RunManager  t_rm)
bool openstudio::ScriptItem::removed ( ) const
openstudio::path openstudio::ScriptItem::resourcesPath ( ) const

Returns the resources path that corresponds to this script's path, if possible.

Otherwise, returns the root scripts path.

void openstudio::ScriptItem::saveArgumentsToDb ( )
void openstudio::ScriptItem::setIsUserScript ( bool  isUserScript)
void openstudio::ScriptItem::setOSArgument ( const ruleset::OSArgument &  arg)
slot
bool openstudio::ScriptItem::updateArgumentsFromDb ( )
boost::optional<ruleset::UserScriptInfo> openstudio::ScriptItem::userScriptInfo ( ) const