FlowCodeDocument Class Reference

View for editing FlowCode. More...

#include <flowcodedocument.h>

Inheritance diagram for FlowCodeDocument:

Inheritance graph
[legend]
Collaboration diagram for FlowCodeDocument:

Collaboration graph
[legend]
List of all members.

Public Types

enum  ConvertToTarget { MicrobeOutput, AssemblyOutput, HexOutput, PICOutput }

Public Slots

void slotConvertTo (int target)
void convertToMicrobe ()
void convertToAssembly ()
void convertToHex ()
void convertToPIC ()
void varNameChanged (const QString &newValue, const QString &oldValue)

Signals

void picTypeChanged ()
void pinMappingsChanged ()

Public Member Functions

 FlowCodeDocument (const QString &caption, KTechlab *ktechlab, const char *name=0)
 ~FlowCodeDocument ()
virtual ViewcreateView (ViewContainer *viewContainer, uint viewAreaId, const char *name=0)
MicroSettingsmicroSettings () const
void setPicType (const QString &id)

Protected Member Functions

virtual bool isValidItem (Item *item)
virtual bool isValidItem (const QString &itemId)

Detailed Description

View for editing FlowCode.

Author:
David Saxton

Definition at line 34 of file flowcodedocument.h.


Member Function Documentation

View * FlowCodeDocument::createView ( ViewContainer viewContainer,
uint  viewAreaId,
const char *  name = 0 
) [virtual]

Create a view that will display the document data. In all reimplemented functions, you must call handleNewView after creating the view, so that the appropriate slots, pointers, etc can all be initialised.

Reimplemented from ICNDocument.

Definition at line 63 of file flowcodedocument.cpp.

References ItemDocument::handleNewView().

MicroSettings* FlowCodeDocument::microSettings (  )  const [inline]

Returns a pointer used for the MicroSettings in this FlowCode document

Definition at line 46 of file flowcodedocument.h.

Referenced by convertToPIC(), FlowCode::processInput(), and varNameChanged().

void FlowCodeDocument::setPicType ( const QString &  id  ) 

Sets the type of PIC to be used. FlowCodeDocument se virtual void convertToMicrobe();ts the internal MicroInfo pointer to that returned by MicroLibrary for the given id. The pic type must be set before anything useful (such as compilage) can be done.

Definition at line 70 of file flowcodedocument.cpp.

References MicroInfo::id(), MicroSettings::microInfo(), MicroLibrary::microInfoWithID(), and MicroLibrary::self().

void FlowCodeDocument::slotConvertTo ( int  target  )  [slot]

Parameters:
target as ConvertToTarget

Definition at line 151 of file flowcodedocument.cpp.

References convertToAssembly(), convertToHex(), convertToMicrobe(), and convertToPIC().

void FlowCodeDocument::varNameChanged ( const QString &  newValue,
const QString &  oldValue 
) [slot]

Called when a variable name has changed (from an entry box)

Definition at line 260 of file flowcodedocument.cpp.

References MicroSettings::deleteVariable(), Document::m_bDeleted, ItemDocument::m_itemList, microSettings(), MicroSettings::setVariable(), and MicroSettings::variableInfo().

bool FlowCodeDocument::isValidItem ( Item item  )  [protected, virtual]

Returns true if the CNItem is valid - e.g. will return true for a component in a circuit, but not in a pic program

Implements ICNDocument.

Definition at line 106 of file flowcodedocument.cpp.

References ItemDocument::m_itemList.

bool FlowCodeDocument::isValidItem ( const QString &  itemId  )  [protected, virtual]

Returns:
Whether or not the item is valid; i.e. is appropriate to the document being edited, and does not have other special restrictions on it (such as only allowing one instance of the Start part in FlowCode).

Implements ICNDocument.

Definition at line 100 of file flowcodedocument.cpp.


The documentation for this class was generated from the following files:
Generated on Tue May 8 17:05:41 2007 for KTechLab by  doxygen 1.5.1