SubdividePlugin Class Reference
This is a simple Subdivide" plugin for Scribus 1.3 and later. More...
#include <subdivide.h>


Public Member Functions | |
| SubdividePlugin () | |
| virtual | ~SubdividePlugin () |
| virtual bool | run (ScribusDoc *doc, QString target=QString::null) |
| Run the plug-in's main action. | |
| virtual const QString | fullTrName () const |
| Plug-in's human-readable, translated name. | |
| virtual const AboutData * | getAboutData () const |
| Return descriptive information about the plug-in. | |
| virtual void | deleteAboutData (const AboutData *about) const |
| virtual void | languageChange () |
| Update all user-visible text to reflect current UI language. | |
| virtual void | addToMainWindowMenu (ScribusMainWindow *) |
| Allow plugins to add to a main menu. | |
Detailed Description
This is a simple Subdivide" plugin for Scribus 1.3 and later.
- Date:
- October 2007
Definition at line 38 of file subdivide.h.
Constructor & Destructor Documentation
| SubdividePlugin::SubdividePlugin | ( | ) |
| SubdividePlugin::~SubdividePlugin | ( | ) | [virtual] |
Definition at line 57 of file subdivide.cpp.
Member Function Documentation
| bool SubdividePlugin::run | ( | ScribusDoc * | doc, | |
| QString | target = QString::null | |||
| ) | [virtual] |
Run the plug-in's main action.
Run the plug-in's default action synchronously, blocking the rest of the application until this method returns.
This method should generally call run(..., QIODevice* target) or run(..., QString target) to do the work. This is done by default, with the assumption that the target is a file. The argument is opened as QFile with IO_ReadOnly or IO_WriteOnly mode, depending on plugin type, and passed to run(..., QIODevice*). Override this if you need more flexibility.
The optional target argument is a plugin-defined string indicating what the plugin should operate on. It will typically be a filename to import from / export to. Nothing stops a plugin doing funky things like accepting a WebDAV URI, etc, however.
Plug-in authors might want to consider implementing this using the DeferredTask subclass used in runAsync, if the plug-in supports it.
- Parameters:
-
target Optional target to operate on (see above)
- Returns:
- bool True for success.
Implements ScActionPlugin.
Definition at line 102 of file subdivide.cpp.
References FPointArray::addPoint(), ScribusDoc::AdjustItemSize(), ScribusDoc::changed(), PageItem::ClipEdited, PageItem::ContourLine, Selection::count(), ScribusMainWindow::doc, PageItem::Frame, PageItem::FrameType, PageItem::height, NodeEditContext::isContourLine, Selection::itemAt(), ScribusDoc::m_Selection, ScribusDoc::nodeEdit, PageItem::OldB2, PageItem::OldH2, FPointArray::point(), PageItem::PoLine, ScribusCore::primaryMainWindow(), ScribusDoc::regionsChanged(), ScCore, FPointArray::setMarker(), FPointArray::size(), MassObservable< OBSERVED >::update(), PageItem::updateClip(), and PageItem::width.
| const QString SubdividePlugin::fullTrName | ( | ) | const [virtual] |
Plug-in's human-readable, translated name.
Please don't use this for anything except display to the user. The results of testing the value of this can not be guaranteed, as its value may change depending on locale and change at runtime.
Implements ScPlugin.
Definition at line 77 of file subdivide.cpp.
References tr().
| const ScActionPlugin::AboutData * SubdividePlugin::getAboutData | ( | ) | const [virtual] |
Return descriptive information about the plug-in.
Returns a structure containing descriptive information about the plug-in. This information is used in places like the Help->About Plug-ins menu item. The stucture MUST be deleted using deleteAboutData(AboutData* about) when finished with.
Every plugin MUST reimplement getAboutData(...) and deleteAboutData(...).
- See also:
- ScPlugin::deleteAboutData
Implements ScPlugin.
Definition at line 82 of file subdivide.cpp.
References ScPlugin::AboutData::authors, ScPlugin::AboutData::description, ScPlugin::AboutData::license, ScPlugin::AboutData::shortDescription, and tr().
| void SubdividePlugin::deleteAboutData | ( | const AboutData * | about | ) | const [virtual] |
| void SubdividePlugin::languageChange | ( | ) | [virtual] |
Update all user-visible text to reflect current UI language.
Updates the text on all widgets on the plug-in to reflect the new language. You should generally use this method to set all the widget text during construction. That ensures that text is not duplicated, and that when this method is called the text of all persistent widgets is correctly changed.
This method only needs to affect text in widgets that currently exists (displayed or otherwise).
Implements ScPlugin.
Definition at line 59 of file subdivide.cpp.
References ScActionPlugin::ActionInfo::enabledOnStartup, ScActionPlugin::ActionInfo::forAppMode, PageItem::Line, ScActionPlugin::m_actionInfo, ScActionPlugin::ActionInfo::menu, modeEditClip, ScActionPlugin::ActionInfo::name, ScActionPlugin::ActionInfo::needsNumObjects, ScActionPlugin::ActionInfo::notSuitableFor, ScActionPlugin::ActionInfo::parentMenu, ScActionPlugin::ActionInfo::subMenuName, ScActionPlugin::ActionInfo::text, and tr().
Referenced by SubdividePlugin().
| virtual void SubdividePlugin::addToMainWindowMenu | ( | ScribusMainWindow * | ) | [inline, virtual] |
Allow plugins to add to a main menu.
Implements ScPlugin.
Definition at line 51 of file subdivide.h.
The documentation for this class was generated from the following files:
