QLabel * l1 = new QLabel(tr("Width:"));
QLabel * l2 = new QLabel(tr("RGB:"));
QLabel * l3 = new QLabel(tr("Style:"));
+ QToolButton * qtb = new QToolButton(this);
+
+ QAction * action = new QAction(QIcon(":/res/pen-stamp.png"), tr(""), this);
+ action->setToolTip(tr("Stamp Selected"));
+ action->setStatusTip(tr("Stamp selected objects with pen attributes."));
+ action->setShortcut(QKeySequence(tr("p,p")));
+// action->setCheckable(checkable);
+ qtb->setDefaultAction(action);
style->insertItem(1, tr("Solid"));
style->insertItem(2, tr("Dash"));
hbox1->addWidget(blue, 0, Qt::AlignLeft);
hbox1->addWidget(l3, 0, Qt::AlignLeft);
hbox1->addWidget(style, 0, Qt::AlignLeft);
+ hbox1->addWidget(qtb, 0, Qt::AlignLeft);
hbox1->addStretch(1);
setLayout(hbox1);
connect(green, SIGNAL(textEdited(QString)), this, SLOT(HandleGreenSelected(QString)));
connect(blue, SIGNAL(textEdited(QString)), this, SLOT(HandleBlueSelected(QString)));
connect(style, SIGNAL(currentIndexChanged(int)), this, SLOT(HandleStyleSelected(int)));
+ connect(qtb, SIGNAL(triggered(QAction *)), this, SLOT(HandleStamp(QAction *)));
}
emit ColorSelected(Global::penColor);
}
+
+void PenWidget::HandleStamp(QAction * /* action */)
+{
+ emit StampSelected();
+}
+