#include <itemdocument.h>
Inheritance diagram for ItemDocument:


Public Slots | |
| virtual void | undo () |
| virtual void | redo () |
| virtual void | cut () |
| virtual void | paste () |
| virtual void | selectAll ()=0 |
| void | raiseZ () |
| void | lowerZ () |
| void | exportToImage () |
| virtual void | deleteSelection () |
| void | cancelCurrentOperation () |
| void | alignHorizontally () |
| void | alignVertically () |
| void | distributeHorizontally () |
| void | distributeVertically () |
| void | slotUpdateZOrdering () |
| void | slotSetDrawAction (int da) |
| void | slotSetRepeatedItemId (const QString &id) |
| void | slotUnsetRepeatedItemId () |
| virtual void | slotUpdateConfiguration () |
| virtual void | slotInitItemActions (Item *item=0) |
| void | processItemDocumentEvents () |
Signals | |
| void | itemSelected (Item *item) |
| void | itemUnselected (Item *item=0) |
Public Member Functions | |
| ItemDocument (const QString &caption, KTechlab *ktechlab, const char *name=0) | |
| ~ItemDocument () | |
| virtual void | fileSave () |
| virtual void | fileSaveAs () |
| virtual void | print () |
| virtual bool | openURL (const KURL &url) |
| virtual bool | registerItem (QCanvasItem *qcanvasItem) |
| virtual Item * | addItem (const QString &id, const QPoint &p, bool newItem)=0 |
| Canvas * | canvas () const |
| bool | registerUID (const QString &uid) |
| QString | generateUID (QString name) |
| void | unregisterUID (const QString &uid) |
| virtual bool | isValidItem (Item *item)=0 |
| virtual bool | isValidItem (const QString &itemId)=0 |
| void | raiseZ (const ItemList &itemList) |
| void | lowerZ (const ItemList &itemList) |
| virtual ItemGroup * | selectList () const=0 |
| void | unselectAll () |
| void | select (const QCanvasItemList &list) |
| void | select (QCanvasItem *item) |
| void | unselect (QCanvasItem *qcanvasItem) |
| virtual void | flushDeleteList ()=0 |
| QRect | canvasBoundingRect () const |
| Item * | itemWithID (const QString &) |
| virtual bool | isUndoAvailable () const |
| virtual bool | isRedoAvailable () const |
| QCanvasItem * | itemAtTop (const QPoint &pos) const |
| virtual void | canvasRightClick (const QPoint &pos, QCanvasItem *item) |
| ItemList | itemList () const |
| virtual void | appendDeleteList (QCanvasItem *)=0 |
| void | requestStateSave (int actionTicket=-1) |
| int | getActionTicket () const |
| void | clearHistory () |
| void | requestEvent (ItemDocumentEvent::type type) |
| virtual void | update () |
Protected Member Functions | |
| virtual void | itemAdded (Item *item) |
| virtual void | handleNewView (View *view) |
| void | setSVGExport (bool svgExport) |
| void | writeFile () |
| virtual void | fillContextMenu (const QPoint &pos) |
| void | updateBackground () |
| void | resizeCanvasToItems () |
Protected Attributes | |
| Canvas * | m_canvas |
| KTechlab * | p_ktechlab |
| QStringList | m_idList |
| uint | m_nextIdNum |
| bool | m_bIsLoading |
| QSize | m_oldCanvasSize |
| CMManager * | m_cmManager |
| ItemList | m_itemDeleteList |
| ItemList | m_itemList |
| IDDStack | m_undoStack |
| IDDStack | m_redoStack |
| ItemDocumentData * | m_currentState |
| int | m_currentActionTicket |
| ItemDocumentData * | m_savedState |
| QString | m_fileExtensionInfo |
| CanvasTip * | m_canvasTip |
| IntItemMap | m_zOrder |
| KActionMenu * | m_pAlignmentAction |
| QTimer * | m_pEventTimer |
| unsigned | m_queuedEvents |
Static Protected Attributes | |
| static int | m_nextActionTicket |
Friends | |
| class | ICNView |
| class | ItemView |
Classes | |
| class | ItemDocumentEvent |
| class | RTTI |
| class | Z |
Definition at line 42 of file itemdocument.h.
| void ItemDocument::fileSave | ( | ) | [virtual] |
Saves the file.
Implements Document.
Definition at line 154 of file itemdocument.cpp.
References Document::getURL(), m_fileExtensionInfo, Document::url(), and writeFile().
| void ItemDocument::fileSaveAs | ( | ) | [virtual] |
Saves the file to a new name.
Implements Document.
Definition at line 160 of file itemdocument.cpp.
References Document::getURL(), m_fileExtensionInfo, Document::modifiedStateChanged(), and writeFile().
| void ItemDocument::print | ( | ) | [virtual] |
Prints the file.
Reimplemented from Document.
Definition at line 229 of file itemdocument.cpp.
References canvasBoundingRect(), m_canvas, p_ktechlab, and updateBackground().
| bool ItemDocument::openURL | ( | const KURL & | url | ) | [virtual] |
Attempts to open a url, and returns true if succesful. You must reinherit this function.
Implements Document.
Definition at line 182 of file itemdocument.cpp.
References clearHistory(), Simulator::isSimulating(), ItemDocumentData::loadData(), m_bIsLoading, m_currentState, m_itemList, m_savedState, m_zOrder, requestEvent(), ItemDocumentData::restoreDocument(), Simulator::self(), Document::setModified(), Document::setURL(), Simulator::slotSetSimulating(), slotUpdateZOrdering(), and Document::type().
Referenced by DocManager::openCircuitFile(), DocManager::openFlowCodeFile(), DocManager::openMechanicsFile(), and FlowCode::processInput().
| bool ItemDocument::registerItem | ( | QCanvasItem * | qcanvasItem | ) | [virtual] |
Attempt to register the item, returning true iff successful
Reimplemented in ICNDocument, and MechanicsDocument.
Definition at line 108 of file itemdocument.cpp.
References itemAdded(), itemSelected(), itemUnselected(), m_itemList, and requestEvent().
Referenced by DrawPart::DrawPart(), MechanicsDocument::registerItem(), and ICNDocument::registerItem().
| virtual Item* ItemDocument::addItem | ( | const QString & | id, | |
| const QPoint & | p, | |||
| bool | newItem | |||
| ) | [pure virtual] |
Will attempt to create an item with the given id at position p. Some item (such as PIC/START) have restrictions, and can only have one instance of themselves on the canvas, and adds the operation to the undo list
Implemented in ICNDocument, and MechanicsDocument.
Referenced by CMDraw::mouseReleased().
| Canvas* ItemDocument::canvas | ( | ) | const [inline] |
Definition at line 119 of file itemdocument.h.
References m_canvas.
Referenced by MechanicsDocument::addItem(), ICNDocument::addItem(), canvasBoundingRect(), CanvasManipulator::CanvasManipulator(), ICNDocument::createCellMap(), exportToImage(), ManualConnectorDraw::ManualConnectorDraw(), ConRouter::mapRoute(), ManualConnectorDraw::mouseClicked(), PinItem::PinItem(), and resizeCanvasToItems().
| bool ItemDocument::registerUID | ( | const QString & | uid | ) |
Attemtps to register a unique id for the canvas view of an item on the canvas. If the id does not already exist, will return true; otherwise the function will return false.
Definition at line 489 of file itemdocument.cpp.
References m_idList.
Referenced by Connector::Connector(), generateUID(), and Node::Node().
| QString ItemDocument::generateUID | ( | QString | name | ) |
Generates a unique id based on a possibly unique component name.
Definition at line 505 of file itemdocument.cpp.
References m_nextIdNum, and registerUID().
Referenced by Connector::Connector(), ItemDocumentData::generateUniqueIDs(), and Node::Node().
| void ItemDocument::unregisterUID | ( | const QString & | uid | ) |
Unlists the given id as one that is used.
Definition at line 500 of file itemdocument.cpp.
References m_idList.
Referenced by Connector::~Connector(), and Node::~Node().
| virtual bool ItemDocument::isValidItem | ( | Item * | item | ) | [pure virtual] |
Implemented in CircuitDocument, FlowCodeDocument, PinMapDocument, ICNDocument, and MechanicsDocument.
Referenced by ItemDocumentData::mergeWithDocument().
| virtual bool ItemDocument::isValidItem | ( | const QString & | itemId | ) | [pure virtual] |
Implemented in CircuitDocument, FlowCodeDocument, PinMapDocument, ICNDocument, and MechanicsDocument.
| void ItemDocument::raiseZ | ( | const ItemList & | itemList | ) |
Increases the "height" of the given list of items by "one".
Definition at line 877 of file itemdocument.cpp.
References Item::contains(), m_zOrder, and slotUpdateZOrdering().
| void ItemDocument::lowerZ | ( | const ItemList & | itemList | ) |
Decreases the "height" of the given list of items by "one".
Definition at line 907 of file itemdocument.cpp.
References Item::contains(), m_zOrder, and slotUpdateZOrdering().
| virtual ItemGroup* ItemDocument::selectList | ( | ) | const [pure virtual] |
Implemented in ICNDocument, and MechanicsDocument.
Referenced by alignHorizontally(), alignVertically(), CanvasManipulator::CanvasManipulator(), distributeHorizontally(), distributeVertically(), fillContextMenu(), lowerZ(), raiseZ(), select(), slotInitItemActions(), unselect(), and unselectAll().
| void ItemDocument::unselectAll | ( | ) |
Deselects any currently selected items
Definition at line 404 of file itemdocument.cpp.
References ItemGroup::removeAllItems(), and selectList().
Referenced by PicItem::buttonStateChanged(), canvasRightClick(), CMSelect::mousePressedInitial(), CMMechItemMove::mousePressedInitial(), CMItemMove::mousePressedInitial(), CMManualConnector::mousePressedInitial(), CMAutoConnector::mousePressedInitial(), and paste().
| void ItemDocument::select | ( | const QCanvasItemList & | list | ) |
Select a list of QCanvasItem's
Definition at line 415 of file itemdocument.cpp.
References ItemGroup::addQCanvasItem(), selectList(), and ItemGroup::setSelected().
Referenced by canvasRightClick(), ItemDocumentData::mergeWithDocument(), CMSelect::mouseMoved(), CMMechItemMove::mousePressedInitial(), CMItemMove::mousePressedInitial(), MechanicsDocument::selectAll(), and ICNDocument::selectAll().
| void ItemDocument::select | ( | QCanvasItem * | item | ) |
| void ItemDocument::unselect | ( | QCanvasItem * | qcanvasItem | ) |
Unselects the item
Definition at line 424 of file itemdocument.cpp.
References ItemGroup::removeQCanvasItem(), and selectList().
Referenced by CMMechItemMove::mousePressedInitial(), and CMItemMove::mousePressedInitial().
| virtual void ItemDocument::flushDeleteList | ( | ) | [pure virtual] |
Deletes anything waiting to be deleted.
Implemented in ICNDocument, and MechanicsDocument.
Referenced by ItemDocumentData::mergeWithDocument(), paste(), and ItemDocumentData::restoreDocument().
| QRect ItemDocument::canvasBoundingRect | ( | ) | const |
Returns a rubber-band rectangle that contains all of the items on the canvas, padded out by a small border.
Definition at line 706 of file itemdocument.cpp.
References canvas().
Referenced by exportToImage(), print(), and resizeCanvasToItems().
| Item * ItemDocument::itemWithID | ( | const QString & | ) |
Returns a pointer to a Item on the canvas with the given id, or NULL if no such Item exists.
Definition at line 394 of file itemdocument.cpp.
References m_itemList.
Referenced by ICNDocument::cnItemWithID(), SubcircuitData::initECSubcircuit(), MechanicsDocument::mechanicsItemWithID(), ItemDocumentData::mergeWithDocument(), and ItemDocumentData::restoreDocument().
| bool ItemDocument::isUndoAvailable | ( | ) | const [virtual] |
Returns true if the the user can perform an undo action (i.e. the undo stack is not empty)
Reimplemented from Document.
Definition at line 330 of file itemdocument.cpp.
References m_undoStack.
| bool ItemDocument::isRedoAvailable | ( | ) | const [virtual] |
Returns true if the the user can perform an redo action (i.e. the redo stack is not empty)
Reimplemented from Document.
Definition at line 335 of file itemdocument.cpp.
References m_redoStack.
| QCanvasItem * ItemDocument::itemAtTop | ( | const QPoint & | pos | ) | const |
Returns the top item at point (x, y), or NULL if there is no item there
Definition at line 436 of file itemdocument.cpp.
References m_canvas, and m_canvasTip.
Referenced by ManualConnectorDraw::ManualConnectorDraw(), ManualConnectorDraw::mouseClicked(), CMManualConnector::mouseMoved(), CMAutoConnector::mouseMoved(), CMManager::mouseMoveEvent(), CMAutoConnector::mouseReleased(), CMManager::mouseReleaseEvent(), ItemView::updateStatus(), and CMManager::wheelEvent().
| void ItemDocument::canvasRightClick | ( | const QPoint & | pos, | |
| QCanvasItem * | item | |||
| ) | [virtual] |
Called when the canvas is clicked on with the right mouse button. Popups up a menu for editing operations
Definition at line 515 of file itemdocument.cpp.
References fillContextMenu(), p_ktechlab, select(), and unselectAll().
Referenced by CMRightClick::mousePressedInitial().
| ItemList ItemDocument::itemList | ( | ) | const [inline] |
List of items in the ItemDocument
Definition at line 213 of file itemdocument.h.
References m_itemList.
Referenced by CircuitDocument::createSubcircuit(), CMItemMove::mousePressedInitial(), CMItemMove::mouseReleased(), FlowCode::processInput(), ItemDocumentData::restoreDocument(), and ItemDocumentData::saveDocumentState().
| virtual void ItemDocument::appendDeleteList | ( | QCanvasItem * | ) | [pure virtual] |
Set the given QCanvasItem (which will attempt to be casted to known items to be deleted.
Implemented in ICNDocument, and MechanicsDocument.
| void ItemDocument::requestStateSave | ( | int | actionTicket = -1 |
) |
Save the current state of the document to the undo/redo history.
| actionTicket | if this is non-negative, and the last state save also had the same actionTicket, then the next state save will overwrite the previous state save. |
Definition at line 281 of file itemdocument.cpp.
References m_bIsLoading, m_currentActionTicket, m_currentState, m_redoStack, m_savedState, m_undoStack, Document::setModified(), Document::type(), and Document::undoRedoStateChanged().
Referenced by MechanicsDocument::addItem(), ICNDocument::addItem(), CircuitDocument::CircuitDocument(), clearHistory(), MechanicsDocument::deleteSelection(), ICNDocument::deleteSelection(), FlowCodeDocument::FlowCodeDocument(), MechanicsDocument::MechanicsDocument(), CMRepeatedItemAdd::mousePressedInitial(), CMDraw::mouseReleased(), CMItemDrag::mouseReleased(), CMMechItemMove::mouseReleased(), CMItemResize::mouseReleased(), CMItemMove::mouseReleased(), CMManualConnector::mouseReleased(), CMAutoConnector::mouseReleased(), paste(), CNItemGroup::setComponentOrientation(), CNItemGroup::setFlowPartOrientation(), CNItemGroup::setOrientationAngle(), ItemGroup::slotAlignHorizontally(), ItemGroup::slotAlignVertically(), ItemGroup::slotDistributeHorizontally(), ItemGroup::slotDistributeVertically(), CNItemGroup::slotFlip(), PicItem::slotMicroSettingsDlgAccepted(), CNItemGroup::slotRotateCCW(), and CNItemGroup::slotRotateCW().
| int ItemDocument::getActionTicket | ( | ) | const [inline] |
Returns a unique id, for use in requestStateSave
Definition at line 230 of file itemdocument.h.
References m_nextActionTicket.
| void ItemDocument::clearHistory | ( | ) |
Clears the undo / redo history
Definition at line 321 of file itemdocument.cpp.
References m_currentState, m_redoStack, m_undoStack, and requestStateSave().
Referenced by PinMapDocument::init(), and openURL().
| void ItemDocument::requestEvent | ( | ItemDocumentEvent::type | type | ) |
Requests an event to be done after other stuff (editing, etc) is finished.
Definition at line 629 of file itemdocument.cpp.
References m_pEventTimer, and m_queuedEvents.
Referenced by handleNewView(), itemAdded(), CMMechItemMove::mouseMoved(), CMItemMove::mouseMoved(), CMMechItemMove::mouseReleased(), CMItemMove::mouseReleased(), openURL(), registerItem(), ICNDocument::requestRerouteInvalidatedConnectors(), resizeCanvasToItems(), and ICNDocument::slotRequestAssignNG().
| void ItemDocument::update | ( | ) | [virtual] |
Called from Canvas (when QCanvas::advance is called).
Reimplemented in CircuitDocument.
Definition at line 973 of file itemdocument.cpp.
References m_itemList.
Referenced by Canvas::update(), and CircuitDocument::update().
| void ItemDocument::undo | ( | ) | [virtual, slot] |
Undo the last operation. You should reinherit this function.
Reimplemented from Document.
Definition at line 340 of file itemdocument.cpp.
References m_currentState, m_redoStack, m_savedState, m_undoStack, ItemDocumentData::restoreDocument(), Document::setModified(), and Document::undoRedoStateChanged().
| void ItemDocument::redo | ( | ) | [virtual, slot] |
Redo the undone last operation. You should reinherit this function.
Reimplemented from Document.
Definition at line 354 of file itemdocument.cpp.
References m_currentState, m_redoStack, m_savedState, m_undoStack, ItemDocumentData::restoreDocument(), Document::setModified(), and Document::undoRedoStateChanged().
| void ItemDocument::cut | ( | ) | [virtual, slot] |
Cuts whatever is selected.
Reimplemented from Document.
Definition at line 369 of file itemdocument.cpp.
References Document::copy(), and deleteSelection().
| void ItemDocument::paste | ( | ) | [virtual, slot] |
Attempts to paste whatever is in the clipboard.
Reimplemented from Document.
Definition at line 375 of file itemdocument.cpp.
References flushDeleteList(), ItemDocumentData::fromXML(), ItemDocumentData::generateUniqueIDs(), ItemDocumentData::mergeWithDocument(), requestStateSave(), ItemDocumentData::translateContents(), Document::type(), and unselectAll().
| virtual void ItemDocument::selectAll | ( | ) | [pure virtual, slot] |
Selects everything in the view.
Reimplemented from Document.
Implemented in ICNDocument, and MechanicsDocument.
| void ItemDocument::raiseZ | ( | ) | [slot] |
Increases the "height" of the selected items.
Definition at line 872 of file itemdocument.cpp.
References ItemLibrary::items(), and selectList().
| void ItemDocument::lowerZ | ( | ) | [slot] |
Decreases the "height" of the selected items.
Definition at line 903 of file itemdocument.cpp.
References ItemLibrary::items(), and selectList().
| void ItemDocument::exportToImage | ( | ) | [slot] |
Brings up a file dialog requesting the location of the file to export to, and then exports an image of the canvas.
Definition at line 729 of file itemdocument.cpp.
References canvas(), canvasBoundingRect(), m_canvas, p_ktechlab, setSVGExport(), Document::type(), updateBackground(), and Document::url().
| virtual void ItemDocument::deleteSelection | ( | ) | [inline, virtual, slot] |
Deletes whatever is selected.
Reimplemented in PinMapDocument, ICNDocument, and MechanicsDocument.
Definition at line 269 of file itemdocument.h.
Referenced by cut().
| void ItemDocument::cancelCurrentOperation | ( | ) | [slot] |
Called when the user presses Escape (or similar)
Definition at line 138 of file itemdocument.cpp.
References CMManager::cancelCurrentManipulation(), and m_cmManager.
| void ItemDocument::alignHorizontally | ( | ) | [slot] |
Sets the y-positions of the selected items to the average of the initial y-positions.
Definition at line 461 of file itemdocument.cpp.
References selectList(), and ItemGroup::slotAlignHorizontally().
| void ItemDocument::alignVertically | ( | ) | [slot] |
Sets the x-positions of the selected items to the average of the initial x-positions.
Definition at line 468 of file itemdocument.cpp.
References selectList(), and ItemGroup::slotAlignVertically().
| void ItemDocument::distributeHorizontally | ( | ) | [slot] |
Averages out the horizontal spacing between the selected items.
Definition at line 475 of file itemdocument.cpp.
References selectList(), and ItemGroup::slotDistributeHorizontally().
| void ItemDocument::distributeVertically | ( | ) | [slot] |
Averages out the vertical spacing between the selected items.
Definition at line 482 of file itemdocument.cpp.
References selectList(), and ItemGroup::slotDistributeVertically().
| void ItemDocument::slotUpdateZOrdering | ( | ) | [slot] |
Adds an items not in the Z ordering to the ordering, and removes any items from the Z ordering if they have parents. Then, calls all items found in the ordering to tell them their Z position.
Definition at line 937 of file itemdocument.cpp.
References m_itemList, and m_zOrder.
Referenced by lowerZ(), openURL(), processItemDocumentEvents(), and raiseZ().
| void ItemDocument::slotSetDrawAction | ( | int | da | ) | [slot] |
Call this with ItemDocument::DrawAction to start drawing the given thing
Definition at line 133 of file itemdocument.cpp.
References m_cmManager, and CMManager::setDrawAction().
| void ItemDocument::slotSetRepeatedItemId | ( | const QString & | id | ) | [slot] |
Sets the editing mode to repeatedly creating a CNItem with the given id. Usually called when the user double-clicks on the component box.
Definition at line 143 of file itemdocument.cpp.
References m_cmManager, CMManager::setCMState(), and CMManager::setRepeatedAddId().
| void ItemDocument::slotUnsetRepeatedItemId | ( | ) | [slot] |
Unsets the editing mode from repeatedly creating a CNItem
Definition at line 149 of file itemdocument.cpp.
References m_cmManager, and CMManager::setCMState().
Referenced by ItemDocument().
| void ItemDocument::slotUpdateConfiguration | ( | ) | [virtual, slot] |
Called when the user changes the configuration. This, for example, will tell the CNItems on the canvas to update their configuration.
Reimplemented from Document.
Reimplemented in CircuitDocument.
Definition at line 430 of file itemdocument.cpp.
References m_canvas, and updateBackground().
Referenced by ItemDocument(), and CircuitDocument::slotUpdateConfiguration().
| void ItemDocument::slotInitItemActions | ( | Item * | item = 0 |
) | [virtual, slot] |
Enables / disables / selects various actions depending on what is selected or not.
Reimplemented in CircuitDocument.
Definition at line 570 of file itemdocument.cpp.
References View::action(), Document::activeView(), ItemGroup::itemCount(), p_ktechlab, and selectList().
Referenced by ICNDocument::fillContextMenu(), ItemDocument(), and CircuitDocument::slotInitItemActions().
| void ItemDocument::processItemDocumentEvents | ( | ) | [slot] |
Process queued events (see ItemDocument::ItemDocumentEvent).
Definition at line 637 of file itemdocument.cpp.
References m_queuedEvents, ICNDocument::rerouteInvalidatedConnectors(), resizeCanvasToItems(), ICNDocument::slotAssignNodeGroups(), and slotUpdateZOrdering().
Referenced by ItemDocument().
| void ItemDocument::itemSelected | ( | Item * | item | ) | [signal] |
Emitted when a Item is selected
Referenced by MechanicsDocument::appendDeleteList(), ItemDocument(), and registerItem().
| void ItemDocument::itemUnselected | ( | Item * | item = 0 |
) | [signal] |
Emitted when a Item is unselected
Referenced by MechanicsDocument::appendDeleteList(), MechanicsDocument::deleteSelection(), ICNDocument::deleteSelection(), ItemDocument(), and registerItem().
| void ItemDocument::itemAdded | ( | Item * | item | ) | [protected, virtual] |
Called from registerItem when a new item is added.
Reimplemented in CircuitDocument.
Definition at line 932 of file itemdocument.cpp.
References requestEvent().
Referenced by CircuitDocument::itemAdded(), and registerItem().
| void ItemDocument::handleNewView | ( | View * | view | ) | [protected, virtual] |
You must call this function after creating a new view
Reimplemented from Document.
Definition at line 102 of file itemdocument.cpp.
References Document::handleNewView(), and requestEvent().
Referenced by MechanicsDocument::createView(), ICNDocument::createView(), FlowCodeDocument::createView(), and CircuitDocument::createView().
| void ItemDocument::setSVGExport | ( | bool | svgExport | ) | [protected] |
Set to true to remove buttons and grid and so on from the canvas, set false to put them back
Definition at line 860 of file itemdocument.cpp.
References ItemLibrary::items(), and m_canvas.
Referenced by exportToImage().
| void ItemDocument::fillContextMenu | ( | const QPoint & | pos | ) | [protected, virtual] |
Reinherit this if you want to add any options to the right-click context
Reimplemented in CircuitDocument, and ICNDocument.
Definition at line 539 of file itemdocument.cpp.
References View::action(), Document::activeView(), ItemGroup::itemCount(), m_pAlignmentAction, p_ktechlab, and selectList().
Referenced by canvasRightClick(), and ICNDocument::fillContextMenu().
| void ItemDocument::updateBackground | ( | ) | [protected] |
Reads the background settings (grid-colour, underlying colour) from the Config settings, and generates the background pixmap from those settings
Definition at line 590 of file itemdocument.cpp.
References m_canvas.
Referenced by exportToImage(), ItemDocument(), print(), and slotUpdateConfiguration().
| void ItemDocument::resizeCanvasToItems | ( | ) | [protected] |
Sets the canvas size to both (a) containing all items present on the canvas, and (b) no smaller than the smallest view of the canvas. This function should only be called by processItemDocumentEvents - a resize request must be made with requestEvent.
Definition at line 659 of file itemdocument.cpp.
References canvas(), canvasBoundingRect(), Document::m_viewList, and requestEvent().
Referenced by processItemDocumentEvents().
1.5.1