everything other than the main window is a tool
More...
#include <Tool.h>
List of all members.
Public Slots |
virtual void | select (int i=0) |
| what happens when this tool is selected
|
virtual void | deselect (int i=0) |
| what happens when this tool is deselected
|
virtual void | addAction (const QIcon &, const QString &text=QString(), const QString &tooltip=QString()) |
| add an action that will be displayed in the context menu when specific items with this tool in their tools list are selected
|
virtual void | addGraphicsItem (ToolGraphicsItem *) |
| add a graphics item that will be displayed on the current scene when specific items with this tool in their tools list are selected
|
Signals |
void | selected () |
| this tool is selected
|
void | deselected () |
| this tool is deselected
|
Public Member Functions |
| Tool () |
| constructor
|
| ~Tool () |
| destructor. removes graphicsItem and toolButton is not 0
|
| Tool (const QString &Name, const QString &category=QString(), QWidget *parent=0) |
| constructor
|
virtual bool | setMainWindow (MainWindow *main) |
| set the main window for this tool
|
ConsoleWindow * | console () |
| console window (same as mainWindow->console())
|
GraphicsScene * | currentScene () const |
| the main window's current scene
|
TextEditor * | currentTextEditor () const |
| the main window's current text editor
|
NetworkHandle * | currentNetwork () const |
| the main window's current network
|
NetworkWindow * | currentWindow () const |
| the main window's current network's current window
|
QPair< QList< ItemHandle * >
, QList< QGraphicsItem * > > | getItemsFromFile (const QString &filename) |
| get the items inside a file. Some tool must implement this function and connect to the getItemsFromFile signal. The Core library does not implement a read file function.
|
Static Public Member Functions |
static QString | homeDir () |
| same as MainWindow::homeDir
|
static QString | tempDir () |
| same as MainWindow::tempDir
|
Public Attributes |
QString | name |
| name of this tool
|
QString | category |
| category that this tool belongs in
|
QString | description |
| brief description of this tool
|
MainWindow * | mainWindow |
| main window for this tool
|
Protected Slots |
virtual void | actionTriggered (QAction *action) |
| context menu action triggered
|
Friends |
class | GraphicsScene |
class | TextEditor |
class | MainWindow |
class | NetworkHandle |
class | ToolGraphicsItem |
Detailed Description
everything other than the main window is a tool
Definition at line 40 of file Tool.h.
Constructor & Destructor Documentation
Tinkercell::Tool::Tool |
( |
| ) |
|
constructor
Definition at line 59 of file Tool.cpp.
Tinkercell::Tool::~Tool |
( |
| ) |
|
destructor. removes graphicsItem and toolButton is not 0
Definition at line 46 of file Tool.cpp.
Tinkercell::Tool::Tool |
( |
const QString & |
Name, |
|
|
const QString & |
category = QString() , |
|
|
QWidget * |
parent = 0 |
|
) |
| |
constructor
- Parameters:
-
QString | name |
QString | category (default = empty) |
QWidget* | parent (default = 0) |
Definition at line 66 of file Tool.cpp.
Member Function Documentation
void Tinkercell::Tool::actionTriggered |
( |
QAction * |
action | ) |
[protected, virtual, slot] |
context menu action triggered
Definition at line 85 of file Tool.cpp.
void Tinkercell::Tool::addAction |
( |
const QIcon & |
icon, |
|
|
const QString & |
text = QString() , |
|
|
const QString & |
tooltip = QString() |
|
) |
| [virtual, slot] |
add an action that will be displayed in the context menu when specific items with this tool in their tools list are selected
Definition at line 161 of file Tool.cpp.
void Tinkercell::Tool::addGraphicsItem |
( |
ToolGraphicsItem * |
item | ) |
[virtual, slot] |
add a graphics item that will be displayed on the current scene when specific items with this tool in their tools list are selected
Definition at line 168 of file Tool.cpp.
the main window's current network
- Returns:
- NetworkHandle* current network handle
Definition at line 132 of file Tool.cpp.
the main window's current scene
Definition at line 118 of file Tool.cpp.
TextEditor * Tinkercell::Tool::currentTextEditor |
( |
| ) |
const |
the main window's current text editor
Definition at line 125 of file Tool.cpp.
the main window's current network's current window
- Returns:
- NetworkWindow* current network window
Definition at line 111 of file Tool.cpp.
void Tinkercell::Tool::deselect |
( |
int |
i = 0 | ) |
[virtual, slot] |
what happens when this tool is deselected
Definition at line 100 of file Tool.cpp.
void Tinkercell::Tool::deselected |
( |
| ) |
[signal] |
QPair< QList< ItemHandle * >, QList< QGraphicsItem * > > Tinkercell::Tool::getItemsFromFile |
( |
const QString & |
filename | ) |
|
get the items inside a file. Some tool must implement this function and connect to the getItemsFromFile signal. The Core library does not implement a read file function.
- Parameters:
-
QString& | file that is selected by user |
- Returns:
- QPair< QList<ItemHandle*>, QList<QGraphicsItem*> > list of handles and graphics items inside the file
-
void
Definition at line 174 of file Tool.cpp.
QString Tinkercell::Tool::homeDir |
( |
| ) |
[static] |
same as MainWindow::homeDir
Definition at line 139 of file Tool.cpp.
void Tinkercell::Tool::select |
( |
int |
i = 0 | ) |
[virtual, slot] |
what happens when this tool is selected
Definition at line 92 of file Tool.cpp.
void Tinkercell::Tool::selected |
( |
| ) |
[signal] |
bool Tinkercell::Tool::setMainWindow |
( |
MainWindow * |
main | ) |
[virtual] |
QString Tinkercell::Tool::tempDir |
( |
| ) |
[static] |
same as MainWindow::tempDir
Definition at line 144 of file Tool.cpp.
Friends And Related Function Documentation
Member Data Documentation
category that this tool belongs in
Definition at line 49 of file Tool.h.
brief description of this tool
Definition at line 51 of file Tool.h.
main window for this tool
Definition at line 53 of file Tool.h.
name of this tool
Definition at line 47 of file Tool.h.
The documentation for this class was generated from the following files: