Logo Search packages:      
Sourcecode: ktechlab version File versions  Download package

CircuitDocument Class Reference

#include <circuitdocument.h>

Inheritance diagram for CircuitDocument:

ICNDocument ItemDocument Document

List of all members.


Detailed Description

Circuit view.

CircuitDocument handles allocation of the components displayed in the ICNDocument to various Circuits, where the simulation can be performed, and displays the information from those simulations back on the ICNDocument

Author:
David Saxton

Definition at line 62 of file circuitdocument.h.


Public Types

enum  DocumentType {
  dt_none, dt_flowcode, dt_circuit, dt_mechanics,
  dt_text, dt_pinMapEditor
}
enum  hit_score { hs_none = 0, hs_connector = 4, hs_item = 1000 }

Public Slots

void alignHorizontally ()
void alignVertically ()
void cancelCurrentOperation ()
void componentAdded (Item *item)
void componentRemoved (Item *item)
void connectorAdded (Connector *connector)
void createCellMap ()
void createSubcircuit ()
virtual void cut ()
virtual void deleteSelection ()
void displayEquations ()
void distributeHorizontally ()
void distributeVertically ()
void exportToImage ()
void itemFlip ()
void lowerZ ()
virtual void paste ()
void processItemDocumentEvents ()
void raiseZ ()
virtual void redo ()
void requestAssignCircuits ()
void requestRerouteInvalidatedConnectors ()
void rotateClockwise ()
void rotateCounterClockwise ()
void setOrientation0 ()
void setOrientation180 ()
void setOrientation270 ()
void setOrientation90 ()
virtual void slotInitItemActions (Item *item=0L)
void slotRequestAssignNG ()
void slotSetDrawAction (int da)
void slotSetRepeatedItemId (const QString &id)
void slotUnsetRepeatedItemId ()
virtual void slotUpdateConfiguration ()
void slotUpdateZOrdering ()
virtual void undo ()

Signals

void fileNameChanged (const KURL &url)
void itemSelected (Item *item)
void itemUnselected (Item *item=0l)
void modifiedStateChanged ()
void nodeAdded (Node *node)
void undoRedoStateChanged ()
void viewFocused (View *view)
void viewUnfocused ()

Public Member Functions

ViewactiveView () const
void addCPenalty (int x, int y, int score)
virtual ItemaddItem (const QString &id, const QPoint &p, bool newItem)
virtual void appendDeleteList (QCanvasItem *qcanvasItem)
void calculateConnectorCurrents ()
virtual bool canConnect (QCanvasItem *qcanvasItem1, QCanvasItem *qcanvasItem2) const
Canvascanvas () const
QRect canvasBoundingRect () const
virtual void canvasRightClick (const QPoint &pos, QCanvasItem *item)
QString caption () const
Cellscells () const
 CircuitDocument (const QString &caption, KTechlab *ktechlab, const char *name=0L)
void clearHistory ()
CNItemcnItemWithID (const QString &id)
const ConnectorList & connectorList () const
ConnectorconnectorWithID (const QString &id)
virtual void convertToAssembly ()
virtual void convertToHex ()
virtual void convertToMicrobe ()
virtual void convertToPIC ()
virtual void copy ()
int countExtCon (const ItemList &cnItemList) const
ConnectorcreateConnector (Connector *con1, Connector *con2, const QPoint &pos1, const QPoint &pos2, QPointList *pointList=0L)
ConnectorcreateConnector (Node *node, Connector *con, const QPoint &pos2, QPointList *pointList=0L)
ConnectorcreateConnector (Node *node1, Node *node2, QPointList *pointList=0L)
ConnectorcreateConnector (const QString &startNodeId, const QString &endNodeId, QPointList *pointList=0L)
virtual ViewcreateView (ViewContainer *viewContainer, uint viewAreaId, const char *name=0l)
unsigned dcopID () const
DCOPObject * dcopObject () const
virtual void debugInterrupt ()
virtual void debugRun ()
virtual void debugStep ()
virtual void debugStop ()
virtual bool fileClose ()
virtual void fileSave ()
virtual void fileSaveAs ()
FlowContainerflowContainer (const QPoint &pos)
virtual void flushDeleteList ()
QString generateUID (QString name)
int getActionTicket () const
ConnectorList getCommonConnectors (const ItemList &list)
NodeList getCommonNodes (const ItemList &list)
void getTranslatable (const ItemList &itemList, ConnectorList *fixedConnectors=0l, ConnectorList *translatableConnectors=0l, NodeGroupList *translatableNodeGroups=0l)
bool getURL (const QString &types)
bool isDeleted () const
virtual bool isModified () const
virtual bool isRedoAvailable () const
virtual bool isUndoAvailable () const
bool isValidCellReference (const uint x, const uint y) const
QCanvasItem * itemAtTop (const QPoint &pos) const
ItemList itemList () const
ItemitemWithID (const QString &)
bool joinConnectors (Node *node)
KTechlabktechlab () const
void lowerZ (const ItemList &itemList)
const GuardedNodeGroupList & nodeGroupList () const
const NodeList & nodeList () const
NodenodeWithID (const QString &id)
uint numberOfViews () const
virtual bool openURL (const KURL &url)
virtual void print ()
void raiseZ (const ItemList &itemList)
virtual bool registerItem (QCanvasItem *qcanvasItem)
bool registerUID (const QString &uid)
void requestEvent (ItemDocumentEvent::type type)
void requestStateSave (int actionTicket=-1)
void rerouteInvalidatedConnectors ()
void select (QCanvasItem *item)
void select (const QCanvasItemList &list)
virtual void selectAll ()
virtual ItemGroupselectList () const
void setAddToProjectOnSave (bool add)
void setCaption (const QString &caption)
void setDCOPID (unsigned id)
void setItemResizeCursor (int cornerType)
virtual void setModified (bool modified)
void setURL (const KURL &url)
void slotAssignNodeGroups ()
DocumentType type () const
void unregisterUID (const QString &uid)
void unselect (QCanvasItem *qcanvasItem)
void unselectAll ()
virtual void update ()
const KURL & url () const
ViewList viewList () const

Static Public Member Functions

static QPoint gridSnap (const QPoint &pos)
 Returns 'pos' when snapped to grid.
static int gridSnap (int pos)

Protected Member Functions

void addAllItemConnectorPoints ()
NodeGroupcreateNodeGroup (Node *node)
bool deleteNodeGroup (Node *node)
virtual void fillContextMenu (const QPoint &pos)
virtual void handleNewView (View *view)
virtual bool isValidItem (const QString &itemId)
virtual bool isValidItem (Item *item)
virtual void itemAdded (Item *item)
void resizeCanvasToItems ()
void setSVGExport (bool svgExport)
void updateBackground ()
void writeFile ()

Protected Attributes

bool b_modified
bool m_bAddToProjectOnSave
bool m_bDeleted
bool m_bIsLoading
Canvasm_canvas
CanvasTipm_canvasTip
QString m_caption
Cellsm_cells
uint m_cellsX
uint m_cellsY
CMManagerm_cmManager
ConnectorList m_connectorList
int m_currentActionTicket
ItemDocumentDatam_currentState
unsigned m_dcopID
QString m_fileExtensionInfo
QStringList m_idList
ItemList m_itemList
uint m_nextIdNum
unsigned m_nextViewID
GuardedNodeGroupList m_nodeGroupList
NodeList m_nodeList
QSize m_oldCanvasSize
KActionMenu * m_pAlignmentAction
DocumentIfacem_pDocumentIface
QTimer * m_pEventTimer
KActionMenu * m_pOrientationAction
unsigned m_queuedEvents
IDDStack m_redoStack
ItemDocumentDatam_savedState
CNItemGroupm_selectList
DocumentType m_type
IDDStack m_undoStack
ViewList m_viewList
IntItemMap m_zOrder
QGuardedPtr< Viewp_activeView
KTechlabp_ktechlab

Static Protected Attributes

static int m_nextActionTicket = 0

Private Slots

void assignCircuits ()

Private Member Functions

CircuitcreateCircuit (Circuitoid *circuitoid)
void deleteCircuits ()
void getPartition (Pin *pin, PinList *pinList, PinList *unassignedPins, bool onlyGroundDependent=false)
void recursivePinAdd (Pin *pin, Circuitoid *circuitoid, PinList *unassignedPins)
void splitIntoCircuits (PinList *pinList)
bool tryAsLogicCircuit (Circuitoid *circuitoid)

Private Attributes

CircuitList m_circuitList
ComponentList m_componentList
PinList m_pinList
SwitchList m_switchList
ComponentList m_toSimulateList
QTimer * m_updateCircuitsTmr
WireList m_wireList

Friends

class CanvasEditor
class ICNView
class ItemView

The documentation for this class was generated from the following files:

Generated by  Doxygen 1.6.0   Back to index