コード例 #1
0
ファイル: window.cpp プロジェクト: RSATom/Qt
void Window::initialize()
{
    if (parent())
        setGeometry(QRect(160, 120, 320, 240));
    else {
        setFlags(flags() | Qt::WindowTitleHint | Qt::WindowSystemMenuHint
                       | Qt::WindowMinMaxButtonsHint | Qt::WindowCloseButtonHint);
        const QSize baseSize = QSize(640, 480);
        setGeometry(QRect(geometry().topLeft(), baseSize));

        setSizeIncrement(QSize(10, 10));
        setBaseSize(baseSize);
        setMinimumSize(QSize(240, 160));
        setMaximumSize(QSize(800, 600));
    }

    create();
    m_backingStore = new QBackingStore(this);

    m_image = QImage(geometry().size(), QImage::Format_RGB32);
    m_image.fill(colorTable[m_backgroundColorIndex % (sizeof(colorTable) / sizeof(colorTable[0]))].rgba());

    m_lastPos = QPoint(-1, -1);
    m_renderTimer = 0;
}
コード例 #2
0
ファイル: MainWindow.cpp プロジェクト: msakhnik/vkontwin
MainWindow::MainWindow(QWidget *parent)
{
    QWidget * centralWidget = new QWidget(this);
    setCentralWidget(centralWidget);
    setWindowTitle("Main window");
    setSizeIncrement(400, 200);

    // Building our widgets
    _helloWidget = new HelloWidget(this);
    _button = new QPushButton(this);
    _button->setText("Add");
    _button->resize(75, 30);

    connect(_button, SIGNAL(clicked()), _helloWidget, SLOT(showNewLetter()));

    _layout = new QVBoxLayout();
    _layout_button = new QHBoxLayout();
    _layout_frame = new QHBoxLayout();
    _layout_frame_age = new QHBoxLayout();
    _layout_frame_location = new QHBoxLayout();
    _groupBox_search = new QGroupBox(tr("Search"));
    _age_from = new QLabel("From");
    _location_city = new QLabel("Select City");
    _layout_images = new QHBoxLayout();
    _layout_you_last_photo = new QHBoxLayout();
    _layout_founded_image = new QHBoxLayout();
    // Setting the content and disposition of our central Widget
    _SetLayout();
    centralWidget->setLayout(_layout);
}
コード例 #3
0
ファイル: palette.cpp プロジェクト: dc7kr/MuseScore
void Palette::setGrid(int hh, int vv)
      {
      hgrid = hh;
      vgrid = vv;
      QSize s(hgrid, vgrid);
      setSizeIncrement(s);
      setBaseSize(s);
      setMinimumSize(s);
      updateGeometry();
      }
コード例 #4
0
ファイル: window.cpp プロジェクト: CodeDJ/qt5-hidpi
void Window::initialize()
{
    if (parent())
        setGeometry(QRect(160, 120, 320, 240));
    else {
        setGeometry(QRect(10, 10, 640, 480));

        setSizeIncrement(QSize(10, 10));
        setBaseSize(QSize(640, 480));
        setMinimumSize(QSize(240, 160));
        setMaximumSize(QSize(800, 600));
    }

    create();
    m_backingStore = new QBackingStore(this);

    m_image = QImage(geometry().size(), QImage::Format_RGB32);
    m_image.fill(colorTable[m_backgroundColorIndex % (sizeof(colorTable) / sizeof(colorTable[0]))].rgba());

    m_lastPos = QPoint(-1, -1);
    m_renderTimer = 0;
}
コード例 #5
0
void ProviderWindow::setWindow()
{

QFont f( font() );
f.setPixelSize(12);
f.setStyleStrategy(QFont::PreferAntialias);
 setFont( f );  

    setObjectName(QString::fromUtf8("ProviderWindow"));
    resize(QSize(534, 435).expandedTo(this->minimumSizeHint()));
    setSizeIncrement(QSize(0, 0));
    gridLayout = new QGridLayout(this);
    gridLayout->setSpacing(2);
    gridLayout->setMargin(2);
    gridLayout->setObjectName(QString::fromUtf8("gridLayout"));
    mainTab = new QTabWidget(this);
    mainTab->setObjectName(QString::fromUtf8("mainTab"));
    mainTab->setEnabled(true);
    QSizePolicy sizePolicy(static_cast<QSizePolicy::Policy>(7), static_cast<QSizePolicy::Policy>(7));
    sizePolicy.setHorizontalStretch(0);
    sizePolicy.setVerticalStretch(0);
    sizePolicy.setHeightForWidth(mainTab->sizePolicy().hasHeightForWidth());
    mainTab->setSizePolicy(sizePolicy);
    mainTab->setTabShape(QTabWidget::Rounded);
    nameTab = new QWidget();
    nameTab->setObjectName(QString::fromUtf8("nameTab"));
    gridLayout1 = new QGridLayout(nameTab);
    gridLayout1->setSpacing(6);
    gridLayout1->setMargin(9);
    gridLayout1->setObjectName(QString::fromUtf8("gridLayout1"));
    chartFrame = new QFrame(nameTab);
    chartFrame->setObjectName(QString::fromUtf8("chartFrame"));
    QSizePolicy sizePolicy1(static_cast<QSizePolicy::Policy>(5), static_cast<QSizePolicy::Policy>(4));
    sizePolicy1.setHorizontalStretch(0);
    sizePolicy1.setVerticalStretch(0);
    sizePolicy1.setHeightForWidth(chartFrame->sizePolicy().hasHeightForWidth());
    chartFrame->setSizePolicy(sizePolicy1);
    chartFrame->setFrameShape(QFrame::StyledPanel);
    chartFrame->setFrameShadow(QFrame::Plain);
    gridLayout2 = new QGridLayout(chartFrame);
    gridLayout2->setSpacing(2);
    gridLayout2->setMargin(2);
    gridLayout2->setObjectName(QString::fromUtf8("gridLayout2"));
    codemessageLabel = new QLabel(chartFrame);
    codemessageLabel->setObjectName(QString::fromUtf8("codemessageLabel"));
    codemessageLabel->setWordWrap(true);

    gridLayout2->addWidget(codemessageLabel, 0, 1, 1, 1);

    gridLayout3 = new QGridLayout();
    gridLayout3->setSpacing(2);
    gridLayout3->setMargin(0);
    gridLayout3->setObjectName(QString::fromUtf8("gridLayout3"));
    provideractiveCheckBox = new QCheckBox(chartFrame);
    provideractiveCheckBox->setObjectName(QString::fromUtf8("provideractiveCheckBox"));
    provideractiveCheckBox->setChecked(true);

    gridLayout3->addWidget(provideractiveCheckBox, 1, 0, 1, 1);

    spacerItem = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);

    gridLayout3->addItem(spacerItem, 1, 1, 1, 1);

    spacerItem1 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);

    gridLayout3->addItem(spacerItem1, 1, 2, 1, 1);

    codeLabel = new QLabel(chartFrame);
    codeLabel->setObjectName(QString::fromUtf8("codeLabel"));

    gridLayout3->addWidget(codeLabel, 0, 0, 1, 1);

    codeEdit = new QLineEdit(chartFrame);
    codeEdit->setObjectName(QString::fromUtf8("codeEdit"));
    QSizePolicy sizePolicy2(static_cast<QSizePolicy::Policy>(1), static_cast<QSizePolicy::Policy>(0));
    sizePolicy2.setHorizontalStretch(0);
    sizePolicy2.setVerticalStretch(0);
    sizePolicy2.setHeightForWidth(codeEdit->sizePolicy().hasHeightForWidth());
    codeEdit->setSizePolicy(sizePolicy2);
    codeEdit->setMaximumSize(QSize(60, 16777215));
    codeEdit->setMaxLength(4);

    gridLayout3->addWidget(codeEdit, 0, 1, 1, 1);

    spacerItem2 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);

    gridLayout3->addItem(spacerItem2, 0, 2, 1, 1);


    gridLayout2->addLayout(gridLayout3, 0, 0, 1, 1);


    gridLayout1->addWidget(chartFrame, 0, 0, 1, 1);

    nameaddressFrame = new QFrame(nameTab);
    nameaddressFrame->setObjectName(QString::fromUtf8("nameaddressFrame"));
    QSizePolicy sizePolicy3(static_cast<QSizePolicy::Policy>(5), static_cast<QSizePolicy::Policy>(4));
    sizePolicy3.setHorizontalStretch(0);
    sizePolicy3.setVerticalStretch(0);
    sizePolicy3.setHeightForWidth(nameaddressFrame->sizePolicy().hasHeightForWidth());
    nameaddressFrame->setSizePolicy(sizePolicy3);
    nameaddressFrame->setFrameShape(QFrame::StyledPanel);
    nameaddressFrame->setFrameShadow(QFrame::Plain);
    gridLayout4 = new QGridLayout(nameaddressFrame);
    gridLayout4->setSpacing(2);
    gridLayout4->setMargin(2);
    gridLayout4->setObjectName(QString::fromUtf8("gridLayout4"));
    gridLayout5 = new QGridLayout();
    gridLayout5->setSpacing(2);
    gridLayout5->setMargin(0);
    gridLayout5->setObjectName(QString::fromUtf8("gridLayout5"));
    firstnameLabel = new QLabel(nameaddressFrame);
    firstnameLabel->setObjectName(QString::fromUtf8("firstnameLabel"));

    gridLayout5->addWidget(firstnameLabel, 1, 0, 1, 1);

    streetLabel = new QLabel(nameaddressFrame);
    streetLabel->setObjectName(QString::fromUtf8("streetLabel"));

    gridLayout5->addWidget(streetLabel, 2, 0, 1, 1);

    stateEdit = new QLineEdit(nameaddressFrame);
    stateEdit->setObjectName(QString::fromUtf8("stateEdit"));
    QSizePolicy sizePolicy4(static_cast<QSizePolicy::Policy>(0), static_cast<QSizePolicy::Policy>(0));
    sizePolicy4.setHorizontalStretch(1);
    sizePolicy4.setVerticalStretch(0);
    sizePolicy4.setHeightForWidth(stateEdit->sizePolicy().hasHeightForWidth());
    stateEdit->setSizePolicy(sizePolicy4);
    stateEdit->setMinimumSize(QSize(30, 0));
    stateEdit->setMaximumSize(QSize(35, 16777215));
    stateEdit->setMaxLength(2);

    gridLayout5->addWidget(stateEdit, 4, 7, 1, 1);

    lastnameLabel = new QLabel(nameaddressFrame);
    lastnameLabel->setObjectName(QString::fromUtf8("lastnameLabel"));

    gridLayout5->addWidget(lastnameLabel, 0, 0, 1, 1);

    zipLabel = new QLabel(nameaddressFrame);
    zipLabel->setObjectName(QString::fromUtf8("zipLabel"));

    gridLayout5->addWidget(zipLabel, 5, 0, 1, 1);

    cityLabel = new QLabel(nameaddressFrame);
    cityLabel->setObjectName(QString::fromUtf8("cityLabel"));

    gridLayout5->addWidget(cityLabel, 4, 0, 1, 1);

    countryLabel = new QLabel(nameaddressFrame);
    countryLabel->setObjectName(QString::fromUtf8("countryLabel"));

    gridLayout5->addWidget(countryLabel, 5, 5, 1, 2);

    hboxLayout = new QHBoxLayout();
    hboxLayout->setSpacing(4);
    hboxLayout->setMargin(0);
    hboxLayout->setObjectName(QString::fromUtf8("hboxLayout"));
    zipcodeEdit = new QLineEdit(nameaddressFrame);
    zipcodeEdit->setObjectName(QString::fromUtf8("zipcodeEdit"));
    QSizePolicy sizePolicy5(static_cast<QSizePolicy::Policy>(0), static_cast<QSizePolicy::Policy>(0));
    sizePolicy5.setHorizontalStretch(0);
    sizePolicy5.setVerticalStretch(0);
    sizePolicy5.setHeightForWidth(zipcodeEdit->sizePolicy().hasHeightForWidth());
    zipcodeEdit->setSizePolicy(sizePolicy5);
    zipcodeEdit->setMinimumSize(QSize(65, 0));
    zipcodeEdit->setMaximumSize(QSize(65, 16777215));
    zipcodeEdit->setMaxLength(5);

    hboxLayout->addWidget(zipcodeEdit);

    zipdashLabel = new QLabel(nameaddressFrame);
    zipdashLabel->setObjectName(QString::fromUtf8("zipdashLabel"));
    QSizePolicy sizePolicy6(static_cast<QSizePolicy::Policy>(0), static_cast<QSizePolicy::Policy>(5));
    sizePolicy6.setHorizontalStretch(0);
    sizePolicy6.setVerticalStretch(0);
    sizePolicy6.setHeightForWidth(zipdashLabel->sizePolicy().hasHeightForWidth());
    zipdashLabel->setSizePolicy(sizePolicy6);

    hboxLayout->addWidget(zipdashLabel);

    zipextEdit = new QLineEdit(nameaddressFrame);
    zipextEdit->setObjectName(QString::fromUtf8("zipextEdit"));
    QSizePolicy sizePolicy7(static_cast<QSizePolicy::Policy>(0), static_cast<QSizePolicy::Policy>(0));
    sizePolicy7.setHorizontalStretch(0);
    sizePolicy7.setVerticalStretch(0);
    sizePolicy7.setHeightForWidth(zipextEdit->sizePolicy().hasHeightForWidth());
    zipextEdit->setSizePolicy(sizePolicy7);
    zipextEdit->setMinimumSize(QSize(45, 0));
    zipextEdit->setMaximumSize(QSize(45, 16777215));
    zipextEdit->setMaxLength(4);

    hboxLayout->addWidget(zipextEdit);


    gridLayout5->addLayout(hboxLayout, 5, 1, 1, 4);

    stateLabel = new QLabel(nameaddressFrame);
    stateLabel->setObjectName(QString::fromUtf8("stateLabel"));

    gridLayout5->addWidget(stateLabel, 4, 6, 1, 1);

    spacerItem3 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);

    gridLayout5->addItem(spacerItem3, 1, 9, 1, 1);

    middleiEdit = new QLineEdit(nameaddressFrame);
    middleiEdit->setObjectName(QString::fromUtf8("middleiEdit"));
    QSizePolicy sizePolicy8(static_cast<QSizePolicy::Policy>(0), static_cast<QSizePolicy::Policy>(0));
    sizePolicy8.setHorizontalStretch(0);
    sizePolicy8.setVerticalStretch(0);
    sizePolicy8.setHeightForWidth(middleiEdit->sizePolicy().hasHeightForWidth());
    middleiEdit->setSizePolicy(sizePolicy8);
    middleiEdit->setMinimumSize(QSize(20, 0));
    middleiEdit->setMaximumSize(QSize(20, 16777215));
    middleiEdit->setMaxLength(1);

    gridLayout5->addWidget(middleiEdit, 1, 8, 1, 1);

    middleiLabel = new QLabel(nameaddressFrame);
    middleiLabel->setObjectName(QString::fromUtf8("middleiLabel"));

    gridLayout5->addWidget(middleiLabel, 1, 7, 1, 1);

    countryEdit = new QLineEdit(nameaddressFrame);
    countryEdit->setObjectName(QString::fromUtf8("countryEdit"));
    countryEdit->setMaxLength(20);

    gridLayout5->addWidget(countryEdit, 5, 7, 1, 5);

    street1Edit = new QLineEdit(nameaddressFrame);
    street1Edit->setObjectName(QString::fromUtf8("street1Edit"));
    street1Edit->setMaxLength(30);

    gridLayout5->addWidget(street1Edit, 2, 1, 1, 12);

    street2Edit = new QLineEdit(nameaddressFrame);
    street2Edit->setObjectName(QString::fromUtf8("street2Edit"));
    street2Edit->setMaxLength(30);

    gridLayout5->addWidget(street2Edit, 3, 1, 1, 12);

    firstnameEdit = new QLineEdit(nameaddressFrame);
    firstnameEdit->setObjectName(QString::fromUtf8("firstnameEdit"));
    QSizePolicy sizePolicy9(static_cast<QSizePolicy::Policy>(3), static_cast<QSizePolicy::Policy>(0));
    sizePolicy9.setHorizontalStretch(0);
    sizePolicy9.setVerticalStretch(0);
    sizePolicy9.setHeightForWidth(firstnameEdit->sizePolicy().hasHeightForWidth());
    firstnameEdit->setSizePolicy(sizePolicy9);
    firstnameEdit->setMaxLength(15);

    gridLayout5->addWidget(firstnameEdit, 1, 1, 1, 6);

    cityEdit = new QLineEdit(nameaddressFrame);
    cityEdit->setObjectName(QString::fromUtf8("cityEdit"));
    cityEdit->setMaxLength(20);

    gridLayout5->addWidget(cityEdit, 4, 1, 1, 5);

    lastnameEdit = new QLineEdit(nameaddressFrame);
    lastnameEdit->setObjectName(QString::fromUtf8("lastnameEdit"));
    lastnameEdit->setMaxLength(20);

    gridLayout5->addWidget(lastnameEdit, 0, 1, 1, 7);


    gridLayout4->addLayout(gridLayout5, 0, 0, 1, 1);


    gridLayout1->addWidget(nameaddressFrame, 1, 0, 1, 1);

    phonecontactGroupBox = new QGroupBox(nameTab);
    phonecontactGroupBox->setObjectName(QString::fromUtf8("phonecontactGroupBox"));
    QSizePolicy sizePolicy10(static_cast<QSizePolicy::Policy>(5), static_cast<QSizePolicy::Policy>(4));
    sizePolicy10.setHorizontalStretch(0);
    sizePolicy10.setVerticalStretch(0);
    sizePolicy10.setHeightForWidth(phonecontactGroupBox->sizePolicy().hasHeightForWidth());
    phonecontactGroupBox->setSizePolicy(sizePolicy10);
    gridLayout6 = new QGridLayout(phonecontactGroupBox);
    gridLayout6->setSpacing(2);
    gridLayout6->setMargin(2);
    gridLayout6->setObjectName(QString::fromUtf8("gridLayout6"));
    gridLayout7 = new QGridLayout();
    gridLayout7->setSpacing(2);
    gridLayout7->setMargin(0);
    gridLayout7->setObjectName(QString::fromUtf8("gridLayout7"));
    workphoneEdit = new QLineEdit(phonecontactGroupBox);
    workphoneEdit->setObjectName(QString::fromUtf8("workphoneEdit"));
    workphoneEdit->setMinimumSize(QSize(112, 0));
    workphoneEdit->setMaxLength(13);

    gridLayout7->addWidget(workphoneEdit, 0, 1, 1, 1);

    workphoneLabel = new QLabel(phonecontactGroupBox);
    workphoneLabel->setObjectName(QString::fromUtf8("workphoneLabel"));

    gridLayout7->addWidget(workphoneLabel, 0, 0, 1, 1);

    workextEdit = new QLineEdit(phonecontactGroupBox);
    workextEdit->setObjectName(QString::fromUtf8("workextEdit"));
    workextEdit->setMinimumSize(QSize(40, 0));
    workextEdit->setMaxLength(4);

    gridLayout7->addWidget(workextEdit, 0, 2, 1, 1);

    faxLabel = new QLabel(phonecontactGroupBox);
    faxLabel->setObjectName(QString::fromUtf8("faxLabel"));

    gridLayout7->addWidget(faxLabel, 1, 0, 1, 1);

    faxEdit = new QLineEdit(phonecontactGroupBox);
    faxEdit->setObjectName(QString::fromUtf8("faxEdit"));
    faxEdit->setMinimumSize(QSize(112, 0));
    faxEdit->setMaxLength(13);

    gridLayout7->addWidget(faxEdit, 1, 1, 1, 1);

    faxextEdit = new QLineEdit(phonecontactGroupBox);
    faxextEdit->setObjectName(QString::fromUtf8("faxextEdit"));
    faxextEdit->setMinimumSize(QSize(40, 0));
    faxextEdit->setMaxLength(4);

    gridLayout7->addWidget(faxextEdit, 1, 2, 1, 1);


    gridLayout6->addLayout(gridLayout7, 0, 1, 1, 2);

    gridLayout8 = new QGridLayout();
    gridLayout8->setSpacing(2);
    gridLayout8->setMargin(0);
    gridLayout8->setObjectName(QString::fromUtf8("gridLayout8"));
    homeextEdit = new QLineEdit(phonecontactGroupBox);
    homeextEdit->setObjectName(QString::fromUtf8("homeextEdit"));
    homeextEdit->setMinimumSize(QSize(40, 0));
    homeextEdit->setMaxLength(4);

    gridLayout8->addWidget(homeextEdit, 0, 2, 1, 1);

    mobileextEdit = new QLineEdit(phonecontactGroupBox);
    mobileextEdit->setObjectName(QString::fromUtf8("mobileextEdit"));
    mobileextEdit->setMinimumSize(QSize(40, 0));
    mobileextEdit->setMaxLength(4);

    gridLayout8->addWidget(mobileextEdit, 1, 2, 1, 1);

    homephoneLabel = new QLabel(phonecontactGroupBox);
    homephoneLabel->setObjectName(QString::fromUtf8("homephoneLabel"));

    gridLayout8->addWidget(homephoneLabel, 0, 0, 1, 1);

    mobilephoneLabel = new QLabel(phonecontactGroupBox);
    mobilephoneLabel->setObjectName(QString::fromUtf8("mobilephoneLabel"));

    gridLayout8->addWidget(mobilephoneLabel, 1, 0, 1, 1);

    homephoneEdit = new QLineEdit(phonecontactGroupBox);
    homephoneEdit->setObjectName(QString::fromUtf8("homephoneEdit"));
    homephoneEdit->setMinimumSize(QSize(112, 0));
    homephoneEdit->setMaxLength(13);

    gridLayout8->addWidget(homephoneEdit, 0, 1, 1, 1);

    mobilephoneEdit = new QLineEdit(phonecontactGroupBox);
    mobilephoneEdit->setObjectName(QString::fromUtf8("mobilephoneEdit"));
    mobilephoneEdit->setMinimumSize(QSize(112, 0));
    mobilephoneEdit->setMaxLength(13);

    gridLayout8->addWidget(mobilephoneEdit, 1, 1, 1, 1);


    gridLayout6->addLayout(gridLayout8, 0, 0, 1, 1);

    hboxLayout1 = new QHBoxLayout();
    hboxLayout1->setSpacing(6);
    hboxLayout1->setMargin(0);
    hboxLayout1->setObjectName(QString::fromUtf8("hboxLayout1"));
    emailLabel = new QLabel(phonecontactGroupBox);
    emailLabel->setObjectName(QString::fromUtf8("emailLabel"));

    hboxLayout1->addWidget(emailLabel);

    emailEdit = new QLineEdit(phonecontactGroupBox);
    emailEdit->setObjectName(QString::fromUtf8("emailEdit"));
    emailEdit->setMaxLength(35);

    hboxLayout1->addWidget(emailEdit);


    gridLayout6->addLayout(hboxLayout1, 1, 0, 1, 2);


    gridLayout1->addWidget(phonecontactGroupBox, 2, 0, 1, 1);

    mainTab->addTab(nameTab, QApplication::translate("ProviderWindow", "Name/Co&ntact Information", 0, QApplication::UnicodeUTF8));
    otherTab = new QWidget();
    otherTab->setObjectName(QString::fromUtf8("otherTab"));
    gridLayout9 = new QGridLayout(otherTab);
    gridLayout9->setSpacing(6);
    gridLayout9->setMargin(9);
    gridLayout9->setObjectName(QString::fromUtf8("gridLayout9"));
    otherinfoFrame1 = new QFrame(otherTab);
    otherinfoFrame1->setObjectName(QString::fromUtf8("otherinfoFrame1"));
    QSizePolicy sizePolicy11(static_cast<QSizePolicy::Policy>(5), static_cast<QSizePolicy::Policy>(4));
    sizePolicy11.setHorizontalStretch(0);
    sizePolicy11.setVerticalStretch(0);
    sizePolicy11.setHeightForWidth(otherinfoFrame1->sizePolicy().hasHeightForWidth());
    otherinfoFrame1->setSizePolicy(sizePolicy11);
    otherinfoFrame1->setFrameShape(QFrame::StyledPanel);
    otherinfoFrame1->setFrameShadow(QFrame::Plain);
    gridLayout10 = new QGridLayout(otherinfoFrame1);
    gridLayout10->setSpacing(2);
    gridLayout10->setMargin(2);
    gridLayout10->setObjectName(QString::fromUtf8("gridLayout10"));
    sofdateLabel = new QLabel(otherinfoFrame1);
    sofdateLabel->setObjectName(QString::fromUtf8("sofdateLabel"));

    gridLayout10->addWidget(sofdateLabel, 3, 4, 1, 1);

    sofdateEdit = new QDateEdit(otherinfoFrame1);
    sofdateEdit->setObjectName(QString::fromUtf8("sofdateEdit"));
    QSizePolicy sizePolicy12(static_cast<QSizePolicy::Policy>(5), static_cast<QSizePolicy::Policy>(0));
    sizePolicy12.setHorizontalStretch(0);
    sizePolicy12.setVerticalStretch(0);
    sizePolicy12.setHeightForWidth(sofdateEdit->sizePolicy().hasHeightForWidth());
    sofdateEdit->setSizePolicy(sizePolicy12);

    gridLayout10->addWidget(sofdateEdit, 3, 5, 1, 2);

    birthdateEdit = new QDateEdit(otherinfoFrame1);
    birthdateEdit->setObjectName(QString::fromUtf8("birthdateEdit"));
    QSizePolicy sizePolicy13(static_cast<QSizePolicy::Policy>(5), static_cast<QSizePolicy::Policy>(0));
    sizePolicy13.setHorizontalStretch(0);
    sizePolicy13.setVerticalStretch(0);
    sizePolicy13.setHeightForWidth(birthdateEdit->sizePolicy().hasHeightForWidth());
    birthdateEdit->setSizePolicy(sizePolicy13);

    gridLayout10->addWidget(birthdateEdit, 4, 2, 1, 2);

    ssnLabel = new QLabel(otherinfoFrame1);
    ssnLabel->setObjectName(QString::fromUtf8("ssnLabel"));

    gridLayout10->addWidget(ssnLabel, 0, 0, 1, 1);

    line = new QFrame(otherinfoFrame1);
    line->setObjectName(QString::fromUtf8("line"));
    line->setFrameShape(QFrame::HLine);

    gridLayout10->addWidget(line, 2, 0, 1, 6);

    datecreatedLabel = new QLabel(otherinfoFrame1);
    datecreatedLabel->setObjectName(QString::fromUtf8("datecreatedLabel"));

    gridLayout10->addWidget(datecreatedLabel, 4, 4, 1, 1);

    datecreatedEdit = new QDateEdit(otherinfoFrame1);
    datecreatedEdit->setObjectName(QString::fromUtf8("datecreatedEdit"));
    QSizePolicy sizePolicy14(static_cast<QSizePolicy::Policy>(5), static_cast<QSizePolicy::Policy>(0));
    sizePolicy14.setHorizontalStretch(0);
    sizePolicy14.setVerticalStretch(0);
    sizePolicy14.setHeightForWidth(datecreatedEdit->sizePolicy().hasHeightForWidth());
    datecreatedEdit->setSizePolicy(sizePolicy14);

    gridLayout10->addWidget(datecreatedEdit, 4, 5, 1, 2);

    birthdateLabel = new QLabel(otherinfoFrame1);
    birthdateLabel->setObjectName(QString::fromUtf8("birthdateLabel"));

    gridLayout10->addWidget(birthdateLabel, 4, 0, 1, 2);

    sofCheckBox = new QCheckBox(otherinfoFrame1);
    sofCheckBox->setObjectName(QString::fromUtf8("sofCheckBox"));

    gridLayout10->addWidget(sofCheckBox, 3, 0, 1, 4);

    licensenumberLabel = new QLabel(otherinfoFrame1);
    licensenumberLabel->setObjectName(QString::fromUtf8("licensenumberLabel"));

    gridLayout10->addWidget(licensenumberLabel, 1, 0, 1, 1);

    licensenumberEdit = new QLineEdit(otherinfoFrame1);
    licensenumberEdit->setObjectName(QString::fromUtf8("licensenumberEdit"));
    licensenumberEdit->setMaxLength(15);

    gridLayout10->addWidget(licensenumberEdit, 1, 1, 1, 3);

    spacerItem4 = new QSpacerItem(191, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);

    gridLayout10->addItem(spacerItem4, 0, 4, 1, 3);

    ssnEdit = new QLineEdit(otherinfoFrame1);
    ssnEdit->setObjectName(QString::fromUtf8("ssnEdit"));

    gridLayout10->addWidget(ssnEdit, 0, 1, 1, 3);


    gridLayout9->addWidget(otherinfoFrame1, 0, 0, 1, 1);

    otherinformationGroupBox = new QGroupBox(otherTab);
    otherinformationGroupBox->setObjectName(QString::fromUtf8("otherinformationGroupBox"));
    QSizePolicy sizePolicy15(static_cast<QSizePolicy::Policy>(5), static_cast<QSizePolicy::Policy>(4));
    sizePolicy15.setHorizontalStretch(0);
    sizePolicy15.setVerticalStretch(0);
    sizePolicy15.setHeightForWidth(otherinformationGroupBox->sizePolicy().hasHeightForWidth());
    otherinformationGroupBox->setSizePolicy(sizePolicy15);
    gridLayout11 = new QGridLayout(otherinformationGroupBox);
    gridLayout11->setSpacing(2);
    gridLayout11->setMargin(2);
    gridLayout11->setObjectName(QString::fromUtf8("gridLayout11"));

    gridLayout9->addWidget(otherinformationGroupBox, 2, 0, 1, 1);

    otherinfoFrame2 = new QFrame(otherTab);
    otherinfoFrame2->setObjectName(QString::fromUtf8("otherinfoFrame2"));
    otherinfoFrame2->setFrameShape(QFrame::StyledPanel);
    otherinfoFrame2->setFrameShadow(QFrame::Plain);
    gridLayout12 = new QGridLayout(otherinfoFrame2);
    gridLayout12->setSpacing(6);
    gridLayout12->setMargin(9);
    gridLayout12->setObjectName(QString::fromUtf8("gridLayout12"));
    spacerItem5 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);

    gridLayout12->addItem(spacerItem5, 0, 0, 1, 1);

    sexComboBox = new QComboBox(otherinfoFrame2);
    sexComboBox->setObjectName(QString::fromUtf8("sexComboBox"));

    gridLayout12->addWidget(sexComboBox, 0, 2, 1, 1);

    spacerItem6 = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding);

    gridLayout12->addItem(spacerItem6, 1, 0, 1, 1);

    sexLabel = new QLabel(otherinfoFrame2);
    sexLabel->setObjectName(QString::fromUtf8("sexLabel"));

    gridLayout12->addWidget(sexLabel, 0, 1, 1, 1);


    gridLayout9->addWidget(otherinfoFrame2, 1, 0, 1, 1);

    mainTab->addTab(otherTab, QApplication::translate("ProviderWindow", "Ot&her", 0, QApplication::UnicodeUTF8));
    appointmentTab = new QWidget();
    appointmentTab->setObjectName(QString::fromUtf8("appointmentTab"));
    mainTab->addTab(appointmentTab, QApplication::translate("ProviderWindow", "A&ppointments", 0, QApplication::UnicodeUTF8));

    gridLayout->addWidget(mainTab, 0, 0, 1, 1);

    taskFrame = new QFrame(this);
    taskFrame->setObjectName(QString::fromUtf8("taskFrame"));
    QSizePolicy sizePolicy16(static_cast<QSizePolicy::Policy>(0), static_cast<QSizePolicy::Policy>(1));
    sizePolicy16.setHorizontalStretch(0);
    sizePolicy16.setVerticalStretch(0);
    sizePolicy16.setHeightForWidth(taskFrame->sizePolicy().hasHeightForWidth());
    taskFrame->setSizePolicy(sizePolicy16);
    taskFrame->setMinimumSize(QSize(115, 16));
    taskFrame->setFrameShape(QFrame::StyledPanel);
    taskFrame->setFrameShadow(QFrame::Plain);
    gridLayout13 = new QGridLayout(taskFrame);
    gridLayout13->setSpacing(2);
    gridLayout13->setMargin(2);
    gridLayout13->setObjectName(QString::fromUtf8("gridLayout13"));
    appointmentButton = new QPushButton(taskFrame);
    appointmentButton->setObjectName(QString::fromUtf8("appointmentButton"));
    appointmentButton->setEnabled(false);

    gridLayout13->addWidget(appointmentButton, 0, 0, 1, 1);

    spacerItem7 = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding);

    gridLayout13->addItem(spacerItem7, 3, 0, 1, 1);

    deleteButton = new QPushButton(taskFrame);
    deleteButton->setObjectName(QString::fromUtf8("deleteButton"));
    deleteButton->setEnabled(false);

    gridLayout13->addWidget(deleteButton, 2, 0, 1, 1);


    gridLayout->addWidget(taskFrame, 0, 1, 1, 1);

    buttonFrame = new QFrame(this);
    buttonFrame->setObjectName(QString::fromUtf8("buttonFrame"));
    QSizePolicy sizePolicy17(static_cast<QSizePolicy::Policy>(5), static_cast<QSizePolicy::Policy>(4));
    sizePolicy17.setHorizontalStretch(0);
    sizePolicy17.setVerticalStretch(0);
    sizePolicy17.setHeightForWidth(buttonFrame->sizePolicy().hasHeightForWidth());
    buttonFrame->setSizePolicy(sizePolicy17);
    buttonFrame->setFrameShape(QFrame::StyledPanel);
    buttonFrame->setFrameShadow(QFrame::Plain);
    gridLayout14 = new QGridLayout(buttonFrame);
    gridLayout14->setSpacing(2);
    gridLayout14->setMargin(2);
    gridLayout14->setObjectName(QString::fromUtf8("gridLayout14"));
    hboxLayout2 = new QHBoxLayout();
    hboxLayout2->setSpacing(6);
    hboxLayout2->setMargin(0);
    hboxLayout2->setObjectName(QString::fromUtf8("hboxLayout2"));
    cancelButton = new QPushButton(buttonFrame);
    cancelButton->setObjectName(QString::fromUtf8("cancelButton"));
    cancelButton->setMinimumSize(QSize(0, 0));
    cancelButton->setMaximumSize(QSize(16777215, 16777215));

    hboxLayout2->addWidget(cancelButton);

    saveButton = new QPushButton(buttonFrame);
    saveButton->setObjectName(QString::fromUtf8("saveButton"));
    saveButton->setMinimumSize(QSize(0, 0));
    saveButton->setMaximumSize(QSize(16777215, 16777215));

    hboxLayout2->addWidget(saveButton);


    gridLayout14->addLayout(hboxLayout2, 0, 4, 1, 1);

    spacerItem8 = new QSpacerItem(207, 16, QSizePolicy::Expanding, QSizePolicy::Minimum);

    gridLayout14->addItem(spacerItem8, 0, 3, 1, 1);

    spacerItem9 = new QSpacerItem(16, 16, QSizePolicy::Expanding, QSizePolicy::Minimum);

    gridLayout14->addItem(spacerItem9, 0, 2, 1, 1);

    helpButton = new QPushButton(buttonFrame);
    helpButton->setObjectName(QString::fromUtf8("helpButton"));
    helpButton->setEnabled(false);

    gridLayout14->addWidget(helpButton, 0, 0, 1, 1);

    spacerItem10 = new QSpacerItem(16, 16, QSizePolicy::Expanding, QSizePolicy::Minimum);

    gridLayout14->addItem(spacerItem10, 0, 1, 1, 1);


    gridLayout->addWidget(buttonFrame, 1, 0, 1, 2);

    codeLabel->setBuddy(codeEdit);
    firstnameLabel->setBuddy(firstnameEdit);
    streetLabel->setBuddy(street1Edit);
    lastnameLabel->setBuddy(lastnameEdit);
    zipLabel->setBuddy(zipcodeEdit);
    cityLabel->setBuddy(cityEdit);
    countryLabel->setBuddy(countryEdit);
    stateLabel->setBuddy(stateEdit);
    middleiLabel->setBuddy(middleiEdit);
    workphoneLabel->setBuddy(workphoneEdit);
    faxLabel->setBuddy(faxEdit);
    homephoneLabel->setBuddy(homephoneEdit);
    mobilephoneLabel->setBuddy(mobilephoneEdit);
    emailLabel->setBuddy(emailEdit);
    sofdateLabel->setBuddy(sofdateEdit);
    ssnLabel->setBuddy(ssnEdit);
    datecreatedLabel->setBuddy(datecreatedEdit);
    birthdateLabel->setBuddy(birthdateEdit);
    licensenumberLabel->setBuddy(licensenumberEdit);
    QWidget::setTabOrder(mainTab, codeEdit);
    QWidget::setTabOrder(codeEdit, provideractiveCheckBox);
    QWidget::setTabOrder(provideractiveCheckBox, lastnameEdit);
    QWidget::setTabOrder(lastnameEdit, firstnameEdit);
    QWidget::setTabOrder(firstnameEdit, middleiEdit);
    QWidget::setTabOrder(middleiEdit, street1Edit);
    QWidget::setTabOrder(street1Edit, street2Edit);
    QWidget::setTabOrder(street2Edit, cityEdit);
    QWidget::setTabOrder(cityEdit, stateEdit);
    QWidget::setTabOrder(stateEdit, zipcodeEdit);
    QWidget::setTabOrder(zipcodeEdit, zipextEdit);
    QWidget::setTabOrder(zipextEdit, countryEdit);
    QWidget::setTabOrder(countryEdit, homephoneEdit);
    QWidget::setTabOrder(homephoneEdit, homeextEdit);
    QWidget::setTabOrder(homeextEdit, workphoneEdit);
    QWidget::setTabOrder(workphoneEdit, workextEdit);
    QWidget::setTabOrder(workextEdit, mobilephoneEdit);
    QWidget::setTabOrder(mobilephoneEdit, mobileextEdit);
    QWidget::setTabOrder(mobileextEdit, faxEdit);
    QWidget::setTabOrder(faxEdit, faxextEdit);
    QWidget::setTabOrder(faxextEdit, emailEdit);
    QWidget::setTabOrder(emailEdit, ssnEdit);
    QWidget::setTabOrder(ssnEdit, licensenumberEdit);
    QWidget::setTabOrder(licensenumberEdit, sofCheckBox);
    QWidget::setTabOrder(sofCheckBox, birthdateEdit);
    QWidget::setTabOrder(birthdateEdit, sofdateEdit);
    QWidget::setTabOrder(sofdateEdit, datecreatedEdit);
    QWidget::setTabOrder(datecreatedEdit, cancelButton);
    QWidget::setTabOrder(cancelButton, saveButton);
    QWidget::setTabOrder(saveButton, helpButton);
    QWidget::setTabOrder(helpButton, appointmentButton);
    QWidget::setTabOrder(appointmentButton, deleteButton);

    setWindowTitle(QApplication::translate("ProviderWindow", "Provider Edit", 0, QApplication::UnicodeUTF8));
    codemessageLabel->setText(QApplication::translate("ProviderWindow", "<html><head><meta name=\"qrichtext\" content=\"1\" /></head><body style=\" white-space: pre-wrap; font-family:Sans Serif; font-size:9pt; font-weight:400; font-style:normal; text-decoration:none;\"><p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">I<span style=\" font-size:8pt;\">f Provider ID not specified one will be created.</span></p></body></html>", 0, QApplication::UnicodeUTF8));
    provideractiveCheckBox->setText(QApplication::translate("ProviderWindow", "Provider &Active", 0, QApplication::UnicodeUTF8));
    codeLabel->setText(QApplication::translate("ProviderWindow", "Provider ID:", 0, QApplication::UnicodeUTF8));
    firstnameLabel->setText(QApplication::translate("ProviderWindow", "&First Name:", 0, QApplication::UnicodeUTF8));
    streetLabel->setText(QApplication::translate("ProviderWindow", "&Street:", 0, QApplication::UnicodeUTF8));
    lastnameLabel->setText(QApplication::translate("ProviderWindow", "&Last Name:", 0, QApplication::UnicodeUTF8));
    zipLabel->setText(QApplication::translate("ProviderWindow", "&Zip Code:", 0, QApplication::UnicodeUTF8));
    cityLabel->setText(QApplication::translate("ProviderWindow", "C&ity:", 0, QApplication::UnicodeUTF8));
    countryLabel->setText(QApplication::translate("ProviderWindow", "C&ountry:", 0, QApplication::UnicodeUTF8));
    zipdashLabel->setText(QApplication::translate("ProviderWindow", "-", 0, QApplication::UnicodeUTF8));
    stateLabel->setText(QApplication::translate("ProviderWindow", "&State:", 0, QApplication::UnicodeUTF8));
    middleiLabel->setText(QApplication::translate("ProviderWindow", "&M.I.:", 0, QApplication::UnicodeUTF8));
    phonecontactGroupBox->setTitle(QApplication::translate("ProviderWindow", "Phone/Contact Information", 0, QApplication::UnicodeUTF8));
    workphoneEdit->setInputMask(QApplication::translate("ProviderWindow", "(999)999-9999; ", 0, QApplication::UnicodeUTF8));
    workphoneLabel->setText(QApplication::translate("ProviderWindow", "O&ffice:", 0, QApplication::UnicodeUTF8));
    faxLabel->setText(QApplication::translate("ProviderWindow", "Fa&x;", 0, QApplication::UnicodeUTF8));
    faxEdit->setInputMask(QApplication::translate("ProviderWindow", "(999)999-9999; ", 0, QApplication::UnicodeUTF8));
    homephoneLabel->setText(QApplication::translate("ProviderWindow", "Ho&me:", 0, QApplication::UnicodeUTF8));
    mobilephoneLabel->setText(QApplication::translate("ProviderWindow", "Mo&bile:", 0, QApplication::UnicodeUTF8));
    homephoneEdit->setInputMask(QApplication::translate("ProviderWindow", "(999)999-9999; ", 0, QApplication::UnicodeUTF8));
    mobilephoneEdit->setInputMask(QApplication::translate("ProviderWindow", "(999)999-9999; ", 0, QApplication::UnicodeUTF8));
    emailLabel->setText(QApplication::translate("ProviderWindow", "&E-Mail:", 0, QApplication::UnicodeUTF8));
    mainTab->setTabText(mainTab->indexOf(nameTab), QApplication::translate("ProviderWindow", "Name/Co&ntact Information", 0, QApplication::UnicodeUTF8));
    sofdateLabel->setText(QApplication::translate("ProviderWindow", "S&ignature Date:", 0, QApplication::UnicodeUTF8));
    sofdateEdit->setDisplayFormat(QApplication::translate("ProviderWindow", "MM/dd/yyyy", 0, QApplication::UnicodeUTF8));
    birthdateEdit->setDisplayFormat(QApplication::translate("ProviderWindow", "MM/dd/yyyy", 0, QApplication::UnicodeUTF8));
    ssnLabel->setText(QApplication::translate("ProviderWindow", "S&SN:", 0, QApplication::UnicodeUTF8));
    datecreatedLabel->setText(QApplication::translate("ProviderWindow", "&Date Created:", 0, QApplication::UnicodeUTF8));
    datecreatedEdit->setDisplayFormat(QApplication::translate("ProviderWindow", "MM/dd/yyyy", 0, QApplication::UnicodeUTF8));
    birthdateLabel->setText(QApplication::translate("ProviderWindow", "&Birth Date:", 0, QApplication::UnicodeUTF8));
    sofCheckBox->setText(QApplication::translate("ProviderWindow", "Si&gnature on File", 0, QApplication::UnicodeUTF8));
    licensenumberLabel->setText(QApplication::translate("ProviderWindow", "License#:", 0, QApplication::UnicodeUTF8));
    ssnEdit->setInputMask(QApplication::translate("ProviderWindow", "999-99-9999; ", 0, QApplication::UnicodeUTF8));
    otherinformationGroupBox->setTitle(QApplication::translate("ProviderWindow", "Other Information", 0, QApplication::UnicodeUTF8));
    sexComboBox->addItem(QApplication::translate("ProviderWindow", "", 0, QApplication::UnicodeUTF8));
    sexComboBox->addItem(QApplication::translate("ProviderWindow", "M", 0, QApplication::UnicodeUTF8));
    sexComboBox->addItem(QApplication::translate("ProviderWindow", "F", 0, QApplication::UnicodeUTF8));
    sexLabel->setText(QApplication::translate("ProviderWindow", "Sex:", 0, QApplication::UnicodeUTF8));
    mainTab->setTabText(mainTab->indexOf(otherTab), QApplication::translate("ProviderWindow", "Ot&her", 0, QApplication::UnicodeUTF8));
    mainTab->setTabText(mainTab->indexOf(appointmentTab), QApplication::translate("ProviderWindow", "A&ppointments", 0, QApplication::UnicodeUTF8));
    appointmentButton->setText(QApplication::translate("ProviderWindow", "Appointments", 0, QApplication::UnicodeUTF8));
    deleteButton->setText(QApplication::translate("ProviderWindow", "Delete Provider", 0, QApplication::UnicodeUTF8));
    cancelButton->setText(QApplication::translate("ProviderWindow", "C&ancel", 0, QApplication::UnicodeUTF8));
    saveButton->setText(QApplication::translate("ProviderWindow", "&Save", 0, QApplication::UnicodeUTF8));
    helpButton->setText(QApplication::translate("ProviderWindow", "&Help", 0, QApplication::UnicodeUTF8));



// My Modifications After the past from providerwindow.ui


if(record->getType() != PROVIDER_NEW)
{
	deleteButton->setEnabled(true);
}

codeLabel->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
firstnameLabel->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
streetLabel->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
lastnameLabel->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
zipLabel->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
cityLabel->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
countryLabel->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
zipdashLabel->setAlignment(Qt::AlignHCenter|Qt::AlignVCenter);
workphoneLabel->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
faxLabel->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
homephoneLabel->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
mobilephoneLabel->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
homephoneLabel->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
emailLabel->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
sofdateLabel->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
datecreatedLabel->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
ssnLabel->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
licensenumberLabel->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
sexLabel->setAlignment(Qt::AlignRight|Qt::AlignVCenter);

}
コード例 #6
0
ファイル: qt_dock_region.cpp プロジェクト: Aidanboneham/wgtf
void QtDockRegion::addView(IView& view)
{
	auto qMainWindow = qtWindow_.window();
	assert(qMainWindow != nullptr);

	auto findIt = dockWidgetMap_.find(&view);
	if (findIt != dockWidgetMap_.end())
	{
		// already added into the dockWidget
		return;
	}
	// IView will not control qWidget's life-cycle after this call.
	auto qtFramework = get<IQtFramework>();
	assert(qtFramework != nullptr);
	auto qWidget = qtFramework->toQWidget(view);
	if (qWidget == nullptr)
	{
		return;
	}
	auto centralWidget = qMainWindow->centralWidget();
	if (centralWidget != nullptr)
	{
		centralWidget->layout()->addWidget(qWidget);
	}
	qWidget->setSizePolicy(qDockWidget_.sizePolicy());
	qWidget->setMinimumSize(qDockWidget_.minimumSize());
	qWidget->setMaximumSize(qDockWidget_.maximumSize());
	qWidget->setSizeIncrement(qDockWidget_.sizeIncrement());
	qWidget->setBaseSize(qDockWidget_.baseSize());
	qWidget->resize(qWidget->baseSize());

	auto qDockWidget = new NGTDockWidget(&view);
	qDockWidget->setObjectName(view.id());
	IView* pView = &view;
	QtWindow* pWindow = &qtWindow_;
	QObject::connect(qDockWidget, &QDockWidget::visibilityChanged, [qDockWidget, pWindow](bool visible) {
		qDockWidget->visibilityChanged(visible);
		if (visible)
		{
			if (pWindow->isLoadingPreferences())
			{
				return;
			}
			QCoreApplication::postEvent(qDockWidget, new QEvent(QEvent::FocusIn));
		}

	});

	if (qtWindow_.isReady())
	{
		bool isOk = qMainWindow->restoreDockWidget(qDockWidget);
		if (!isOk)
		{
			setDefaultPreferenceForDockWidget(qDockWidget);
		}
		QmlView* qmlView = dynamic_cast<QmlView*>(pView);
		if (qmlView != nullptr)
		{
			if (qDockWidget->isVisible() && qDockWidget->getVisibility())
			{
				qmlView->setNeedsToLoad(true);
			}
		}
	}
	else
	{
		needToRestorePreference_.push_back(std::make_pair(qDockWidget, pView));
	}
	qDockWidget->setWidget(qWidget);

	std::string actionId("View.");
	actionId += view.title();

	auto action = qtFramework->createAction(actionId.c_str(), view.title(), "View", [pView, qDockWidget](IAction*) {
		qDockWidget->show();
		qDockWidget->raise();
		pView->focusInEvent();
	});
	auto application = get<IUIApplication>();
	assert(application != nullptr);
	application->addAction(*action);

	dockWidgetMap_[&view] = std::make_pair(std::unique_ptr<QDockWidget>(qDockWidget), std::move(action));
}
コード例 #7
0
ファイル: lifedlg.cpp プロジェクト: kthxbyte/QT2-Linaro
LifeDialog::LifeDialog( int scale, QWidget * parent, const char * name )
    : QWidget( parent, name )
{
    qb = new QPushButton( "Quit!", this );
    cb = new QComboBox( this, "comboBox" );
    life = new LifeWidget(scale, this);
    life->move( SIDEBORDER, TOPBORDER );


    connect( qb, SIGNAL(clicked()), qApp, SLOT(quit()) );
    qb->setGeometry( SIDEBORDER, SIDEBORDER, qb->sizeHint().width(), 25 );
    timer = new LifeTimer( this );

    connect( timer, SIGNAL(timeout()), life, SLOT(nextGeneration()) );
    pb = new QPushButton( "Pause", this );
    pb->setToggleButton( TRUE );
    connect( pb, SIGNAL(toggled(bool)), timer, SLOT(pause(bool)) );
    pb->resize( pb->sizeHint().width(), 25 );
    pb->move( width() - SIDEBORDER - pb->width(), SIDEBORDER );

    sp = new QLabel( "Speed:", this );
    sp->adjustSize();
    sp->move( SIDEBORDER, 45 );
    scroll = new QSlider( 0, LifeTimer::MAXSPEED, 50,
			     LifeTimer::MAXSPEED / 2,
			     QSlider::Horizontal, this );
    connect( scroll, SIGNAL(valueChanged(int)),
	     timer,  SLOT(setSpeed(int)) );

    scroll->move( sp->width() + 2 * SIDEBORDER, 45 );
    scroll->resize( 200, 15 );

    life->setFrameStyle( QFrame::Panel | QFrame::Sunken );
    life->show();

    srand( QTime(0,0,0).msecsTo(QTime::currentTime()) );
    int sel =  rand() % NPATS;
    getPattern( sel );

    cb->move( 2*SIDEBORDER + qb->width(), SIDEBORDER);
    cb->insertItem( "Glider Gun " );
    cb->insertItem( "Figure Eight " );
    cb->insertItem( "Pulsar " );
    cb->insertItem( "Barber Pole P2 " );
    cb->insertItem( "Achim P5 " );
    cb->insertItem( "Hertz P4 " );
    cb->insertItem( "Tumbler " );
    cb->insertItem( "Pulse1 P4" );
    cb->insertItem( "Shining Flower P5 " );
    cb->insertItem( "Pulse2 P6 " );
    cb->insertItem( "Pinwheel, Clock P4 " );
    cb->insertItem( "Pentadecatholon " );
    cb->insertItem( "Piston " );
    cb->insertItem( "Piston2 " );
    cb->insertItem( "Switch Engine " );
    cb->insertItem( "Gears (Gear, Flywheel, Blinker) " );
    cb->insertItem( "Turbine8 " );
    cb->insertItem( "P16 " );
    cb->insertItem( "Puffer " );
    cb->insertItem( "Escort " );
    cb->insertItem( "Dart Speed 1/3 " );
    cb->insertItem( "Period 4 Speed 1/2 " );
    cb->insertItem( "Another Period 4 Speed 1/2 " );
    cb->insertItem( "Smallest Known Period 3 Spaceship Speed 1/3 " );
    cb->insertItem( "Turtle Speed 1/3 " );
    cb->insertItem( "Smallest Known Period 5 Speed 2/5 " );
    cb->insertItem( "Sym Puffer " );
    cb->insertItem( "], Near Ship, Pi Heptomino " );
    cb->insertItem( "R Pentomino " );
    cb->setAutoResize( FALSE );
    cb->setCurrentItem( sel );
    cb->show();
    connect( cb, SIGNAL(activated(int)), SLOT(getPattern(int)) );

    QSize s;
    s = life->minimumSize();
    setMinimumSize( s.width() + 2 * SIDEBORDER, 
		    s.height() + TOPBORDER + SIDEBORDER );
    s = life->maximumSize();
    setMaximumSize( s.width() + 2 * SIDEBORDER, 
		    s.height() + TOPBORDER + SIDEBORDER );
    s = life->sizeIncrement();
    setSizeIncrement( s.width(), s.height() );

    resize( QMIN(512, qApp->desktop()->width()),
	    QMIN(480, qApp->desktop()->height()) );
}
コード例 #8
0
int QWidget::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
    _id = QObject::qt_metacall(_c, _id, _a);
    if (_id < 0)
        return _id;
    if (_c == QMetaObject::InvokeMetaMethod) {
        if (_id < 23)
            qt_static_metacall(this, _c, _id, _a);
        _id -= 23;
    }
#ifndef QT_NO_PROPERTIES
      else if (_c == QMetaObject::ReadProperty) {
        void *_v = _a[0];
        switch (_id) {
        case 0: *reinterpret_cast< bool*>(_v) = isModal(); break;
        case 1: *reinterpret_cast< Qt::WindowModality*>(_v) = windowModality(); break;
        case 2: *reinterpret_cast< bool*>(_v) = isEnabled(); break;
        case 3: *reinterpret_cast< QRect*>(_v) = geometry(); break;
        case 4: *reinterpret_cast< QRect*>(_v) = frameGeometry(); break;
        case 5: *reinterpret_cast< QRect*>(_v) = normalGeometry(); break;
        case 6: *reinterpret_cast< int*>(_v) = x(); break;
        case 7: *reinterpret_cast< int*>(_v) = y(); break;
        case 8: *reinterpret_cast< QPoint*>(_v) = pos(); break;
        case 9: *reinterpret_cast< QSize*>(_v) = frameSize(); break;
        case 10: *reinterpret_cast< QSize*>(_v) = size(); break;
        case 11: *reinterpret_cast< int*>(_v) = width(); break;
        case 12: *reinterpret_cast< int*>(_v) = height(); break;
        case 13: *reinterpret_cast< QRect*>(_v) = rect(); break;
        case 14: *reinterpret_cast< QRect*>(_v) = childrenRect(); break;
        case 15: *reinterpret_cast< QRegion*>(_v) = childrenRegion(); break;
        case 16: *reinterpret_cast< QSizePolicy*>(_v) = sizePolicy(); break;
        case 17: *reinterpret_cast< QSize*>(_v) = minimumSize(); break;
        case 18: *reinterpret_cast< QSize*>(_v) = maximumSize(); break;
        case 19: *reinterpret_cast< int*>(_v) = minimumWidth(); break;
        case 20: *reinterpret_cast< int*>(_v) = minimumHeight(); break;
        case 21: *reinterpret_cast< int*>(_v) = maximumWidth(); break;
        case 22: *reinterpret_cast< int*>(_v) = maximumHeight(); break;
        case 23: *reinterpret_cast< QSize*>(_v) = sizeIncrement(); break;
        case 24: *reinterpret_cast< QSize*>(_v) = baseSize(); break;
        case 25: *reinterpret_cast< QPalette*>(_v) = palette(); break;
        case 26: *reinterpret_cast< QFont*>(_v) = font(); break;
        case 27: *reinterpret_cast< QCursor*>(_v) = cursor(); break;
        case 28: *reinterpret_cast< bool*>(_v) = hasMouseTracking(); break;
        case 29: *reinterpret_cast< bool*>(_v) = isActiveWindow(); break;
        case 30: *reinterpret_cast< Qt::FocusPolicy*>(_v) = focusPolicy(); break;
        case 31: *reinterpret_cast< bool*>(_v) = hasFocus(); break;
        case 32: *reinterpret_cast< Qt::ContextMenuPolicy*>(_v) = contextMenuPolicy(); break;
        case 33: *reinterpret_cast< bool*>(_v) = updatesEnabled(); break;
        case 34: *reinterpret_cast< bool*>(_v) = isVisible(); break;
        case 35: *reinterpret_cast< bool*>(_v) = isMinimized(); break;
        case 36: *reinterpret_cast< bool*>(_v) = isMaximized(); break;
        case 37: *reinterpret_cast< bool*>(_v) = isFullScreen(); break;
        case 38: *reinterpret_cast< QSize*>(_v) = sizeHint(); break;
        case 39: *reinterpret_cast< QSize*>(_v) = minimumSizeHint(); break;
        case 40: *reinterpret_cast< bool*>(_v) = acceptDrops(); break;
        case 41: *reinterpret_cast< QString*>(_v) = windowTitle(); break;
        case 42: *reinterpret_cast< QIcon*>(_v) = windowIcon(); break;
        case 43: *reinterpret_cast< QString*>(_v) = windowIconText(); break;
        case 44: *reinterpret_cast< double*>(_v) = windowOpacity(); break;
        case 45: *reinterpret_cast< bool*>(_v) = isWindowModified(); break;
        case 46: *reinterpret_cast< QString*>(_v) = toolTip(); break;
        case 47: *reinterpret_cast< QString*>(_v) = statusTip(); break;
        case 48: *reinterpret_cast< QString*>(_v) = whatsThis(); break;
        case 49: *reinterpret_cast< QString*>(_v) = accessibleName(); break;
        case 50: *reinterpret_cast< QString*>(_v) = accessibleDescription(); break;
        case 51: *reinterpret_cast< Qt::LayoutDirection*>(_v) = layoutDirection(); break;
        case 52: *reinterpret_cast< bool*>(_v) = autoFillBackground(); break;
        case 53: *reinterpret_cast< QString*>(_v) = styleSheet(); break;
        case 54: *reinterpret_cast< QLocale*>(_v) = locale(); break;
        case 55: *reinterpret_cast< QString*>(_v) = windowFilePath(); break;
        case 56: *reinterpret_cast< Qt::InputMethodHints*>(_v) = inputMethodHints(); break;
        }
        _id -= 57;
    } else if (_c == QMetaObject::WriteProperty) {
        void *_v = _a[0];
        switch (_id) {
        case 1: setWindowModality(*reinterpret_cast< Qt::WindowModality*>(_v)); break;
        case 2: setEnabled(*reinterpret_cast< bool*>(_v)); break;
        case 3: setGeometry(*reinterpret_cast< QRect*>(_v)); break;
        case 8: move(*reinterpret_cast< QPoint*>(_v)); break;
        case 10: resize(*reinterpret_cast< QSize*>(_v)); break;
        case 16: setSizePolicy(*reinterpret_cast< QSizePolicy*>(_v)); break;
        case 17: setMinimumSize(*reinterpret_cast< QSize*>(_v)); break;
        case 18: setMaximumSize(*reinterpret_cast< QSize*>(_v)); break;
        case 19: setMinimumWidth(*reinterpret_cast< int*>(_v)); break;
        case 20: setMinimumHeight(*reinterpret_cast< int*>(_v)); break;
        case 21: setMaximumWidth(*reinterpret_cast< int*>(_v)); break;
        case 22: setMaximumHeight(*reinterpret_cast< int*>(_v)); break;
        case 23: setSizeIncrement(*reinterpret_cast< QSize*>(_v)); break;
        case 24: setBaseSize(*reinterpret_cast< QSize*>(_v)); break;
        case 25: setPalette(*reinterpret_cast< QPalette*>(_v)); break;
        case 26: setFont(*reinterpret_cast< QFont*>(_v)); break;
        case 27: setCursor(*reinterpret_cast< QCursor*>(_v)); break;
        case 28: setMouseTracking(*reinterpret_cast< bool*>(_v)); break;
        case 30: setFocusPolicy(*reinterpret_cast< Qt::FocusPolicy*>(_v)); break;
        case 32: setContextMenuPolicy(*reinterpret_cast< Qt::ContextMenuPolicy*>(_v)); break;
        case 33: setUpdatesEnabled(*reinterpret_cast< bool*>(_v)); break;
        case 34: setVisible(*reinterpret_cast< bool*>(_v)); break;
        case 40: setAcceptDrops(*reinterpret_cast< bool*>(_v)); break;
        case 41: setWindowTitle(*reinterpret_cast< QString*>(_v)); break;
        case 42: setWindowIcon(*reinterpret_cast< QIcon*>(_v)); break;
        case 43: setWindowIconText(*reinterpret_cast< QString*>(_v)); break;
        case 44: setWindowOpacity(*reinterpret_cast< double*>(_v)); break;
        case 45: setWindowModified(*reinterpret_cast< bool*>(_v)); break;
        case 46: setToolTip(*reinterpret_cast< QString*>(_v)); break;
        case 47: setStatusTip(*reinterpret_cast< QString*>(_v)); break;
        case 48: setWhatsThis(*reinterpret_cast< QString*>(_v)); break;
        case 49: setAccessibleName(*reinterpret_cast< QString*>(_v)); break;
        case 50: setAccessibleDescription(*reinterpret_cast< QString*>(_v)); break;
        case 51: setLayoutDirection(*reinterpret_cast< Qt::LayoutDirection*>(_v)); break;
        case 52: setAutoFillBackground(*reinterpret_cast< bool*>(_v)); break;
        case 53: setStyleSheet(*reinterpret_cast< QString*>(_v)); break;
        case 54: setLocale(*reinterpret_cast< QLocale*>(_v)); break;
        case 55: setWindowFilePath(*reinterpret_cast< QString*>(_v)); break;
        case 56: setInputMethodHints(*reinterpret_cast< Qt::InputMethodHints*>(_v)); break;
        }
        _id -= 57;
    } else if (_c == QMetaObject::ResetProperty) {
        switch (_id) {
        case 27: unsetCursor(); break;
        case 51: unsetLayoutDirection(); break;
        case 54: unsetLocale(); break;
        }
        _id -= 57;
    } else if (_c == QMetaObject::QueryPropertyDesignable) {
        bool *_b = reinterpret_cast<bool*>(_a[0]);
        switch (_id) {
        case 41: *_b = isWindow(); break;
        case 42: *_b = isWindow(); break;
        case 43: *_b = isWindow(); break;
        case 44: *_b = isWindow(); break;
        case 45: *_b = isWindow(); break;
        case 55: *_b = isWindow(); break;
        }
        _id -= 57;
    } else if (_c == QMetaObject::QueryPropertyScriptable) {
        _id -= 57;
    } else if (_c == QMetaObject::QueryPropertyStored) {
        _id -= 57;
    } else if (_c == QMetaObject::QueryPropertyEditable) {
        _id -= 57;
    } else if (_c == QMetaObject::QueryPropertyUser) {
        _id -= 57;
    }
#endif // QT_NO_PROPERTIES
    return _id;
}
コード例 #9
0
bool QWidget::qt_property( int id, int f, QVariant* v)
{
    switch ( id - staticMetaObject()->propertyOffset() ) {
    case 0: switch( f ) {
	case 1: *v = QVariant( this->isTopLevel(), 0 ); break;
	case 3: case 4: case 5: break;
	default: return FALSE;
    } break;
    case 1: switch( f ) {
	case 1: *v = QVariant( this->isDialog(), 0 ); break;
	case 3: case 4: case 5: break;
	default: return FALSE;
    } break;
    case 2: switch( f ) {
	case 1: *v = QVariant( this->isModal(), 0 ); break;
	case 3: case 4: case 5: break;
	default: return FALSE;
    } break;
    case 3: switch( f ) {
	case 1: *v = QVariant( this->isPopup(), 0 ); break;
	case 3: case 4: case 5: break;
	default: return FALSE;
    } break;
    case 4: switch( f ) {
	case 1: *v = QVariant( this->isDesktop(), 0 ); break;
	case 3: case 4: case 5: break;
	default: return FALSE;
    } break;
    case 5: switch( f ) {
	case 0: setEnabled(v->asBool()); break;
	case 1: *v = QVariant( this->isEnabled(), 0 ); break;
	case 3: case 4: case 5: break;
	default: return FALSE;
    } break;
    case 6: switch( f ) {
	case 0: setGeometry(v->asRect()); break;
	case 1: *v = QVariant( this->geometry() ); break;
	case 3: case 4: case 5: break;
	default: return FALSE;
    } break;
    case 7: switch( f ) {
	case 1: *v = QVariant( this->frameGeometry() ); break;
	case 3: case 4: case 5: break;
	default: return FALSE;
    } break;
    case 8: switch( f ) {
	case 1: *v = QVariant( this->x() ); break;
	case 3: case 4: case 5: break;
	default: return FALSE;
    } break;
    case 9: switch( f ) {
	case 1: *v = QVariant( this->y() ); break;
	case 3: case 4: case 5: break;
	default: return FALSE;
    } break;
    case 10: switch( f ) {
	case 0: move(v->asPoint()); break;
	case 1: *v = QVariant( this->pos() ); break;
	case 4: break;
	default: return FALSE;
    } break;
    case 11: switch( f ) {
	case 1: *v = QVariant( this->frameSize() ); break;
	case 3: case 4: case 5: break;
	default: return FALSE;
    } break;
    case 12: switch( f ) {
	case 0: resize(v->asSize()); break;
	case 1: *v = QVariant( this->size() ); break;
	case 4: break;
	default: return FALSE;
    } break;
    case 13: switch( f ) {
	case 1: *v = QVariant( this->width() ); break;
	case 3: case 4: case 5: break;
	default: return FALSE;
    } break;
    case 14: switch( f ) {
	case 1: *v = QVariant( this->height() ); break;
	case 3: case 4: case 5: break;
	default: return FALSE;
    } break;
    case 15: switch( f ) {
	case 1: *v = QVariant( this->rect() ); break;
	case 3: case 4: case 5: break;
	default: return FALSE;
    } break;
    case 16: switch( f ) {
	case 1: *v = QVariant( this->childrenRect() ); break;
	case 3: case 4: case 5: break;
	default: return FALSE;
    } break;
    case 17: switch( f ) {
	case 1: *v = QVariant( this->childrenRegion() ); break;
	case 3: case 4: case 5: break;
	default: return FALSE;
    } break;
    case 18: switch( f ) {
	case 0: setSizePolicy(v->asSizePolicy()); break;
	case 1: *v = QVariant( this->sizePolicy() ); break;
	case 3: case 4: case 5: break;
	default: return FALSE;
    } break;
    case 19: switch( f ) {
	case 0: setMinimumSize(v->asSize()); break;
	case 1: *v = QVariant( this->minimumSize() ); break;
	case 3: case 4: case 5: break;
	default: return FALSE;
    } break;
    case 20: switch( f ) {
	case 0: setMaximumSize(v->asSize()); break;
	case 1: *v = QVariant( this->maximumSize() ); break;
	case 3: case 4: case 5: break;
	default: return FALSE;
    } break;
    case 21: switch( f ) {
	case 0: setMinimumWidth(v->asInt()); break;
	case 1: *v = QVariant( this->minimumWidth() ); break;
	case 4: break;
	default: return FALSE;
    } break;
    case 22: switch( f ) {
	case 0: setMinimumHeight(v->asInt()); break;
	case 1: *v = QVariant( this->minimumHeight() ); break;
	case 4: break;
	default: return FALSE;
    } break;
    case 23: switch( f ) {
	case 0: setMaximumWidth(v->asInt()); break;
	case 1: *v = QVariant( this->maximumWidth() ); break;
	case 4: break;
	default: return FALSE;
    } break;
    case 24: switch( f ) {
	case 0: setMaximumHeight(v->asInt()); break;
	case 1: *v = QVariant( this->maximumHeight() ); break;
	case 4: break;
	default: return FALSE;
    } break;
    case 25: switch( f ) {
	case 0: setSizeIncrement(v->asSize()); break;
	case 1: *v = QVariant( this->sizeIncrement() ); break;
	case 3: case 4: case 5: break;
	default: return FALSE;
    } break;
    case 26: switch( f ) {
	case 0: setBaseSize(v->asSize()); break;
	case 1: *v = QVariant( this->baseSize() ); break;
	case 3: case 4: case 5: break;
	default: return FALSE;
    } break;
    case 27: switch( f ) {
	case 0: setBackgroundMode((BackgroundMode&)v->asInt()); break;
	case 1: *v = QVariant( (int)this->backgroundMode() ); break;
	case 4: case 5: break;
	default: return FALSE;
    } break;
    case 28: switch( f ) {
	case 0: setPaletteForegroundColor(v->asColor()); break;
	case 1: *v = QVariant( this->paletteForegroundColor() ); break;
	case 2: this->unsetPalette(); break;
	case 3: case 4: case 5: break;
	default: return FALSE;
    } break;
    case 29: switch( f ) {
	case 0: setPaletteBackgroundColor(v->asColor()); break;
	case 1: *v = QVariant( this->paletteBackgroundColor() ); break;
	case 2: this->unsetPalette(); break;
	case 3: case 4: case 5: break;
	default: return FALSE;
    } break;
    case 30: switch( f ) {
	case 0: setPaletteBackgroundPixmap(v->asPixmap()); break;
	case 1: if ( this->paletteBackgroundPixmap() ) *v = QVariant( *paletteBackgroundPixmap() ); break;
	case 2: this->unsetPalette(); break;
	case 3: case 4: case 5: break;
	default: return FALSE;
    } break;
    case 31: switch( f ) {
	case 1: *v = QVariant( this->backgroundBrush() ); break;
	case 3: case 4: case 5: break;
	default: return FALSE;
    } break;
    case 32: switch( f ) {
	case 1: *v = QVariant( this->colorGroup() ); break;
	case 3: case 4: case 5: break;
	default: return FALSE;
    } break;
    case 33: switch( f ) {
	case 0: setPalette(v->asPalette()); break;
	case 1: *v = QVariant( this->palette() ); break;
	case 2: this->unsetPalette(); break;
	case 5: return this->ownPalette();
	case 3: case 4: break;
	default: return FALSE;
    } break;
    case 34: switch( f ) {
	case 0: setBackgroundOrigin((BackgroundOrigin&)v->asInt()); break;
	case 1: *v = QVariant( (int)this->backgroundOrigin() ); break;
	case 3: case 4: case 5: break;
	default: return FALSE;
    } break;
    case 35: switch( f ) {
	case 1: *v = QVariant( this->ownPalette(), 0 ); break;
	case 3: case 4: case 5: break;
	default: return FALSE;
    } break;
    case 36: switch( f ) {
	case 0: setFont(v->asFont()); break;
	case 1: *v = QVariant( this->font() ); break;
	case 2: this->unsetFont(); break;
	case 5: return this->ownFont();
	case 3: case 4: break;
	default: return FALSE;
    } break;
    case 37: switch( f ) {
	case 1: *v = QVariant( this->ownFont(), 0 ); break;
	case 3: case 4: case 5: break;
	default: return FALSE;
    } break;
    case 38: switch( f ) {
	case 0: setCursor(v->asCursor()); break;
	case 1: *v = QVariant( this->cursor() ); break;
	case 2: this->unsetCursor(); break;
	case 5: return this->ownCursor();
	case 3: case 4: break;
	default: return FALSE;
    } break;
    case 39: switch( f ) {
	case 1: *v = QVariant( this->ownCursor(), 0 ); break;
	case 3: case 4: case 5: break;
	default: return FALSE;
    } break;
    case 40: switch( f ) {
	case 0: setCaption(v->asString()); break;
	case 1: *v = QVariant( this->caption() ); break;
	case 3: case 4: case 5: break;
	default: return FALSE;
    } break;
    case 41: switch( f ) {
	case 0: setIcon(v->asPixmap()); break;
	case 1: if ( this->icon() ) *v = QVariant( *icon() ); break;
	case 3: case 4: case 5: break;
	default: return FALSE;
    } break;
    case 42: switch( f ) {
	case 0: setIconText(v->asString()); break;
	case 1: *v = QVariant( this->iconText() ); break;
	case 3: case 4: case 5: break;
	default: return FALSE;
    } break;
    case 43: switch( f ) {
	case 0: setMouseTracking(v->asBool()); break;
	case 1: *v = QVariant( this->hasMouseTracking(), 0 ); break;
	case 3: case 4: case 5: break;
	default: return FALSE;
    } break;
    case 44: switch( f ) {
	case 1: *v = QVariant( this->hasMouse(), 0 ); break;
	case 3: case 4: case 5: break;
	default: return FALSE;
    } break;
    case 45: switch( f ) {
	case 1: *v = QVariant( this->isActiveWindow(), 0 ); break;
	case 3: case 4: case 5: break;
	default: return FALSE;
    } break;
    case 46: switch( f ) {
	case 1: *v = QVariant( this->isFocusEnabled(), 0 ); break;
	case 3: case 4: case 5: break;
	default: return FALSE;
    } break;
    case 47: switch( f ) {
	case 0: setFocusPolicy((FocusPolicy&)v->asInt()); break;
	case 1: *v = QVariant( (int)this->focusPolicy() ); break;
	case 3: case 4: case 5: break;
	default: return FALSE;
    } break;
    case 48: switch( f ) {
	case 1: *v = QVariant( this->hasFocus(), 0 ); break;
	case 3: case 4: case 5: break;
	default: return FALSE;
    } break;
    case 49: switch( f ) {
	case 0: setUpdatesEnabled(v->asBool()); break;
	case 1: *v = QVariant( this->isUpdatesEnabled(), 0 ); break;
	case 4: case 5: break;
	default: return FALSE;
    } break;
    case 50: switch( f ) {
	case 1: *v = QVariant( this->isVisible(), 0 ); break;
	case 3: case 4: case 5: break;
	default: return FALSE;
    } break;
    case 51: switch( f ) {
	case 1: *v = QVariant( this->visibleRect() ); break;
	case 3: case 4: case 5: break;
	default: return FALSE;
    } break;
    case 52: switch( f ) {
	case 0: setHidden(v->asBool()); break;
	case 1: *v = QVariant( this->isHidden(), 0 ); break;
	case 5: break;
	default: return FALSE;
    } break;
    case 53: switch( f ) {
	case 0: setShown(v->asBool()); break;
	case 1: *v = QVariant( this->isShown(), 0 ); break;
	case 5: break;
	default: return FALSE;
    } break;
    case 54: switch( f ) {
	case 1: *v = QVariant( this->isMinimized(), 0 ); break;
	case 3: case 4: case 5: break;
	default: return FALSE;
    } break;
    case 55: switch( f ) {
	case 1: *v = QVariant( this->isMaximized(), 0 ); break;
	case 3: case 4: case 5: break;
	default: return FALSE;
    } break;
    case 56: switch( f ) {
	case 1: *v = QVariant( this->isFullScreen(), 0 ); break;
	case 3: case 4: case 5: break;
	default: return FALSE;
    } break;
    case 57: switch( f ) {
	case 1: *v = QVariant( this->sizeHint() ); break;
	case 3: case 4: case 5: break;
	default: return FALSE;
    } break;
    case 58: switch( f ) {
	case 1: *v = QVariant( this->minimumSizeHint() ); break;
	case 3: case 4: case 5: break;
	default: return FALSE;
    } break;
    case 59: switch( f ) {
	case 1: *v = QVariant( this->microFocusHint() ); break;
	case 3: case 4: case 5: break;
	default: return FALSE;
    } break;
    case 60: switch( f ) {
	case 0: setAcceptDrops(v->asBool()); break;
	case 1: *v = QVariant( this->acceptDrops(), 0 ); break;
	case 3: case 4: case 5: break;
	default: return FALSE;
    } break;
    case 61: switch( f ) {
	case 0: setAutoMask(v->asBool()); break;
	case 1: *v = QVariant( this->autoMask(), 0 ); break;
	case 5: break;
	default: return FALSE;
    } break;
    case 62: switch( f ) {
	case 1: *v = QVariant( this->customWhatsThis(), 0 ); break;
	case 3: case 4: case 5: break;
	default: return FALSE;
    } break;
    case 63: switch( f ) {
	case 0: setInputMethodEnabled(v->asBool()); break;
	case 1: *v = QVariant( this->isInputMethodEnabled(), 0 ); break;
	case 5: break;
	default: return FALSE;
    } break;
    case 64: switch( f ) {
	case 0: setWindowOpacity(v->asDouble()); break;
	case 1: *v = QVariant( this->windowOpacity() ); break;
	case 4: case 5: break;
	default: return FALSE;
    } break;
    default:
	return QObject::qt_property( id, f, v );
    }
    return TRUE;
}