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(); }
void TextInstrument::clear() { mText = QString(); mIsEdited = false; emit sendCloseTextDialog(); }
void TextInstrument::showMenu(ImageArea &imageArea) { emit sendCloseTextDialog(); completeSelection(imageArea); //show text dialog }