void ApplicationWindow::HandleDimensionSize(QString text)
{
/*
-This is the third input on the view toolbar; not sure what it was supposed to do...
+This is the third input on the view toolbar; not sure what it was supposed to do... (resize all dimensions in the drawing?)
*/
// Parse the text...
bool ok;
if (drawing->select.size() > 0)
{
DeleteContents(clipboard);
- CopySelectedObjectsTo(clipboard, drawing->document.objects);
+ clipboard = CopySelectedObjects(drawing->document.objects);
}
}
if (drawing->select.size() > 0)
{
DeleteContents(clipboard);
- MoveSelectedObjectsTo(clipboard, drawing->document.objects);
+ clipboard = MoveSelectedObjectsFrom(drawing->document.objects);
drawing->update();
}
}
if (clipboard.size() > 0)
{
// We want to maybe make it so that the pasted objects are being moved in a "mouse drag" state...
- // This only moves the cut/copied from the clipboard to the drawing.
-// AddObjectsTo(drawing->document.objects, clipboard);
- CopyObjects(clipboard, drawing->document.objects);
+ ClearSelected(drawing->document.objects);
+ SelectAll(clipboard);
+ drawing->document.Add(CopyObjects(clipboard));
drawing->update();
}
}
+//
+// Select all *visible* objects. If an object is on a layer that is not
+// visible, skip it.
+//
+void ApplicationWindow::SelectAllObjects(void)
+{
+ // Set object's state & update the drawing
+ SelectAll(drawing->document.objects);
+ drawing->update();
+}
+
+
void ApplicationWindow::CreateActions(void)
{
exitAct = CreateAction(tr("&Quit"), tr("Quit"), tr("Exits the application."),
editPasteAct = CreateAction(tr("&Paste Objects"), tr("Paste Objects"), tr("Paste objects from the clipboard to the drawing."), QIcon(":/res/editpaste2.png"), QKeySequence(tr("Ctrl+v")));
connect(editPasteAct, SIGNAL(triggered()), this, SLOT(EditPaste()));
+ selectAllAct = CreateAction(tr("Select &All"), tr("Select All Objects"), tr("Select all objects in the drawing."), QIcon(), QKeySequence(tr("Ctrl+a")));
+ connect(selectAllAct, SIGNAL(triggered()), this, SLOT(SelectAllObjects()));
+
//Hm. I think we'll have to have separate logic to do the "Radio Group Toolbar" thing...
// Yup, in order to turn them off, we'd have to have an "OFF" toolbar button. Ick.
/* QActionGroup * group = new QActionGroup(this);
menu->addAction(connectAct);
menu->addAction(disconnectAct);
menu->addSeparator();
+ menu->addAction(selectAllAct);
menu->addAction(editCutAct);
menu->addAction(editCopyAct);
menu->addAction(editPasteAct);
connect(pw, SIGNAL(WidthSelected(float)), drawing, SLOT(HandlePenWidth(float)));
connect(pw, SIGNAL(StyleSelected(int)), drawing, SLOT(HandlePenStyle(int)));
connect(pw, SIGNAL(ColorSelected(uint32_t)), drawing, SLOT(HandlePenColor(uint32_t)));
+ connect(pw, SIGNAL(StampSelected(void)), drawing, SLOT(HandlePenStamp(void)));
}