Package com.trolltech.qt.gui

Examples of com.trolltech.qt.gui.QBoxLayout


    waySelection.toggled.connect(this,"waySelectionToggled(boolean)");
    QRadioButton edgeSelection = new QRadioButton("Edge");
    edgeSelection.toggled.connect(this,"edgeSelectionToggled(boolean)");
    bGroup.addButton(waySelection);
    bGroup.addButton(edgeSelection);
    QBoxLayout selBox = new QBoxLayout(Direction.LeftToRight);
    selBox.addWidget(waySelection);
    selBox.addWidget(edgeSelection);
   
    edgesWidget = new QListWidget();
   
    QPushButton finishButton = new QPushButton("Finish");
    QPushButton selectButton = new QPushButton("Select");
    QPushButton cancelButton = new QPushButton("Cancel");
    finishButton.setDefault(true);
    finishButton.clicked.connect(this, "onButtonFinished()");
    selectButton.clicked.connect(this, "onButtonSelect()");
    cancelButton.clicked.connect(this, "onCancelButton()");
    QBoxLayout okCancelLayout = new QBoxLayout(Direction.RightToLeft);
    okCancelLayout.addWidget(cancelButton, 0, AlignmentFlag.AlignRight);
    okCancelLayout.addWidget(finishButton, 1, AlignmentFlag.AlignRight);
    okCancelLayout.addWidget(selectButton, 2, AlignmentFlag.AlignRight);
   
    QBoxLayout bLayout = new QBoxLayout(Direction.TopToBottom);
    bLayout.addWidget(label);
    bLayout.addWidget(errorLabel);
    bLayout.addWidget(lSelectionTyp);
    bLayout.addItem(selBox);
    bLayout.addWidget(routeId);
    bLayout.addWidget(edgesWidget);
    bLayout.addItem(okCancelLayout);
   
    this.setLayout(bLayout);
  }
View Full Code Here


    QTabWidget tabWidget = new QTabWidget();
    QTabBar routeBar = new QTabBar();
    routeBar.setTabText(0, "Test");

    QBoxLayout layout = new QBoxLayout(Direction.TopToBottom);

    routeGenerationWidget = createRouteWidget();
    tripGenerationWidget = createTripWidget();

    tabWidget.addTab(tripGenerationWidget, "Trips");
    tabWidget.addTab(routeGenerationWidget, "Routes");

    QPushButton okButton = new QPushButton("OK");
    okButton.pressed.connect(this, "onDialogOk()");

    layout.addWidget(selectLabel);
   
    layout.addWidget(tabWidget);
    layout.addWidget(okButton, 3, AlignmentFlag.AlignRight);

    this.setLayout(layout);

    initWidgets();
  }
View Full Code Here

    editButton.clicked.connect(this, "onEditTrip()");
    tripWidget.itemDoubleClicked.connect(this, "onEditTrip(QListWidgetItem)");
    QPushButton removeButton = new QPushButton("Remove");
    removeButton.clicked.connect(this, "onRemoveTrip()");
    tripWidget.onRemoveItem.connect(this, "onRemoveTrip(List)");
    QBoxLayout routeButtonBox = new QBoxLayout(Direction.TopToBottom);
    routeButtonBox.addWidget(generateButton);
    routeButtonBox.addWidget(editButton);
    routeButtonBox.addWidget(removeButton);
    gridLayout.addItem(routeButtonBox, 1, 1, 1, 1, AlignmentFlag.AlignTop);
   
    resultWidget.setLayout(gridLayout);
    return resultWidget;
  }
View Full Code Here

    QPushButton generateButton = new QPushButton("Record...");
    generateButton.clicked.connect(this, "onGenerateRouteButton()");
    QPushButton removeButton = new QPushButton("Remove");
    removeButton.clicked.connect(this, "onRemoveRoute()");
    routeWidget.onRemoveItem.connect(this, "onRemoveRoute(List)");
    QBoxLayout routeButtonBox = new QBoxLayout(Direction.TopToBottom);
    routeButtonBox.addWidget(generateButton);
    routeButtonBox.addWidget(removeButton);
    gridLayout.addItem(routeButtonBox, 1, 1, 1, 1, AlignmentFlag.AlignTop);

    gridLayout.addWidget(new QLabel("Add vehicles driving the routes: "),
        2, 0, 1, 2);

    vehicleWidget = new ListWidget(this);
    gridLayout.addWidget(vehicleWidget, 3, 0);

    QPushButton addVehicleButton = new QPushButton("Add Vehicle...");
    QPushButton deleteVehicleButton = new QPushButton("Remove");
    deleteVehicleButton.clicked.connect(this, "onRemoveVehicle()");
    vehicleWidget.onRemoveItem.connect(this, "onRemoveVehicle(List)");
    addVehicleButton.clicked.connect(this, "onAddVehicleButton()");
    QBoxLayout vehicleButtonBox = new QBoxLayout(Direction.TopToBottom);
    vehicleButtonBox.addWidget(addVehicleButton);
    vehicleButtonBox.addWidget(deleteVehicleButton);
    gridLayout
        .addItem(vehicleButtonBox, 3, 1, 1, 1, AlignmentFlag.AlignTop);

    gridLayout.setColumnStretch(0, 5);
    gridLayout.setColumnStretch(1, 1);
View Full Code Here

    QPushButton bOk = new QPushButton("OK");
    bOk.pressed.connect(this, "onOkButton()");
    bOk.setDefault(true);
    QPushButton bCancel = new QPushButton("Cancel");
    bCancel.pressed.connect(this, "onCancelButton()");
    QBoxLayout okCancelLayout = new QBoxLayout(Direction.RightToLeft);
    okCancelLayout.addWidget(bCancel, 0, AlignmentFlag.AlignRight);
    okCancelLayout.addWidget(bOk, 1, AlignmentFlag.AlignRight);

    resultLayout.addWidget(tripLabel, 0, 0, 1, 3);
    resultLayout.addWidget(idLabel, 1, 0, 1, 1);
    resultLayout.addWidget(depTimeLabel, 2, 0, 1, 1);
    resultLayout.addWidget(fromNodeLabel, 3, 0, 1, 1);
View Full Code Here

TOP

Related Classes of com.trolltech.qt.gui.QBoxLayout

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.