Пример #1
0
void TextInstrument::completeSelection(ImageArea &imageArea)
{
    TextDialog *td = new TextDialog(&imageArea);
    connect(td, SIGNAL(textChanged(ImageArea *, QString)), this, SLOT(updateText(ImageArea *, QString)));
    connect(this, SIGNAL(sendCloseTextDialog()), td, SLOT(accept()));
    connect(td, SIGNAL(canceled(ImageArea *)), this, SLOT(cancel(ImageArea *)));
    td->setAttribute(Qt::WA_DeleteOnClose);
    td->show();
}
Пример #2
0
void TextInstrument::clear()
{
    mText = QString();
    mIsEdited = false;
    emit sendCloseTextDialog();
}
Пример #3
0
void TextInstrument::showMenu(ImageArea &imageArea)
{
    emit sendCloseTextDialog();
    completeSelection(imageArea); //show text dialog
}