ui_mainwindow.h

来自「Qt控件使用实例」· C头文件 代码 · 共 349 行

H
349
字号
/********************************************************************************** Form generated from reading ui file 'mainwindow.ui'**** Created: Sun May 10 22:55:45 2009**      by: Qt User Interface Compiler version 4.4.0**** WARNING! All changes made in this file will be lost when recompiling ui file!********************************************************************************/#ifndef UI_MAINWINDOW_H#define UI_MAINWINDOW_H#include <QtCore/QVariant>#include <QtGui/QAction>#include <QtGui/QApplication>#include <QtGui/QButtonGroup>#include <QtGui/QCheckBox>#include <QtGui/QComboBox>#include <QtGui/QDialogButtonBox>#include <QtGui/QFrame>#include <QtGui/QGridLayout>#include <QtGui/QLabel>#include <QtGui/QLineEdit>#include <QtGui/QListWidget>#include <QtGui/QMainWindow>#include <QtGui/QMenu>#include <QtGui/QMenuBar>#include <QtGui/QRadioButton>#include <QtGui/QSpacerItem>#include <QtGui/QSpinBox>#include <QtGui/QStatusBar>#include <QtGui/QVBoxLayout>#include <QtGui/QWidget>QT_BEGIN_NAMESPACEclass Ui_MainWindow{public:    QAction *exitAction;    QAction *aboutQtAction;    QAction *editStyleAction;    QAction *aboutAction;    QWidget *centralwidget;    QVBoxLayout *vboxLayout;    QFrame *mainFrame;    QGridLayout *gridLayout;    QCheckBox *agreeCheckBox;    QLabel *label;    QLabel *nameLabel;    QRadioButton *maleRadioButton;    QLabel *passwordLabel;    QComboBox *countryCombo;    QLabel *ageLabel;    QLabel *countryLabel;    QLabel *genderLabel;    QLineEdit *passwordEdit;    QRadioButton *femaleRadioButton;    QSpinBox *ageSpinBox;    QComboBox *nameCombo;    QSpacerItem *spacerItem;    QSpacerItem *spacerItem1;    QDialogButtonBox *buttonBox;    QListWidget *professionList;    QMenuBar *menubar;    QMenu *menu_File;    QMenu *menu_Help;    QStatusBar *statusbar;    void setupUi(QMainWindow *MainWindow)    {    if (MainWindow->objectName().isEmpty())        MainWindow->setObjectName(QString::fromUtf8("MainWindow"));    MainWindow->resize(400, 413);    exitAction = new QAction(MainWindow);    exitAction->setObjectName(QString::fromUtf8("exitAction"));    aboutQtAction = new QAction(MainWindow);    aboutQtAction->setObjectName(QString::fromUtf8("aboutQtAction"));    editStyleAction = new QAction(MainWindow);    editStyleAction->setObjectName(QString::fromUtf8("editStyleAction"));    aboutAction = new QAction(MainWindow);    aboutAction->setObjectName(QString::fromUtf8("aboutAction"));    centralwidget = new QWidget(MainWindow);    centralwidget->setObjectName(QString::fromUtf8("centralwidget"));    vboxLayout = new QVBoxLayout(centralwidget);#ifndef Q_OS_MAC    vboxLayout->setSpacing(6);#endif#ifndef Q_OS_MAC    vboxLayout->setMargin(9);#endif    vboxLayout->setObjectName(QString::fromUtf8("vboxLayout"));    mainFrame = new QFrame(centralwidget);    mainFrame->setObjectName(QString::fromUtf8("mainFrame"));    mainFrame->setFrameShape(QFrame::StyledPanel);    mainFrame->setFrameShadow(QFrame::Raised);    gridLayout = new QGridLayout(mainFrame);#ifndef Q_OS_MAC    gridLayout->setSpacing(6);#endif#ifndef Q_OS_MAC    gridLayout->setMargin(9);#endif    gridLayout->setObjectName(QString::fromUtf8("gridLayout"));    agreeCheckBox = new QCheckBox(mainFrame);    agreeCheckBox->setObjectName(QString::fromUtf8("agreeCheckBox"));    gridLayout->addWidget(agreeCheckBox, 6, 0, 1, 5);    label = new QLabel(mainFrame);    label->setObjectName(QString::fromUtf8("label"));    label->setAlignment(Qt::AlignRight|Qt::AlignTop|Qt::AlignTrailing);    gridLayout->addWidget(label, 5, 0, 1, 1);    nameLabel = new QLabel(mainFrame);    nameLabel->setObjectName(QString::fromUtf8("nameLabel"));    nameLabel->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);    gridLayout->addWidget(nameLabel, 0, 0, 1, 1);    maleRadioButton = new QRadioButton(mainFrame);    maleRadioButton->setObjectName(QString::fromUtf8("maleRadioButton"));    gridLayout->addWidget(maleRadioButton, 1, 1, 1, 1);    passwordLabel = new QLabel(mainFrame);    passwordLabel->setObjectName(QString::fromUtf8("passwordLabel"));    passwordLabel->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);    gridLayout->addWidget(passwordLabel, 3, 0, 1, 1);    countryCombo = new QComboBox(mainFrame);    countryCombo->setObjectName(QString::fromUtf8("countryCombo"));    gridLayout->addWidget(countryCombo, 4, 1, 1, 4);    ageLabel = new QLabel(mainFrame);    ageLabel->setObjectName(QString::fromUtf8("ageLabel"));    ageLabel->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);    gridLayout->addWidget(ageLabel, 2, 0, 1, 1);    countryLabel = new QLabel(mainFrame);    countryLabel->setObjectName(QString::fromUtf8("countryLabel"));    countryLabel->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);    gridLayout->addWidget(countryLabel, 4, 0, 1, 1);    genderLabel = new QLabel(mainFrame);    genderLabel->setObjectName(QString::fromUtf8("genderLabel"));    genderLabel->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);    gridLayout->addWidget(genderLabel, 1, 0, 1, 1);    passwordEdit = new QLineEdit(mainFrame);    passwordEdit->setObjectName(QString::fromUtf8("passwordEdit"));    passwordEdit->setEchoMode(QLineEdit::Password);    gridLayout->addWidget(passwordEdit, 3, 1, 1, 4);    femaleRadioButton = new QRadioButton(mainFrame);    femaleRadioButton->setObjectName(QString::fromUtf8("femaleRadioButton"));    gridLayout->addWidget(femaleRadioButton, 1, 2, 1, 2);    ageSpinBox = new QSpinBox(mainFrame);    ageSpinBox->setObjectName(QString::fromUtf8("ageSpinBox"));    ageSpinBox->setMinimum(12);    ageSpinBox->setValue(22);    gridLayout->addWidget(ageSpinBox, 2, 1, 1, 2);    nameCombo = new QComboBox(mainFrame);    nameCombo->setObjectName(QString::fromUtf8("nameCombo"));    nameCombo->setEditable(true);    gridLayout->addWidget(nameCombo, 0, 1, 1, 4);    spacerItem = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);    gridLayout->addItem(spacerItem, 1, 4, 1, 1);    spacerItem1 = new QSpacerItem(61, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);    gridLayout->addItem(spacerItem1, 2, 3, 1, 2);    buttonBox = new QDialogButtonBox(mainFrame);    buttonBox->setObjectName(QString::fromUtf8("buttonBox"));    buttonBox->setOrientation(Qt::Horizontal);    buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::NoButton|QDialogButtonBox::Ok);    gridLayout->addWidget(buttonBox, 7, 3, 1, 2);    professionList = new QListWidget(mainFrame);    new QListWidgetItem(professionList);    new QListWidgetItem(professionList);    new QListWidgetItem(professionList);    professionList->setObjectName(QString::fromUtf8("professionList"));    gridLayout->addWidget(professionList, 5, 1, 1, 4);    vboxLayout->addWidget(mainFrame);    MainWindow->setCentralWidget(centralwidget);    menubar = new QMenuBar(MainWindow);    menubar->setObjectName(QString::fromUtf8("menubar"));    menubar->setGeometry(QRect(0, 0, 400, 29));    menu_File = new QMenu(menubar);    menu_File->setObjectName(QString::fromUtf8("menu_File"));    menu_Help = new QMenu(menubar);    menu_Help->setObjectName(QString::fromUtf8("menu_Help"));    MainWindow->setMenuBar(menubar);    statusbar = new QStatusBar(MainWindow);    statusbar->setObjectName(QString::fromUtf8("statusbar"));    MainWindow->setStatusBar(statusbar);    label->setBuddy(professionList);    nameLabel->setBuddy(nameCombo);    passwordLabel->setBuddy(passwordEdit);    ageLabel->setBuddy(ageSpinBox);    countryLabel->setBuddy(countryCombo);    menubar->addAction(menu_File->menuAction());    menubar->addAction(menu_Help->menuAction());    menu_File->addAction(editStyleAction);    menu_File->addSeparator();    menu_File->addAction(exitAction);    menu_Help->addAction(aboutAction);    menu_Help->addAction(aboutQtAction);    retranslateUi(MainWindow);    countryCombo->setCurrentIndex(6);    professionList->setCurrentRow(0);    QMetaObject::connectSlotsByName(MainWindow);    } // setupUi    void retranslateUi(QMainWindow *MainWindow)    {    MainWindow->setWindowTitle(QApplication::translate("MainWindow", "Style Sheet", 0, QApplication::UnicodeUTF8));    exitAction->setText(QApplication::translate("MainWindow", "&Exit", 0, QApplication::UnicodeUTF8));    aboutQtAction->setText(QApplication::translate("MainWindow", "About Qt", 0, QApplication::UnicodeUTF8));    editStyleAction->setText(QApplication::translate("MainWindow", "Edit &Style...", 0, QApplication::UnicodeUTF8));    aboutAction->setText(QApplication::translate("MainWindow", "About", 0, QApplication::UnicodeUTF8));#ifndef QT_NO_TOOLTIP    agreeCheckBox->setToolTip(QApplication::translate("MainWindow", "Please read the LICENSE file before checking", 0, QApplication::UnicodeUTF8));#endif // QT_NO_TOOLTIP    agreeCheckBox->setText(QApplication::translate("MainWindow", "I &accept the terms and &conditions", 0, QApplication::UnicodeUTF8));    label->setText(QApplication::translate("MainWindow", "Profession:", 0, QApplication::UnicodeUTF8));    nameLabel->setText(QApplication::translate("MainWindow", "&Name:", 0, QApplication::UnicodeUTF8));#ifndef QT_NO_TOOLTIP    maleRadioButton->setToolTip(QApplication::translate("MainWindow", "Check this if you are male", 0, QApplication::UnicodeUTF8));#endif // QT_NO_TOOLTIP    maleRadioButton->setText(QApplication::translate("MainWindow", "&Male", 0, QApplication::UnicodeUTF8));    passwordLabel->setText(QApplication::translate("MainWindow", "&Password:", 0, QApplication::UnicodeUTF8));    countryCombo->insertItems(0, QStringList()     << QApplication::translate("MainWindow", "Egypt", 0, QApplication::UnicodeUTF8)     << QApplication::translate("MainWindow", "France", 0, QApplication::UnicodeUTF8)     << QApplication::translate("MainWindow", "Germany", 0, QApplication::UnicodeUTF8)     << QApplication::translate("MainWindow", "India", 0, QApplication::UnicodeUTF8)     << QApplication::translate("MainWindow", "Italy", 0, QApplication::UnicodeUTF8)     << QApplication::translate("MainWindow", "Norway", 0, QApplication::UnicodeUTF8)     << QApplication::translate("MainWindow", "Pakistan", 0, QApplication::UnicodeUTF8)    );#ifndef QT_NO_TOOLTIP    countryCombo->setToolTip(QApplication::translate("MainWindow", "Specify country of origin", 0, QApplication::UnicodeUTF8));#endif // QT_NO_TOOLTIP#ifndef QT_NO_STATUSTIP    countryCombo->setStatusTip(QApplication::translate("MainWindow", "Specify country of origin", 0, QApplication::UnicodeUTF8));#endif // QT_NO_STATUSTIP    ageLabel->setText(QApplication::translate("MainWindow", "&Age:", 0, QApplication::UnicodeUTF8));    countryLabel->setText(QApplication::translate("MainWindow", "Country:", 0, QApplication::UnicodeUTF8));    genderLabel->setText(QApplication::translate("MainWindow", "Gender:", 0, QApplication::UnicodeUTF8));#ifndef QT_NO_TOOLTIP    passwordEdit->setToolTip(QApplication::translate("MainWindow", "Specify your password", 0, QApplication::UnicodeUTF8));#endif // QT_NO_TOOLTIP#ifndef QT_NO_STATUSTIP    passwordEdit->setStatusTip(QApplication::translate("MainWindow", "Specify your password", 0, QApplication::UnicodeUTF8));#endif // QT_NO_STATUSTIP    passwordEdit->setText(QApplication::translate("MainWindow", "Password", 0, QApplication::UnicodeUTF8));    femaleRadioButton->setStyleSheet(QApplication::translate("MainWindow", "Check this if you are female", 0, QApplication::UnicodeUTF8));    femaleRadioButton->setText(QApplication::translate("MainWindow", "&Female", 0, QApplication::UnicodeUTF8));#ifndef QT_NO_TOOLTIP    ageSpinBox->setToolTip(QApplication::translate("MainWindow", "Specify your age", 0, QApplication::UnicodeUTF8));#endif // QT_NO_TOOLTIP#ifndef QT_NO_STATUSTIP    ageSpinBox->setStatusTip(QApplication::translate("MainWindow", "Specify your age", 0, QApplication::UnicodeUTF8));#endif // QT_NO_STATUSTIP#ifndef QT_NO_TOOLTIP    nameCombo->setToolTip(QApplication::translate("MainWindow", "Specify your name", 0, QApplication::UnicodeUTF8));#endif // QT_NO_TOOLTIP    const bool __sortingEnabled = professionList->isSortingEnabled();    professionList->setSortingEnabled(false);    professionList->item(0)->setText(QApplication::translate("MainWindow", "Developer", 0, QApplication::UnicodeUTF8));    professionList->item(1)->setText(QApplication::translate("MainWindow", "Student", 0, QApplication::UnicodeUTF8));    professionList->item(2)->setText(QApplication::translate("MainWindow", "Fisherman", 0, QApplication::UnicodeUTF8));    professionList->setSortingEnabled(__sortingEnabled);#ifndef QT_NO_TOOLTIP    professionList->setToolTip(QApplication::translate("MainWindow", "Select your profession", 0, QApplication::UnicodeUTF8));#endif // QT_NO_TOOLTIP#ifndef QT_NO_STATUSTIP    professionList->setStatusTip(QApplication::translate("MainWindow", "Specify your name here", 0, QApplication::UnicodeUTF8));#endif // QT_NO_STATUSTIP#ifndef QT_NO_WHATSTHIS    professionList->setWhatsThis(QApplication::translate("MainWindow", "Specify your name here", 0, QApplication::UnicodeUTF8));#endif // QT_NO_WHATSTHIS    menu_File->setTitle(QApplication::translate("MainWindow", "&File", 0, QApplication::UnicodeUTF8));    menu_Help->setTitle(QApplication::translate("MainWindow", "&Help", 0, QApplication::UnicodeUTF8));    } // retranslateUi};namespace Ui {    class MainWindow: public Ui_MainWindow {};} // namespace UiQT_END_NAMESPACE#endif // UI_MAINWINDOW_H

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?