kig
kig_part.cpp
Go to the documentation of this file.
297 a = actionCollection()->addAction(KStandardAction::FullScreen, "fullscreen", m_widget, SLOT( toggleFullScreen() ));
316 aSetCoordinatePrecision->setToolTip( i18n("Set the floating point precision of coordinates in the document. " ));
317 connect(aSetCoordinatePrecision, SIGNAL( triggered() ), this, SLOT( setCoordinatePrecision() ));
416 i18n( "You tried to open a document of type \"%1\"; unfortunately, Kig does not support this format. If you think the format in question would be worth implementing support for, you can open a feature request in <a href=\"https://bugs.kde.org/enter_bug.cgi?product=kig&bug_severity=wishlist\">KDE's bug tracking system</a>"
441 std::vector<ObjectCalcer*> tmp = calcPath( getAllParents( getAllCalcers( document().objects() ) ) );
462 i18n( "Format Not Supported" ), KGuiItem( i18n( "Save Kig Format" ) ), KStandardGuiItem::cancel() ) == KMessageBox::No )
558 kWarning() << "New object group started while already having objects in object group. Current group will be lost";
620 KigCoordinatePrecisionDialog dlg(document().isUserSpecifiedCoordinatePrecision(), document().getCoordinatePrecision() );
833 KGlobal::dirs()->findAllResources( "appdata", "builtin-macros/*.kigt", KStandardDirs::Recursive);
878 QPrintDialog *printDialog = KdePrint::createPrintDialog( &printer, QList<QWidget*>() << kp, m_widget );
1021 kError() << "The file \"" << file << "\" is of a filetype not currently supported by Kig." << endl;
static CoordinateSystem * build(int which)
Definition: coordinate_system.cpp:535
a CoordinateSystem is what the user sees: it is kept by KigPart to show the user a grid...
Definition: coordinate_system.h:60
void setWholeWinOverlay()
this is called by some drawing functions that modify the 'entire' screen, i.e.
Definition: kigpainter.cpp:494
a KigCommand represents almost every action performed in Kig.
Definition: kig_commands.h:44
virtual bool queryClose()
KigPart cannot be safely destroyed if it's in a nested event loop (construct mode).
Definition: kig_part.cpp:476
void delObject(ObjectHolder *o)
Remove the object o from the document.
Definition: kig_document.cc:151
bool remove()
int getUserSpecifiedCoordinatePrecision() const
Definition: kigcoordinateprecisiondialog.cpp:50
static KigCommand * removeCommand(KigPart &doc, const std::vector< ObjectHolder * > &os)
make sure that when you delete something, you are also deleting its parents.
Definition: kig_commands.cpp:93
const std::set< ObjectHolder * > & objectsSet() const
Definition: kig_document.cc:51
void setIcon(const QIcon &icon)
void regDoc(KigPart *d)
register this document, so that it receives notifications for added and removed actions.
Definition: lists.cc:58
Definition: kig_part.h:49
The list of object constructors for use in various places, e.g.
Definition: lists.h:69
void enableConstructActions(bool enabled)
Definition: kig_part.cpp:663
std::vector< ObjectCalcer * > getAllCalcers(const std::vector< ObjectHolder * > &os)
get the calcers that the holders represent and their namecalcers
Definition: common.cc:21
std::vector< KigGUIAction * > GUIUpdateToken
the "token" keeps some objects that should be deleted, we only delete them after we replug the action...
Definition: kig_part.h:263
void hideObjects(const std::vector< ObjectHolder * > &os)
Definition: kig_part.cpp:934
int height() const
void addObjects(const std::vector< ObjectHolder * > &os)
Add the objects os to the document.
Definition: kig_document.cc:143
virtual void enableActions()
actions: we enable the actions we want when our mode is made active.
Definition: mode.cc:27
bool exists() const
void finishObjectGroup()
Draws the current group of objects and add them as a whole to the Undo history.
Definition: kig_part.cpp:571
void setToolTip(const QString &tip)
ScreenInfo is a simple utility class that maps a region of the document onto a region of the screen...
Definition: screeninfo.h:31
this is an ABC of a class containing the current "Mode" of the Kig document...
Definition: mode.h:37
virtual KigDocument * load(const QString &fromfile)=0
load file fromfile and build a KigDocument from it.
int width() const
Definition: guiaction.h:34
void addWidget(QWidget *widget, int stretch, QFlags< Qt::AlignmentFlag > alignment)
std::vector< ObjectCalcer * > getAllParents(const std::vector< ObjectCalcer * > &objs)
This function returns all objects above the given in the dependency graph.
Definition: calcpaths.cc:229
std::vector< ObjectCalcer * > calcPath(const std::vector< ObjectCalcer * > &os)
This function sorts os such that they're in the right order for calc()-ing.
Definition: calcpaths.cc:48
bool save(const KigDocument &data, const QString &outfile)
saving is always done with the native filter.
Definition: filter.cc:104
Definition: kig_commands.h:223
int exec(QFlags< QEventLoop::ProcessEventsFlag > flags)
KDE_EXPORT int convertToNative(const KUrl &url, const QByteArray &outfile)
Definition: kig_part.cpp:996
bool misGroupingObjects
Indicates whether objects added to the documents are being grouped or not.
Definition: kig_part.h:287
void addMenuAction(const KigPart *doc, KigWidget *w, KActionCollection *coll)
Definition: exporter.cc:155
An ObjectHolder represents an object as it is known to the document.
Definition: object_holder.h:40
void exit(int returnCode)
virtual void addItem(QLayoutItem *item)
void setObjectName(const QString &name)
bool isEmpty() const
int removeAll(const T &value)
void showObjects(const std::vector< ObjectHolder * > &os)
Definition: kig_part.cpp:953
SetCoordinateSystemAction(KigPart &d, KActionCollection *parent)
bool endsWith(const QString &s, Qt::CaseSensitivity cs) const
void recenterScreen()
emitted when we want to suggest a new size for the view ( basically after loading a file...
void startObjectGroup()
Call this method to start an object group which will be deleted as a whole if the construction is can...
Definition: kig_part.cpp:555
static KigCommand * changeCoordSystemCommand(KigPart &doc, CoordinateSystem *s)
This creates directly a command to change the coordinate system to s .
Definition: kig_commands.cpp:118
const std::vector< ObjectHolder * > objects() const
Get a hold of the objects of this KigDocument.
Definition: kig_document.cc:46
void setWhatsThis(const QString &what)
void drawGrid(const CoordinateSystem &c, bool showGrid=true, bool showAxes=true)
Definition: kigpainter.cpp:507
iterator end()
bool exists() const
void setFullPage(bool fp)
Definition: guiaction.h:68
void setCoordinatePrecision(int precision)
Definition: kig_document.cc:201
void _addObjects(const std::vector< ObjectHolder * > &o)
Definition: kig_part.cpp:544
static KigCommand * addCommand(KigPart &doc, const std::vector< ObjectHolder * > &os)
To avoid confusion, this doesn't add a command to anything, this creates an AddCommand ;) ...
Definition: kig_commands.cpp:106
This class keeps a list of all macro's, and allows them to be easily accessed, added etc...
Definition: lists.h:110
virtual int exec()
KigPart(QWidget *parentWidget, QObject *parent=0, const QVariantList &=QVariantList())
Default constructor.
Definition: kig_part.cpp:173
void rememberConstruction(ConstructibleAction *)
Definition: kig_part.cpp:356
void setWindowTitle(const QString &)
bool load(const QString &f, vectype &ret, const KigPart &)
load macro's from file f .
Definition: lists.cc:298
KigDocument is the class holding the real data in a Kig document.
Definition: kig_document.h:36
void actionRemoved(GUIAction *a, GUIUpdateToken &t)
Definition: kig_part.cpp:754
void addObject(ObjectHolder *oObject)
Add the objects o to the document.
Definition: kig_document.cc:138
K_EXPORT_PLUGIN(KigPartFactory(kigAboutData("kig", I18N_NOOP("KigPart")))) SetCoordinateSystemAction
Definition: kig_part.cpp:86
void setNightVision(bool nv)
set to enable/disable night-vision (visibility of hidden objects)
Definition: kig_document.cc:196
void addObjects(const std::vector< ObjectHolder * > &os)
Definition: kig_part.cpp:500
int height() const
Definition: guiaction.h:51
void delObjects(const std::vector< ObjectHolder * > &os)
Remove the objects os from the document.
Definition: kig_document.cc:156
const CoordinateSystem & coordinateSystem() const
Definition: kig_document.cc:40
virtual int id() const =0
std::set< ObjectCalcer * > getAllChildren(ObjectCalcer *obj)
This is an overloaded member function, provided for convenience. It differs from the above function o...
Definition: calcpaths.cc:281
void cancelObjectGroup()
Deletes the current group of objects from the document without adding them to the Undo history...
Definition: kig_part.cpp:564
void drawObjects(const std::vector< ObjectHolder * > &os, bool sel)
Definition: kigpainter.cpp:518
void delObjects(const std::vector< ObjectHolder * > &os)
Definition: kig_part.cpp:635
Definition: normal.h:26
iterator begin()
Rect suggestedRect() const
Return a rect containing most of the objects, which would be a fine suggestion to map to the widget...
Definition: kig_document.cc:106
void push(QUndoCommand *cmd)
void _delObjects(const std::vector< ObjectHolder * > &o)
Definition: kig_part.cpp:525
std::vector< ObjectHolder * > mcurrentObjectGroup
Stores the current group of object being drawn if an object group has been started.
Definition: kig_part.h:294
void doPrint(QPrinter &printer, bool printGrid, bool printAxes)
Definition: kig_part.cpp:892
singleShot
This file is part of Kig, a KDE program for Interactive Geometry...
Definition: kigcoordinateprecisiondialog.h:28
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:12:05 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:12:05 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.