X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/blast.git/blobdiff_plain/4cf57e6db08da791233d75237f62e74bc88dd427..2bdaa0aa3fab52f0808f60d9bbdabcd56d0efae9:/Parameters.h diff --git a/Parameters.h b/Parameters.h index 8a71cfb..a541ee6 100644 --- a/Parameters.h +++ b/Parameters.h @@ -24,6 +24,7 @@ class Graph; class GroupWidget; #include "BlockImplementation.h" +#include "ExternalResource.h" #include "Exception.h" class Exception; @@ -78,14 +79,23 @@ public : inline void setCursorState(CursorState state) { cursorState = state; } inline void setDispatcher(Dispatcher* _dispatcher) { dispatcher = _dispatcher;} + // testers + + // others + static QString normalizeName(const QString& name); + QList searchResourceByName(const QString& name); + /*************************************************** attributes that are general to the application ***************************************************/ BlockLibraryTree* categoryTree; QList refPathes; QList implPathes; + QList sourcePathes; QList availableBlocks; QList availableImplementations; + QList availableResources; + ReferenceBlock* delayRef; BlockImplementation* delayImpl; @@ -110,8 +120,10 @@ public : QString defaultIfaceFontName; int defaultIfaceFontSize; int connGapLength; - QPainterPath inArrow; - QPainterPath outArrow; + QPainterPath dataArrowIn; + QPainterPath dataArrowOut; + QPainterPath clkrstArrow; + /*************************************************** attributes that are specific for the current project @@ -123,11 +135,17 @@ public : bool unsaveModif; bool isRstClkShown; QMap blockToItem; // allow to retrieve a box item from a functionnal block + QString projectPath; + QString projectName; + QString projectFile; // equals to projectPath/projectName.xml + bool autoConnMainClk; // true if auto-connection to main clock (i.e. ext_clk) + QList clocks; // clocks[0] is the main clock. - Graph* createGraph(); + Graph* createGraph(bool createTopGroupIfaces = true); void destroyGraph(); inline Graph* getGraph() { return graph; } ReferenceBlock* getReferenceBlock(int idCategory, int idBlock); // get the reference block from its category and index + ReferenceBlock* getHiddenReferenceBlock(QString blockName); // get a hidden block by name, i.e. in category 100 FunctionalBlock* duplicateFunctionalBlock(FunctionalBlock* block); // adding a copy of a functional block to current group @@ -146,6 +164,8 @@ public : void loadImplementationsFromLib() throw(Exception); void saveImplementationsToLib() throw(Exception); + void loadSources() throw(Exception); + void addAvailableBlock(ReferenceBlock *block); void parametersValidation(); void connectionsValidation(); @@ -162,7 +182,7 @@ public : void save(QString confFile); - QString projectPath; + private: Graph* graph; // the graph model of blocks