git-svn-id: svn://db.shs.com.ru/libs@479 a8b55f48-bf90-11e4-a774-851b48703e85
This commit is contained in:
@@ -28,6 +28,7 @@ BlockBusItem::BlockBusItem(const BlockBusItem & other): QGraphicsObject(), Prope
|
|||||||
|
|
||||||
|
|
||||||
void BlockBusItem::_init() {
|
void BlockBusItem::_init() {
|
||||||
|
setZValue(1.);
|
||||||
setBusType(-1);
|
setBusType(-1);
|
||||||
setAcceptHoverEvents(true);
|
setAcceptHoverEvents(true);
|
||||||
ph.setColor(Qt::blue); ph.setJoinStyle(Qt::MiterJoin);
|
ph.setColor(Qt::blue); ph.setJoinStyle(Qt::MiterJoin);
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
BlockItem::BlockItem(QGraphicsItem * parent): QGraphicsObject(parent), PropertyStorage(),
|
BlockItem::BlockItem(QGraphicsItem * parent): QGraphicsObject(parent), PropertyStorage(),
|
||||||
g_main(this), g_selection(this) {
|
g_main(this), g_selection(this) {
|
||||||
setData(1006, "item");
|
setData(1006, "item");
|
||||||
setZValue(1.);
|
setZValue(2.);
|
||||||
setAcceptHoverEvents(true);
|
setAcceptHoverEvents(true);
|
||||||
setFlags(QGraphicsItem::ItemIsSelectable | QGraphicsItem::ItemIsMovable);
|
setFlags(QGraphicsItem::ItemIsSelectable | QGraphicsItem::ItemIsMovable);
|
||||||
g_main.setData(1002, true);
|
g_main.setData(1002, true);
|
||||||
|
|||||||
@@ -109,10 +109,10 @@ void _DTSizeItem::doubleClick() {
|
|||||||
AlignedTextItem * iatext = qgraphicsitem_cast<AlignedTextItem*>(cur_item);
|
AlignedTextItem * iatext = qgraphicsitem_cast<AlignedTextItem*>(cur_item);
|
||||||
QGraphicsPixmapItem * ipixmap = qgraphicsitem_cast<QGraphicsPixmapItem*>(cur_item);
|
QGraphicsPixmapItem * ipixmap = qgraphicsitem_cast<QGraphicsPixmapItem*>(cur_item);
|
||||||
if (itext || iatext) {
|
if (itext || iatext) {
|
||||||
emit textEditRequest();
|
QMetaObject::invokeMethod(this, "textEditRequest", Qt::QueuedConnection);
|
||||||
}
|
}
|
||||||
if (ipixmap) {
|
if (ipixmap) {
|
||||||
emit pixmapEditRequest();
|
QMetaObject::invokeMethod(this, "pixmapEditRequest", Qt::QueuedConnection);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -836,7 +836,10 @@ void DrawTools::buttonFont_clicked() {
|
|||||||
|
|
||||||
|
|
||||||
void DrawTools::buttonTextEdit_clicked() {
|
void DrawTools::buttonTextEdit_clicked() {
|
||||||
|
text_dlg.setWindowIcon(QApplication::activeWindow()->windowIcon());
|
||||||
text_edit.setPlainText(ui->comboText->lineEdit()->text());
|
text_edit.setPlainText(ui->comboText->lineEdit()->text());
|
||||||
|
text_edit.selectAll();
|
||||||
|
text_edit.setFocus();
|
||||||
if (text_dlg.exec() == QDialog::Rejected)
|
if (text_dlg.exec() == QDialog::Rejected)
|
||||||
return;
|
return;
|
||||||
ui->comboText->lineEdit()->setText(text_edit.toPlainText());
|
ui->comboText->lineEdit()->setText(text_edit.toPlainText());
|
||||||
|
|||||||
Reference in New Issue
Block a user