SILICON
Loading...
Searching...
No Matches
enums.hpp File Reference
#include <QGraphicsItem>
#include <QVariant>
#include <utility>
Include dependency graph for enums.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  SILICON
namespace  SILICON::ui

Enumerations

enum class  ItemDataRole { Category = Qt::UserRole + 1 }
enum class  ItemCategory : uint32_t {
  None = 0 , GraphicalItem = 1 << 0 , WireSegment = 1 << 1 , Component = 1 << 2 ,
  LogicComponent = 1 << 3 , IO = 1 << 4 , Input = 1 << 5 , Output = 1 << 6
}
enum  SiliconTypes {
  UNKNOWN = QGraphicsItem::UserType , PORT , WIRE_SEGMENT , COMPONENT = WIRE_SEGMENT + 10 ,
  GENERIC_IO , SINGLE_INPUT , SINGLE_OUTPUT , BUS_INPUT ,
  BUS_OUTPUT , CONSTANT , WIRE_SPLITTER , WIRE_MERGER ,
  AND_GATE , NAND_GATE , OR_GATE , NOR_GATE ,
  NOT_GATE , XOR_GATE , D_FLIP_FLOP , E_FLIP_FLOP ,
  JK_FLIP_FLOP , EXTENDER , COMPLEMENTER , HALF_ADDER ,
  FULL_ADDER , ADDER_N_BITS , COMPARATOR , MULTIPLEXER ,
  DEMULTIPLEXER , DECODER , REGISTER , ROM_COMPONENT ,
  SUBCIRCUIT , D_LATCH , SHIFTER , MULTIPLIER ,
  DIVIDER , TEXT , SILICON_END
}

Functions

constexpr ItemCategory operator| (ItemCategory a, ItemCategory b)
constexpr ItemCategory operator& (ItemCategory a, ItemCategory b)
bool hasCategory (const QGraphicsItem *item, ItemCategory cat)
template<typename TargetType>
TargetType * category_cast (QGraphicsItem *item, ItemCategory expectedCategory)
template<typename TargetType>
const TargetType * category_cast (const QGraphicsItem *item, ItemCategory expectedCategory)