Пример #1
0
    public ConfigurationPage(QWidget parent) {
      super(parent);
      QGroupBox configGroup = new QGroupBox(tr("Server configuration"));

      QLabel serverLabel = new QLabel(tr("Server:"));
      QComboBox serverCombo = new QComboBox();
      serverCombo.addItem(tr("Qt Software (Australia)"));
      serverCombo.addItem(tr("Qt Software (Germany)"));
      serverCombo.addItem(tr("Qt Software (Norway)"));
      serverCombo.addItem(tr("Qt Software (People's Republic of China)"));
      serverCombo.addItem(tr("Qt Software (USA)"));

      QHBoxLayout serverLayout = new QHBoxLayout();
      serverLayout.addWidget(serverLabel);
      serverLayout.addWidget(serverCombo);

      QVBoxLayout configLayout = new QVBoxLayout();
      configLayout.addLayout(serverLayout);
      configGroup.setLayout(configLayout);

      QVBoxLayout mainLayout = new QVBoxLayout();
      mainLayout.addWidget(configGroup);
      mainLayout.addStretch(1);
      setLayout(mainLayout);
    }
Пример #2
0
  public void setupUi(QWidget AnalisisForm) {
    AnalisisForm.setObjectName("AnalisisForm");
    AnalisisForm.resize(new QSize(568, 351).expandedTo(AnalisisForm.minimumSizeHint()));
    gridLayout_3 = new QGridLayout(AnalisisForm);
    gridLayout_3.setObjectName("gridLayout_3");
    horizontalLayout = new QHBoxLayout();
    horizontalLayout.setObjectName("horizontalLayout");
    tableWidget = new QTableWidget(AnalisisForm);
    tableWidget.setObjectName("tableWidget");

    horizontalLayout.addWidget(tableWidget);

    verticalLayout_2 = new QVBoxLayout();
    verticalLayout_2.setObjectName("verticalLayout_2");
    groupBox = new QGroupBox(AnalisisForm);
    groupBox.setObjectName("groupBox");
    groupBox.setMinimumSize(new QSize(0, 0));
    gridLayout = new QGridLayout(groupBox);
    gridLayout.setObjectName("gridLayout");
    verticalLayout = new QVBoxLayout();
    verticalLayout.setObjectName("verticalLayout");
    pasosButton = new QPushButton(groupBox);
    pasosButton.setObjectName("pasosButton");

    verticalLayout.addWidget(pasosButton);

    completoButton = new QPushButton(groupBox);
    completoButton.setObjectName("completoButton");

    verticalLayout.addWidget(completoButton);

    gridLayout.addLayout(verticalLayout, 0, 0, 1, 1);

    verticalLayout_2.addWidget(groupBox);

    groupBox_2 = new QGroupBox(AnalisisForm);
    groupBox_2.setObjectName("groupBox_2");
    groupBox_2.setMaximumSize(new QSize(16777215, 80));
    gridLayout_2 = new QGridLayout(groupBox_2);
    gridLayout_2.setObjectName("gridLayout_2");
    cerrarButton = new QPushButton(groupBox_2);
    cerrarButton.setObjectName("cerrarButton");

    gridLayout_2.addWidget(cerrarButton, 0, 0, 1, 1);

    verticalLayout_2.addWidget(groupBox_2);

    horizontalLayout.addLayout(verticalLayout_2);

    gridLayout_3.addLayout(horizontalLayout, 0, 0, 1, 1);

    retranslateUi(AnalisisForm);
    cerrarButton.clicked.connect(AnalisisForm, "close()");

    AnalisisForm.connectSlotsByName();
  } // setupUi
Пример #3
0
  private void createIconSizeGroupBox() {
    iconSizeGroupBox = new QGroupBox(tr("Icon Size"));

    smallRadioButton = new QRadioButton();
    largeRadioButton = new QRadioButton();
    toolBarRadioButton = new QRadioButton();
    listViewRadioButton = new QRadioButton();
    iconViewRadioButton = new QRadioButton();
    tabBarRadioButton = new QRadioButton();
    otherRadioButton = new QRadioButton(tr("Other:"));

    otherSpinBox = new IconSizeSpinBox();
    otherSpinBox.setRange(8, 128);
    otherSpinBox.setValue(64);

    smallRadioButton.toggled.connect(this, "changeSize(boolean)");
    largeRadioButton.toggled.connect(this, "changeSize(boolean)");
    toolBarRadioButton.toggled.connect(this, "changeSize(boolean)");
    listViewRadioButton.toggled.connect(this, "changeSize(boolean)");
    iconViewRadioButton.toggled.connect(this, "changeSize(boolean)");
    tabBarRadioButton.toggled.connect(this, "changeSize(boolean)");
    otherRadioButton.toggled.connect(this, "changeSize(boolean)");
    otherSpinBox.valueChanged.connect(this, "changeSize(int)");

    QHBoxLayout otherSizeLayout = new QHBoxLayout();
    otherSizeLayout.addWidget(otherRadioButton);
    otherSizeLayout.addWidget(otherSpinBox);
    otherSizeLayout.addStretch();

    QGridLayout layout = new QGridLayout();
    layout.addWidget(smallRadioButton, 0, 0);
    layout.addWidget(largeRadioButton, 1, 0);
    layout.addWidget(toolBarRadioButton, 2, 0);
    layout.addWidget(listViewRadioButton, 0, 1);
    layout.addWidget(iconViewRadioButton, 1, 1);
    layout.addWidget(tabBarRadioButton, 2, 1);
    layout.addLayout(otherSizeLayout, 3, 0, 1, 2);
    layout.setRowStretch(4, 1);
    iconSizeGroupBox.setLayout(layout);
  }
Пример #4
0
  public ConfigDialog(QWidget parent) {
    super(parent);
    contentsWidget = new QListWidget(this);
    contentsWidget.setViewMode(QListView.ViewMode.IconMode);
    contentsWidget.setIconSize(new QSize(96, 84));
    contentsWidget.setMovement(QListView.Movement.Static);
    contentsWidget.setMaximumWidth(128);
    contentsWidget.setSpacing(12);

    pagesWidget = new QStackedWidget(this);
    pagesWidget.addWidget(new ConfigurationPage(this));
    pagesWidget.addWidget(new UpdatePage(this));
    pagesWidget.addWidget(new QueryPage(this));

    QPushButton closeButton = new QPushButton(tr("Close"));

    createIcons();
    contentsWidget.setCurrentRow(0);

    closeButton.clicked.connect(this, "close()");

    QHBoxLayout horizontalLayout = new QHBoxLayout();
    horizontalLayout.addWidget(contentsWidget);
    horizontalLayout.addWidget(pagesWidget, 1);

    QHBoxLayout buttonsLayout = new QHBoxLayout();
    buttonsLayout.addStretch(1);
    buttonsLayout.addWidget(closeButton);

    QVBoxLayout mainLayout = new QVBoxLayout();
    mainLayout.addLayout(horizontalLayout);
    mainLayout.addStretch(1);
    mainLayout.addSpacing(12);
    mainLayout.addLayout(buttonsLayout);
    setLayout(mainLayout);

    setWindowTitle(tr("Config Dialog"));
    setWindowIcon(new QIcon("classpath:com/trolltech/images/qt-logo.png"));
  }
Пример #5
0
  public dragwidget(QWidget parent) {
    super(parent);

    setFrameStyle(QFrame.Shape.StyledPanel.value() | QFrame.Shadow.Sunken.value());
    dragDropLabel = new QLabel("", this);
    dragDropLabel.setAlignment(new Qt.Alignment(Qt.AlignmentFlag.AlignHCenter));

    QHBoxLayout layout = new QHBoxLayout(this);
    layout.addStretch(0);
    layout.addWidget(dragDropLabel);
    layout.addStretch(0);

    setAcceptDrops(true);
  }