1 #ifndef __DISPATCHER_H__
2 #define __DISPATCHER_H__
15 class AbstractBoxItem;
29 Dispatcher(Parameters* _params,
32 GroupWidget* loadProject(const QString& filename);
34 inline int getNumberOfScenes() { return groupList.length(); }
35 bool connect(InterfaceItem *iface1, InterfaceItem *iface2);
36 void checkSelection();
37 void unselectAllItems(int direction=0);
38 void setCurrentGroupWidget(GroupWidget *win);
39 void changeConnectionMode(int mode = -1);
40 void rename(AbstractBoxItem* item);
41 void rename(InterfaceItem* item);
42 GroupWidget* createTopScene();
43 GroupWidget* createChildScene(GroupWidget* parentWidget, BoxItem* upperItemOfGroupItem = NULL);
44 void showRaiseWindow(AbstractBoxItem *item);
45 void showRstClkInter(AbstractBoxItem *item);
46 void addNewEmptyGroup();
47 void addNewFullGroup();
49 inline GroupWidget* getCurrentGroup() { return currentGroup; }
51 bool isCurrentProject;
54 QMap<int, QString> getAllGroupNames();
55 GroupScene* searchSceneById(int id);
56 GroupScene* searchSceneByName(QString name);
57 BoxItem* searchBlockItemById(int id);
58 GroupItem* searchGroupItemById(int id);
59 InterfaceItem* searchInterfaceItemById(int id);
61 void removeBlock(AbstractBoxItem* item);
62 void duplicateBlock(BoxItem* item);
63 void duplicateInterface(InterfaceItem* item);
64 void addBlock(int idCategory, int idBlock, int idScene);
65 ConnectionItem *addConnection(InterfaceItem *input, InterfaceItem *output);
66 void removeAllBlockConnections(AbstractBoxItem *block);
67 void removeConnection(ConnectionItem *conn);
68 void removeUselessGroupInterfaces();
69 void showBlocksLibrary();
70 void showProperties(InterfaceItem *inter);
71 void connectInterToGroup(InterfaceItem* item);
72 void disconnectInterFromGroup(InterfaceItem* item);
73 void removeGroupInterface(InterfaceItem* item);
77 void closeCurrentProject();
84 // attributes that corresponds to the views
85 MainWindow* mainWindow;
86 QList<GroupWidget*> groupList;
87 GroupWidget* currentGroup;
88 GroupWidget *topGroup;
90 static int sceneCounter;
93 #endif // __DISPATCHER_H__