22 #include "kig_part.moc"
29 #include "../filters/exporter.h"
30 #include "../filters/filter.h"
31 #include "../misc/builtin_stuff.h"
32 #include "../misc/calcpaths.h"
33 #include "../misc/coordinate_system.h"
34 #include "../misc/guiaction.h"
35 #include "../misc/kigcoordinateprecisiondialog.h"
36 #include "../misc/kigpainter.h"
37 #include "../misc/lists.h"
38 #include "../misc/object_constructor.h"
39 #include "../misc/screeninfo.h"
40 #include "../modes/normal.h"
41 #include "../objects/object_drawer.h"
42 #include "../objects/point_imp.h"
50 #include <kdemacros.h>
51 #include <kfiledialog.h>
53 #include <kiconloader.h>
54 #include <kcomponentdata.h>
56 #include <kxmlguiwindow.h>
57 #include <kactioncollection.h>
58 #include <kmessagebox.h>
59 #include <kmimetype.h>
60 #include <kstandarddirs.h>
61 #include <kstandardaction.h>
62 #include <ktoggleaction.h>
63 #include <ktogglefullscreenaction.h>
64 #include <kundostack.h>
65 #include <kparts/genericfactory.h>
67 #include <kdeprintdialog.h>
68 #include <kprintpreview.h>
70 #include <qbytearray.h>
71 #include <qcheckbox.h>
72 #include <qeventloop.h>
75 #include <qsizepolicy.h>
77 #include <QtGui/QPrinter>
78 #include <QtGui/QPrintDialog>
85 K_PLUGIN_FACTORY( KigPartFactory, registerPlugin< KigPart >(); )
89 KigPart& d, KActionCollection* parent )
94 setCurrentItem( md.document().coordinateSystem().id() );
95 connect(
this, SIGNAL( triggered(
int ) ),
this, SLOT( slotActivated(
int ) ) );
97 parent->addAction(
"settings_set_coordinate_system",
this);
100 void SetCoordinateSystemAction::slotActivated(
int index )
105 setCurrentItem( index );
108 class KigPrintDialogPage
112 KigPrintDialogPage(
QWidget* parent = 0 );
113 ~KigPrintDialogPage();
115 bool printShowGrid();
116 void setPrintShowGrid(
bool status );
118 bool printShowAxes();
119 void setPrintShowAxes(
bool status );
121 bool isValid( QString& );
128 KigPrintDialogPage::KigPrintDialogPage(
QWidget* parent )
131 setWindowTitle( i18n(
"Kig Options" ) );
133 QVBoxLayout* vl =
new QVBoxLayout(
this );
135 showgrid =
new QCheckBox( i18n(
"Show grid" ),
this );
136 vl->addWidget( showgrid );
138 showaxes =
new QCheckBox( i18n(
"Show axes" ),
this );
139 vl->addWidget( showaxes );
141 vl->addItem(
new QSpacerItem( 10, 10, QSizePolicy::Fixed, QSizePolicy::Expanding ) );
144 KigPrintDialogPage::~KigPrintDialogPage()
148 bool KigPrintDialogPage::printShowGrid()
150 return showgrid->isChecked();
153 void KigPrintDialogPage::setPrintShowGrid(
bool status )
155 showgrid->setChecked( status );
158 bool KigPrintDialogPage::printShowAxes()
160 return showaxes->isChecked();
163 void KigPrintDialogPage::setPrintShowAxes(
bool status )
165 showaxes->setChecked( status );
168 bool KigPrintDialogPage::isValid( QString& )
174 const QVariantList& )
175 : KParts::ReadWritePart( parent ),
176 mMode( 0 ), mRememberConstruction( 0 ), mdocument( new
KigDocument() )
179 setComponentData( KigPartFactory::componentData() );
185 m_widget->setObjectName(
"kig_view" );
193 setXMLFile(
"kigpartui.rc");
200 mhistory->createUndoAction( actionCollection() );
201 mhistory->createRedoAction( actionCollection() );
215 (void) KStandardAction::saveAs(
this, SLOT(
fileSaveAs()), actionCollection());
216 (void) KStandardAction::save(
this, SLOT(
fileSave()), actionCollection());
219 (void) KStandardAction::print(
this, SLOT(
filePrint() ), actionCollection() );
220 (void) KStandardAction::printPreview(
this, SLOT(
filePrintPreview() ), actionCollection() );
232 KIconLoader* l = iconLoader();
245 i18n(
"Cancel the construction of the object being constructed"));
253 i18n(
"Repeat the last construction (with new data)"));
257 actionCollection()->addAction(
"edit_unhide_all",
aShowHidden );
259 aShowHidden->setToolTip(i18n(
"Show all hidden objects"));
263 actionCollection()->addAction(
"macro_action",
aNewMacro );
265 aNewMacro->setToolTip(i18n(
"Define a new macro"));
275 aBrowseHistory->setToolTip( i18n(
"Browse the history of the current construction." ) );
278 actionCollection() );
280 QAction * a = KStandardAction::zoomIn(
m_widget, SLOT( slotZoomIn() ),
281 actionCollection() );
282 a->setToolTip( i18n(
"Zoom in on the document" ) );
283 a->setWhatsThis( i18n(
"Zoom in on the document" ) );
285 a = KStandardAction::zoomOut(
m_widget, SLOT( slotZoomOut() ),
286 actionCollection() );
287 a->setToolTip( i18n(
"Zoom out of the document" ) );
288 a->setWhatsThis( i18n(
"Zoom out of the document" ) );
290 a = KStandardAction::fitToPage(
m_widget, SLOT( slotRecenterScreen() ),
291 actionCollection() );
293 a->setIcon( KIcon(
"view_fit_to_page", l ) );
294 a->setToolTip( i18n(
"Recenter the screen on the document" ) );
295 a->setWhatsThis( i18n(
"Recenter the screen on the document" ) );
297 a = actionCollection()->addAction(KStandardAction::FullScreen,
"fullscreen",
m_widget, SLOT( toggleFullScreen() ));
298 a->setToolTip( i18n(
"View this document full-screen." ) );
299 a->setWhatsThis( i18n(
"View this document full-screen." ) );
302 a =
new KAction(KIcon(
"zoom-fit-best"), i18n(
"&Select Shown Area"),
this);
303 actionCollection()->addAction(
"view_select_shown_rect", a );
304 connect(a, SIGNAL(triggered(
bool) ),
m_widget, SLOT( zoomRect() ));
305 a->setToolTip( i18n(
"Select the area that you want to be shown in the window." ) );
306 a->setWhatsThis( i18n(
"Select the area that you want to be shown in the window." ) );
308 a =
new KAction(KIcon(
"zoom-original"), i18n(
"S&elect Zoom Area"),
this);
309 actionCollection()->addAction(
"view_zoom_area", a );
310 connect(a, SIGNAL(triggered(
bool) ),
m_widget, SLOT( zoomArea() ));
316 aSetCoordinatePrecision->setToolTip( i18n(
"Set the floating point precision of coordinates in the document. " ));
319 aToggleGrid =
new KToggleAction(i18n(
"Show &Grid"),
this);
320 actionCollection()->addAction(
"settings_show_grid",
aToggleGrid );
321 aToggleGrid->setToolTip( i18n(
"Show or hide the grid." ) );
325 aToggleAxes =
new KToggleAction(i18n(
"Show &Axes"),
this);
326 actionCollection()->addAction(
"settings_show_axes",
aToggleAxes );
327 aToggleAxes->setToolTip( i18n(
"Show or hide the axes." ) );
333 aToggleNightVision->setToolTip( i18n(
"Enable/disable hidden objects' visibility." ) );
347 typedef GUIActionList::avectype::const_iterator iter;
392 QFileInfo fileinfo( localFilePath() );
393 if ( ! fileinfo.exists() )
395 KMessageBox::sorry( widget(),
396 i18n(
"The file \"%1\" you tried to open does not exist. "
397 "Please verify that you entered the correct path.", localFilePath() ),
398 i18n(
"File Not Found" ) );
402 KMimeType::Ptr mimeType = KMimeType::mimeType( arguments().mimeType() );
406 mimeType = KMimeType::findByPath( localFilePath() );
408 kDebug() <<
"mimetype: " << mimeType->name();
416 i18n(
"You tried to open a document of type \"%1\"; unfortunately, "
417 "Kig does not support this format. If you think the format in "
418 "question would be worth implementing support for, you can "
419 "always ask us nicely on mailto:pino@kde.org "
420 "or do the work yourself and send me a patch."
422 i18n(
"Format Not Supported" )
445 for ( std::vector<ObjectCalcer*>::iterator i = tmp.begin(); i != tmp.end(); ++i )
458 KMimeType::Ptr mimeType = KMimeType::findByPath ( localFilePath() );
459 if ( mimeType->name() !=
"application/x-kig" )
462 if( KMessageBox::warningYesNo( widget(),
463 i18n(
"Kig does not support saving to any other file format than "
464 "its own. Save to Kig's format instead?" ),
465 i18n(
"Format Not Supported" ), KGuiItem( i18n(
"Save Kig Format" ) ), KStandardGuiItem::cancel() ) == KMessageBox::No )
472 setModified (
false );
481 if ( KParts::ReadWritePart::queryClose() )
483 if (
mode()->eventLoop() != 0 )
523 std::vector<ObjectHolder*> os;
561 kWarning() <<
"New object group started while already having objects in object group. Current group will be lost";
618 setModified( !clean );
625 if( dlg.exec() == QDialog::Accepted )
640 if ( os.size() < 1 )
return;
641 std::set<ObjectHolder*> delobjs;
644 std::map<ObjectCalcer*, ObjectHolder*> holdermap;
648 for ( std::set<ObjectHolder*>::iterator i = curobjs.begin();
649 i != curobjs.end(); ++i )
650 holdermap[( *i )->calcer()] = *i;
652 for ( std::set<ObjectCalcer*>::iterator i = delcalcers.begin();
653 i != delcalcers.end(); ++i )
655 std::map<ObjectCalcer*, ObjectHolder*>::iterator j = holdermap.find( *i );
656 if ( j != holdermap.end() )
657 delobjs.insert( j->second );
660 assert( delobjs.size() >= os.size() );
662 std::vector<ObjectHolder*> delobjsvect( delobjs.begin(), delobjs.end() );
669 bind2nd( mem_fun( &KAction::setEnabled ),
675 unplugActionList(
"user_conic_types" );
676 unplugActionList(
"user_segment_types" );
677 unplugActionList(
"user_point_types" );
678 unplugActionList(
"user_circle_types" );
679 unplugActionList(
"user_line_types" );
680 unplugActionList(
"user_other_types" );
681 unplugActionList(
"user_types" );
686 plugActionList(
"user_conic_types",
aMNewConic );
688 plugActionList(
"user_point_types",
aMNewPoint );
689 plugActionList(
"user_circle_types",
aMNewCircle );
690 plugActionList(
"user_line_types",
aMNewLine );
691 plugActionList(
"user_other_types",
aMNewOther );
692 plugActionList(
"user_types",
aMNewAll );
697 emit setStatusBarText( text );
713 QString formats = i18n(
"*.kig|Kig Documents (*.kig)\n"
714 "*.kigz|Compressed Kig Documents (*.kigz)" );
719 QString file_name = KFileDialog::getSaveFileName( KUrl(
"kfiledialog:///document" ), formats );
720 if (file_name.isEmpty())
return false;
721 else if ( QFileInfo( file_name ).exists() )
723 int ret = KMessageBox::warningContinueCancel(
m_widget,
724 i18n(
"The file \"%1\" already exists. Do you wish to overwrite it?" ,
725 file_name ), i18n(
"Overwrite File?" ), KStandardGuiItem::overwrite() );
726 if ( ret != KMessageBox::Continue )
731 saveAs( KUrl( file_name ) );
743 e.exec( QEventLoop::AllEvents | QEventLoop::WaitForMoreEvents );
751 assert( d ==
mMode );
760 for ( std::vector<KigGUIAction*>::iterator i =
aActions.begin(); i !=
aActions.end(); ++i )
762 if ( (*i)->guiAction() == a )
802 static bool alreadysetup =
false;
803 if ( ! alreadysetup )
808 const QStringList dataFiles =
809 KGlobal::dirs()->findAllResources(
"appdata",
"kig-types/*.kigt",
810 KStandardDirs::Recursive);
811 std::vector<Macro*> macros;
812 for ( QStringList::const_iterator file = dataFiles.begin();
813 file != dataFiles.end(); ++file )
815 std::vector<Macro*> nmacros;
817 if ( ! ok )
continue;
818 copy( nmacros.begin(), nmacros.end(), back_inserter( macros ) );
829 static bool alreadysetup =
false;
830 if ( ! alreadysetup )
835 const QStringList builtinfiles =
836 KGlobal::dirs()->findAllResources(
"appdata",
"builtin-macros/*.kigt", KStandardDirs::Recursive);
837 for ( QStringList::const_iterator file = builtinfiles.begin();
838 file != builtinfiles.end(); ++file )
840 std::vector<Macro*> macros;
842 if ( ! ok )
continue;
843 for (
uint i = 0; i < macros.size(); ++i )
847 Macro* macro = macros[i];
872 KPrintPreview printPreview( &printer );
880 KigPrintDialogPage* kp =
new KigPrintDialogPage();
881 QPrintDialog *printDialog = KdePrint::createPrintDialog( &printer, QList<QWidget*>() << kp,
m_widget );
882 printDialog->setWindowTitle( i18n(
"Print Geometry") );
883 printer.setFullPage(
true );
886 kp->setPrintShowGrid(
document().grid() );
887 kp->setPrintShowAxes(
document().axes() );
888 if (printDialog->exec())
890 doPrint( printer, kp->printShowGrid(), kp->printShowAxes() );
898 QRect qrect( 0, 0, printer.width(), printer.height() );
899 if ( rect.
width() * qrect.height() > rect.
height() * qrect.width() )
902 int nh =
static_cast<int>( qrect.width() * rect.
height() / rect.
width() );
903 int rest = qrect.
height() - nh;
904 qrect.setTop( qrect.top() - rest / 2 );
905 qrect.setTop( rest / 2 );
910 int nw =
static_cast<int>( qrect.height() * rect.
width() / rect.
height() );
911 int rest = qrect.width() - nw;
912 qrect.setLeft( rest / 2 );
913 qrect.setRight( qrect.right() - rest / 2 );
939 std::vector<ObjectHolder*> os;
940 for (std::vector<ObjectHolder*>::const_iterator i = inos.begin(); i != inos.end(); ++i )
946 if ( os.size() == 0 )
return;
947 else if ( os.size() == 1 )
948 kc =
new KigCommand( *
this, os[0]->imp()->type()->hideAStatement() );
949 else kc =
new KigCommand( *
this, i18np(
"Hide %1 Object",
"Hide %1 Objects", os.size() ) );
950 for ( std::vector<ObjectHolder*>::iterator i = os.begin();
958 std::vector<ObjectHolder*> os;
959 for (std::vector<ObjectHolder*>::const_iterator i = inos.begin(); i != inos.end(); ++i )
961 if ( !(*i)->shown() )
965 if ( os.size() == 0 )
return;
966 else if ( os.size() == 1 )
967 kc =
new KigCommand( *
this, os[0]->imp()->type()->showAStatement() );
968 else kc =
new KigCommand( *
this, i18np(
"Show %1 Object",
"Show %1 Objects", os.size() ) );
969 for ( std::vector<ObjectHolder*>::iterator i = os.begin();
982 for ( std::vector<KigWidget*>::iterator i =
mwidgets.begin();
999 extern "C" KDE_EXPORT
int convertToNative(
const KUrl& url,
const QByteArray& outfile )
1001 kDebug() <<
"converting " << url.prettyUrl() <<
" to " << outfile;
1003 if ( ! url.isLocalFile() )
1006 kError() <<
"--convert-to-native only supports local files for now." << endl;
1010 QString file = url.toLocalFile();
1012 QFileInfo fileinfo( file );
1013 if ( ! fileinfo.exists() )
1015 kError() <<
"The file \"" << file <<
"\" does not exist" << endl;
1019 KMimeType::Ptr mimeType = KMimeType::findByPath ( file );
1020 kDebug() <<
"mimetype: " << mimeType->name();
1024 kError() <<
"The file \"" << file <<
"\" is of a filetype not currently supported by Kig." << endl;
1031 kError() <<
"Parse error in file \"" << file <<
"\"." << endl;
1036 for ( std::vector<ObjectCalcer*>::iterator i = tmp.begin(); i != tmp.end(); ++i )
1037 ( *i )->calc( *doc );
1038 for ( std::vector<ObjectCalcer*>::iterator i = tmp.begin(); i != tmp.end(); ++i )
1039 ( *i )->calc( *doc );
1041 QString out = ( outfile ==
"-" ) ? QString() : outfile;
1045 kError() <<
"something went wrong while saving" << endl;
1088 QString typesDir = KGlobal::dirs()->saveLocation(
"appdata",
"kig-types" );
1089 if ( !typesDir.endsWith(
'/' ) )
1091 QString typesFileWithPath = typesDir +
typesFile;
1094 if ( QFile::exists( typesFileWithPath ) )
1095 QFile::remove( typesFileWithPath );
1098 macrolist->
save( macrolist->
macros(), typesFileWithPath );
1103 QString typesDir = KGlobal::dirs()->saveLocation(
"appdata",
"kig-types" );
1104 if ( !typesDir.endsWith(
'/' ) )
1106 QString typesFileWithPath = typesDir +
typesFile;
1108 if ( QFile::exists( typesFileWithPath ) )
1110 std::vector<Macro*> macros;
1121 const vec& macros = macrolist->
macros();
1122 for ( vec::const_reverse_iterator i = macros.rbegin(); i != macros.rend(); ++i )
This is the base class for an input filter.
List of GUIActions for the parts to show.
static CoordinateSystem * build(int which)
KigWidget * realWidget() const
a CoordinateSystem is what the user sees: it is kept by KigPart to show the user a grid...
KigFilter * find(const QString &mime)
void delWidget(KigWidget *)
void setWholeWinOverlay()
this is called by some drawing functions that modify the 'entire' screen, i.e.
virtual void deleteObjects()
virtual bool saveFile()
save our internal document to m_file
a KigCommand represents almost every action performed in Kig.
virtual bool queryClose()
KigPart cannot be safely destroyed if it's in a nested event loop (construct mode).
void delObject(ObjectHolder *o)
Remove the object o from the document.
virtual bool openFile()
load our internal document from m_file
QList< QAction * > aMNewSegment
void slotInvertSelection()
int getUserSpecifiedCoordinatePrecision() const
const vectype & macros() const
get access to the list of macro's.
static KigCommand * removeCommand(KigPart &doc, const std::vector< ObjectHolder * > &os)
make sure that when you delete something, you are also deleting its parents.
const std::set< ObjectHolder * > & objectsSet() const
void addTask(KigCommandTask *)
This file is part of Kig, a KDE program for Interactive Geometry...
const KigDocument & document() const
void regDoc(KigPart *d)
register this document, so that it receives notifications for added and removed actions.
The list of object constructors for use in various places, e.g.
void repeatLastConstruction()
void enableConstructActions(bool enabled)
QList< QAction * > aMNewLine
std::vector< ObjectCalcer * > getAllCalcers(const std::vector< ObjectHolder * > &os)
get the calcers that the holders represent and their namecalcers
virtual void redrawScreen(KigWidget *w)
Redraw the document on KigWidget w .
KAction * aRepeatLastConstruction
void setHistoryClean(bool)
void emitStatusBarText(const QString &text)
std::vector< KigGUIAction * > GUIUpdateToken
the "token" keeps some objects that should be deleted, we only delete them after we replug the action...
void hideObjects(const std::vector< ObjectHolder * > &os)
virtual void showHidden()
virtual void browseHistory()
bool getNightVision() const
static KigExportManager * instance()
QEventLoop * eventLoop() const
void addObjects(const std::vector< ObjectHolder * > &os)
Add the objects os to the document.
virtual void enableActions()
actions: we enable the actions we want when our mode is made active.
void unregDoc(KigPart *d)
void finishObjectGroup()
Draws the current group of objects and add them as a whole to the Undo history.
void add(ObjectConstructor *a)
virtual void invertSelection()
static QStringList names()
ScreenInfo is a simple utility class that maps a region of the document onto a region of the screen...
std::vector< KigWidget * > mwidgets
this is an ABC of a class containing the current "Mode" of the Kig document...
virtual ~KigPart()
Destructor.
KUndoStack * mhistory
the command history
KAction * aSetCoordinatePrecision
virtual KigDocument * load(const QString &fromfile)=0
load file fromfile and build a KigDocument from it.
static KigFilters * instance()
void setGrid(bool showgrid)
set to show/hide the grid.
void delete_all(T begin, T end)
KAction * aConfigureTypes
std::vector< ObjectCalcer * > getAllParents(const std::vector< ObjectCalcer * > &objs)
This function returns all objects above the given in the dependency graph.
This class is a wrapper for KigWidget.
void add(Macro *m)
Add a Macro m .
std::vector< ObjectCalcer * > calcPath(const std::vector< ObjectCalcer * > &os)
This function sorts os such that they're in the right order for calc()-ing.
virtual void cancelConstruction()
bool save(const KigDocument &data, const QString &outfile)
saving is always done with the native filter.
void actionAdded(GUIAction *a, GUIUpdateToken &t)
KDE_EXPORT int convertToNative(const KUrl &url, const QByteArray &outfile)
bool misGroupingObjects
Indicates whether objects added to the documents are being grouped or not.
KigPainter is an extended QPainter.
GUIUpdateToken startGUIActionUpdate()
void addMenuAction(const KigPart *doc, KigWidget *w, KActionCollection *coll)
void setCoordinatePrecision()
An ObjectHolder represents an object as it is known to the document.
void addWidget(KigWidget *)
void showObjects(const std::vector< ObjectHolder * > &os)
KAction * aInvertSelection
static const QString typesFile
SetCoordinateSystemAction(KigPart &d, KActionCollection *parent)
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...
QString descriptiveName() const
static ObjectConstructorList * instance()
static KigCommand * changeCoordSystemCommand(KigPart &doc, CoordinateSystem *s)
This creates directly a command to change the coordinate system to s .
const std::vector< ObjectHolder * > objects() const
Get a hold of the objects of this KigDocument.
void drawGrid(const CoordinateSystem &c, bool showGrid=true, bool showAxes=true)
std::vector< KigGUIAction * > aActions
KSelectAction * aCoordSystem
KToggleAction * aToggleGrid
void _addObject(ObjectHolder *inObject)
void addObject(ObjectHolder *inObject)
void _delObject(ObjectHolder *inObject)
std::vector< Macro * > vectype
KAboutData kigAboutData(const char *name, const char *iname)
void setAxes(bool showaxes)
set to show/hide the grid.
void setCoordinatePrecision(int precision)
void coordSystemChanged(int)
QList< QAction * > aMNewCircle
void _addObjects(const std::vector< ObjectHolder * > &o)
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 ;) ...
This class keeps a list of all macro's, and allows them to be easily accessed, added etc...
KigPart(QWidget *parentWidget, QObject *parent=0, const QVariantList &=QVariantList())
Default constructor.
bool save(Macro *m, const QString &f)
Save macro m to file f .
void rememberConstruction(ConstructibleAction *)
this is just a simple data struct.
bool load(const QString &f, vectype &ret, const KigPart &)
load macro's from file f .
KigDocument is the class holding the real data in a Kig document.
ConstructibleAction * mRememberConstruction
static GUIActionList * instance()
void actionRemoved(GUIAction *a, GUIUpdateToken &t)
void endGUIActionUpdate(GUIUpdateToken &t)
void addObject(ObjectHolder *oObject)
Add the objects o to the document.
K_EXPORT_PLUGIN(KigPartFactory(kigAboutData("kig", I18N_NOOP("KigPart")))) SetCoordinateSystemAction
void setNightVision(bool nv)
set to enable/disable night-vision (visibility of hidden objects)
KToggleAction * aToggleNightVision
void remove(Macro *m)
Remove macro m .
virtual void deselectAll()
QList< QAction * > aMNewPoint
void addObjects(const std::vector< ObjectHolder * > &os)
void delObjects(const std::vector< ObjectHolder * > &os)
Remove the objects os from the document.
void setBuiltin(bool builtin)
void cancelConstruction()
const CoordinateSystem & coordinateSystem() const
KAction * aCancelConstruction
void delObject(ObjectHolder *inObject)
const avectype & actions() const
virtual int id() const =0
KToggleAction * aToggleAxes
std::set< ObjectCalcer * > getAllChildren(ObjectCalcer *obj)
This is an overloaded member function, provided for convenience. It differs from the above function o...
void cancelObjectGroup()
Deletes the current group of objects from the document without adding them to the Undo history...
void drawObjects(const std::vector< ObjectHolder * > &os, bool sel)
QList< QAction * > aMNewConic
void delObjects(const std::vector< ObjectHolder * > &os)
void setupBuiltinMacros()
Rect suggestedRect() const
Return a rect containing most of the objects, which would be a fine suggestion to map to the widget...
static MacroList * instance()
MacroList is a singleton.
QList< QAction * > aMNewOther
void setEventLoop(QEventLoop *e)
void _delObjects(const std::vector< ObjectHolder * > &o)
QList< QAction * > aMNewAll
std::vector< ObjectHolder * > mcurrentObjectGroup
Stores the current group of object being drawn if an object group has been started.
void doPrint(QPrinter &printer, bool printGrid, bool printAxes)
This file is part of Kig, a KDE program for Interactive Geometry...