예제 #1
0
/**
	Constructeur
	@param parent Le QWidget parent de la boite de dialogue
*/
AboutQET::AboutQET(QWidget *parent) : QDialog(parent) {
	// Titre, taille, comportement...
	setWindowTitle(tr("\300 propos de QElectrotech", "window title"));
	setMinimumWidth(680);
	setMinimumHeight(690);
	setModal(true);
	
	// Trois onglets
	QETTabWidget *tabs = new QETTabWidget(this);
	tabs -> addTab(aboutTab(),        tr("\300 &propos",       "tab title"));
	tabs -> addTab(authorsTab(),      tr("A&uteurs",           "tab title"));
	tabs -> addTab(translatorsTab(),  tr("&Traducteurs",       "tab title"));
	tabs -> addTab(contributorsTab(), tr("&Contributeurs",     "tab title"));
	tabs -> addTab(licenseTab(),      tr("&Accord de licence", "tab title"));
	
	// Un bouton pour fermer la boite de dialogue
	QDialogButtonBox *buttons = new QDialogButtonBox(QDialogButtonBox::Close);
	connect(buttons, SIGNAL(accepted()), this, SLOT(accept()));
	connect(buttons, SIGNAL(rejected()), this, SLOT(accept()));
	
	// Le tout dans une disposition verticale
	QVBoxLayout *vlayout = new QVBoxLayout();
	vlayout -> addWidget(title());
	vlayout -> addWidget(tabs);
	vlayout -> addWidget(buttons);
	setLayout(vlayout);
}
예제 #2
0
/*!
 * Constructor
 * @param QWidget *parent The parent of the dialog.
 */
AboutQUCS::AboutQUCS(QWidget *parent) : QDialog(parent)
{
    // Title, size, behavior...
    setWindowTitle(tr("About Qucs", "window title"));
    setMinimumWidth(680);
    setMinimumHeight(350);
    setModal(true);

    QTabWidget *tabs = new QTabWidget(this);
    tabs->addTab(aboutTab(),        tr("A&bout",             "tab title"));
    tabs->addTab(authorsTab(),      tr("A&uthors",           "tab title"));
    tabs->addTab(translatorsTab(),  tr("&Translators",       "tab title"));
    tabs->addTab(contributorsTab(), tr("&Contributions",     "tab title"));
    tabs->addTab(licenseTab(),      tr("&Licence Agreement", "tab title"));

    // Button to close the dialog box
    QDialogButtonBox *buttons = new QDialogButtonBox(QDialogButtonBox::Close);
    connect(buttons, SIGNAL(accepted()), this, SLOT(accept()));
    connect(buttons, SIGNAL(rejected()), this, SLOT(accept()));

    QVBoxLayout *vlayout = new QVBoxLayout();
    vlayout->addWidget(title());
    vlayout->addWidget(tabs);
    vlayout->addWidget(buttons);
    setLayout(vlayout);
}