AboutDialog::AboutDialog() : QDialog(0, "About DoUML", TRUE) { setCaption(TR("About DoUML")); //move(p); Q3VBoxLayout * vbox = new Q3VBoxLayout(this); Q3HBoxLayout * hbox; vbox->setMargin(5); hbox = new Q3HBoxLayout(vbox); hbox->setMargin(5); QPixmap bp((const char **) bp_xpm); // QLabel * lbp = new QLabel(this); // lbp->setPixmap(bp); // hbox->addWidget(lbp); hbox->addWidget(new QLabel(" ", this)); // Replacing about to bouml-ng const char htmltext[] = "<p>DoUML</p>\n" "<p>This project is a fork of\n" "Bruno Pages's work, BoUML:\n" "<i>http://sourceforge.net/projects/douml/</i></p>\n" "<p>DoUML focus is to port BoUML to Qt4\n" "and to maintain it as a community</p>\n" "<p>Join us at:<br>\n" "https://github.com/leonardo2d/douml/<br>\n" "#[email protected]</p>\n\n\n"; Q3TextView * tx = new Q3TextView(htmltext, QString(), this); QFont fnt = tx->font(); fnt.setItalic(TRUE); QFontMetrics fm(fnt); tx->setVScrollBarMode(Q3ScrollView::AlwaysOff); tx->setHScrollBarMode(Q3ScrollView::AlwaysOff); tx->setMinimumSize(fm.size(0, htmltext)); hbox->addWidget(tx); hbox = new Q3HBoxLayout(vbox); hbox->setMargin(5); QPushButton * ok = new QPushButton(TR("&OK"), this); ok->setDefault(TRUE); hbox->addWidget(new QLabel(this)); hbox->addWidget(ok); hbox->addWidget(new QLabel(this)); if (UmlDesktop::fixed()) UmlDesktop::tocenter(this); connect(ok, SIGNAL(clicked()), this, SLOT(accept())); }
AboutDialog::AboutDialog() : QDialog(0, "About " PROJECT_NAME, TRUE) { setCaption(TR("About " PROJECT_NAME)); //move(p); Q3VBoxLayout * vbox = new Q3VBoxLayout(this); Q3HBoxLayout * hbox; vbox->setMargin(5); hbox = new Q3HBoxLayout(vbox); hbox->setMargin(5); QPixmap bp((const char **) bp_xpm); QLabel * lbp = new QLabel(this); // lbp->setPixmap(bp); // hbox->addWidget(lbp); hbox->addWidget(new QLabel(" ", this)); QString htmltext; htmltext.sprintf("%s <b>%d.%d-%d</b> release <b>%s</b><br>\n" "<br>\n" "<i>%s</i><br>\n" "<br>\n" "%s (<i>%s</i>)", PROJECT_NAME, PROJECT_MAJOR, PROJECT_MINOR, PROJECT_REVISION, PROJECT_RELEASE, PROJECT_HOME, PROJECT_ADMIN, PROJECT_CONTACT); Q3TextView * tx = new Q3TextView(htmltext, QString::null, this); QFont fnt = tx->font(); fnt.setItalic(TRUE); QFontMetrics fm(fnt); tx->setVScrollBarMode(Q3ScrollView::AlwaysOff); tx->setHScrollBarMode(Q3ScrollView::AlwaysOff); tx->setMinimumSize(fm.size(0, htmltext)); hbox->addWidget(tx); hbox = new Q3HBoxLayout(vbox); hbox->setMargin(5); QPushButton * ok = new QPushButton(TR("&OK"), this); ok->setDefault( TRUE ); hbox->addWidget(new QLabel(this)); hbox->addWidget(ok); hbox->addWidget(new QLabel(this)); if (UmlDesktop::fixed()) UmlDesktop::tocenter(this); connect(ok, SIGNAL(clicked()), this, SLOT(accept())); }