46 #include <QPushButton> 68 NewNameMessageBox::NewNameMessageBox(QString propName)
76 setWindowTitle(
"Name Selection");
78 setText(tr(
"The name %1 is already in use.\nWould you like to choose a different name, replace the old property or cancel loading?").arg(propName));
80 buttonRename =
new QPushButton(
"Rename");
81 buttonReplace =
new QPushButton(
"Replace");
82 buttonCancel =
new QPushButton(
"Cancel");
84 addButton(buttonRename, QMessageBox::AcceptRole);
85 addButton(buttonCancel, QMessageBox::RejectRole);
86 addButton(buttonReplace, QMessageBox::YesRole);
88 connect(buttonRename, SIGNAL(clicked()),
this, SLOT(slotRename()));
89 connect(buttonReplace, SIGNAL(clicked()),
this, SLOT(slotReplace()));
90 connect(buttonCancel, SIGNAL(clicked()),
this, SLOT(slotCancel()));
static const char * entity2str(ENTITY_FILTER entity)
Returns a symbol representation for an entity.