Package com.trolltech.qt.gui

Examples of com.trolltech.qt.gui.QComboBox


   
        filterPatternLineEdit = new QLineEdit();
        filterPatternLabel = new QLabel(tr("&Filter pattern:"));
        filterPatternLabel.setBuddy(filterPatternLineEdit);

        filterSyntaxComboBox = new QComboBox();
        filterSyntaxComboBox.addItem(tr("Regular expression"),
                                     QRegExp.PatternSyntax.RegExp);
        filterSyntaxComboBox.addItem(tr("Wildcard"),
                                     QRegExp.PatternSyntax.Wildcard);
        filterSyntaxComboBox.addItem(tr("Fixed string"),
View Full Code Here


    edit_id.setText("Vehicle" + new Random().nextInt());
    gridLayout.addWidget(idLabel, 1, 0, 1, 1, AlignmentFlag.AlignLeft);
    gridLayout.addWidget(edit_id, 1, 1, 1, 1, AlignmentFlag.AlignRight);

    QLabel routeLabel = new QLabel("Route: ");
    routeWidget = new QComboBox();
    for (SumoRoute r : availableRoutes)
      routeWidget.addItem(r.getId());

    QLabel vehicleTypeLabel = new QLabel("Vehicle Type:");
    vehicleTypeCombo = new QComboBox();
    for (SumoVehicleType vt : SumoManager.getInstance().getVehicleTypes())
      vehicleTypeCombo.addItem(vt.getId());
   
    gridLayout.addWidget(routeLabel, 2, 0, 1, 1, AlignmentFlag.AlignLeft);
    gridLayout.addWidget(routeWidget, 2, 1, 1, 1, AlignmentFlag.AlignRight);
View Full Code Here

    fromEdgeSelectButton.pressed.connect(this, "onFromNodeSelect()");
    toEdgeEdit = new QLineEdit();
    toEdgeEdit.setEnabled(false);
    toEdgeSelectButton = new QPushButton("Select");
    toEdgeSelectButton.pressed.connect(this, "onToNodeSelect()");
    typeCombo = new QComboBox();
    SumoManager sm = SumoManager.getInstance();
    List<SumoVehicleType> vTypes = sm.getVehicleTypes();
    for (SumoVehicleType v : vTypes) {
      typeCombo.addItem(v.getId());
    }
View Full Code Here

    titleLabel = new QLineEdit();
    evernoteLinkClicked = new Signal2<String,String>();
    titleLabel.setMaxLength(Constants.EDAM_NOTE_TITLE_LEN_MAX);
    urlText = new QLineEdit();
    authorText = new QLineEdit();
    geoBox = new QComboBox();
    urlLabel = new QPushButton();
    urlLabel.clicked.connect(this, "sourceUrlClicked()");
    authorLabel = new QLabel();
    conn = c;
   
    focusLost = new Signal0();

    tagEdit = new TagLineEdit(allTags);
    tagLabel = new QLabel(tr("Tags:"));
    tagEdit.focusLost.connect(this, "modifyTagsTyping()");

    createdCalendarWidget = new QCalendarWidget();
    createdDate = new QDateEdit();
    createdDate.setDisplayFormat(Global.getDateFormat());
    createdDate.setCalendarPopup(true);
    createdDate.setCalendarWidget(createdCalendarWidget);
    createdTime = new QTimeEdit();
    createdDate.dateChanged.connect(this, "createdChanged()");
    createdTime.timeChanged.connect(this, "createdChanged()");

    alteredCalendarWidget = new QCalendarWidget();
    alteredDate = new QDateEdit();
    alteredDate.setDisplayFormat(Global.getDateFormat());
    alteredDate.setCalendarPopup(true);
    alteredDate.setCalendarWidget(alteredCalendarWidget);
    alteredTime = new QTimeEdit();
    alteredLabel = new QLabel(tr("Altered:"));
    alteredDate.dateChanged.connect(this, "alteredChanged()");
    alteredTime.timeChanged.connect(this, "alteredChanged()");

    subjectCalendarWidget = new QCalendarWidget();
    subjectDate = new QDateEdit();
    subjectDate.setDisplayFormat(Global.getDateFormat());
    subjectDate.setCalendarPopup(true);
    subjectDate.setCalendarWidget(subjectCalendarWidget);
    subjectTime = new QTimeEdit();
    subjectLabel = new QLabel(tr("Subject Date:"));
    subjectDate.dateChanged.connect(this, "subjectDateTimeChanged()");
    subjectTime.timeChanged.connect(this, "subjectDateTimeChanged()");
    authorText.textChanged.connect(this, "authorChanged()");
    urlText.textChanged.connect(this, "sourceUrlChanged()");

    notebookBox = new QComboBox();
    notebookLabel = new QLabel(tr("Notebook"));
    createdLabel = new QLabel(tr("Created:"));
    // selectedText = new String();

    urlLabel.setVisible(false);
    urlText.setVisible(false);
    authorLabel.setVisible(false);
   
    geoBox.setVisible(false);
    geoBox.addItem(new QIcon(iconPath+"globe.png"), "");
    geoBox.addItem(new String(tr("Set")));
    geoBox.addItem(new String(tr("Clear")));
    geoBox.addItem(new String(tr("View On Map")));
    geoBox.activated.connect(this, "geoBoxChanged()");
   
    authorText.setVisible(false);
    createdDate.setVisible(false);
    alteredLabel.setVisible(false);
    //notebookBox.setVisible(false);
    notebookLabel.setVisible(false);
    createdLabel.setVisible(false);
    createdTime.setVisible(false);
    alteredDate.setVisible(false);
    alteredTime.setVisible(false);
    subjectLabel.setVisible(false);
    subjectDate.setVisible(false);
    subjectTime.setVisible(false);
    extendedOn = false;
    buttonsVisible = true;
    setAcceptDrops(true);

    browser = new ContentView(this);
       
    browser.page().setLinkDelegationPolicy(
        QWebPage.LinkDelegationPolicy.DelegateAllLinks);
    browser.linkClicked.connect(this, "linkClicked(QUrl)");
    currentHyperlink = "";
   
    //Setup the source editor
    sourceEdit = new QTextEdit(this);
    sourceEdit.setVisible(false);
    sourceEdit.setTabChangesFocus(true);
    sourceEdit.setLineWrapMode(LineWrapMode.NoWrap);
    QFont font = new QFont();
    font.setFamily("Courier");
    font.setFixedPitch(true);
    font.setPointSize(10);
    sourceEdit.setFont(font);
    syntaxHighlighter = new Highlighter(sourceEdit.document());
    sourceEdit.textChanged.connect(this, "sourceEdited()");

    QVBoxLayout v = new QVBoxLayout();
    QFormLayout notebookLayout = new QFormLayout();
    QGridLayout dateLayout = new QGridLayout();
    titleLabel.setReadOnly(false);
    titleLabel.editingFinished.connect(this, "titleEdited()");
    browser.page().contentsChanged.connect(this, "contentChanged()");
    browser.page().selectionChanged.connect(this, "selectionChanged()");
    browser.page().mainFrame().javaScriptWindowObjectCleared.connect(this,
        "exposeToJavascript()");

    notebookBox.activated.connect(this, "notebookChanged()");
    resourceSignal = new NoteResourceSignal();
   
    QHBoxLayout tagLayout = new QHBoxLayout();
    v.addWidget(titleLabel, 0);
    notebookLayout.addRow(notebookLabel, notebookBox);
    tagLayout.addLayout(notebookLayout, 0);
    tagLayout.stretch(4);
    tagLayout.addWidget(tagLabel, 0);
    tagLayout.addWidget(tagEdit, 1);
    v.addLayout(tagLayout);

    QHBoxLayout urlLayout = new QHBoxLayout();
    urlLayout.addWidget(urlLabel, 0);
    urlLayout.addWidget(urlText, 0);
    v.addLayout(urlLayout);

    QHBoxLayout authorLayout = new QHBoxLayout();
    authorLayout.addWidget(authorLabel, 0);
    authorLayout.addWidget(authorText, 0);
    authorLayout.addWidget(geoBox);
    v.addLayout(authorLayout);

    dateLayout.addWidget(createdLabel, 0, 0);
    dateLayout.addWidget(createdDate, 0, 1);
    dateLayout.addWidget(createdTime, 0, 2);
    dateLayout.setColumnStretch(9, 100);
    dateLayout.addWidget(alteredLabel, 0, 3);
    dateLayout.addWidget(alteredDate, 0, 4);
    dateLayout.addWidget(alteredTime, 0, 5);
    dateLayout.addWidget(subjectLabel, 0, 6);
    dateLayout.addWidget(subjectDate, 0, 7);
    dateLayout.addWidget(subjectTime, 0, 8);
    v.addLayout(dateLayout, 0);

    undoButton = newEditorButton("undo", tr("Undo Change"));
    redoButton = newEditorButton("redo", tr("Redo Change"));
    cutButton = newEditorButton("cut", tr("Cut"));
    copyButton = newEditorButton("copy", tr("Copy"));
    pasteButton = newEditorButton("paste", tr("Paste"));
    boldButton = newEditorButton("bold", tr("Bold"));
    underlineButton = newEditorButton("underline", tr("Underline"));
    italicButton = newEditorButton("italic", tr("Italic"));

    rightAlignButton = newEditorButton("justifyRight", tr("Right Align"));
    leftAlignButton = newEditorButton("justifyLeft", tr("Left Align"));
    centerAlignButton = newEditorButton("justifyCenter", tr("Center Align"));

    strikethroughButton = newEditorButton("strikethrough", tr("Strikethrough"));
    hlineButton = newEditorButton("hline", tr("Insert Horizontal Line"));
    indentButton = newEditorButton("indent", tr("Shift Right"));
    outdentButton = newEditorButton("outdent", tr("Shift Left"));
    bulletListButton = newEditorButton("bulletList", tr("Bullet List"));
    numberListButton = newEditorButton("numberList", tr("Number List"));
    spellCheckButton = newEditorButton("spellCheck", tr("Spell Check"));
    todoButton = newEditorButton("todo", tr("To-do"));

   
    buttonLayout = new EditorButtonBar();
    v.addWidget(buttonLayout);
   
    undoAction = buttonLayout.addWidget(undoButton);
    buttonLayout.toggleUndoVisible.triggered.connect(this, "toggleUndoVisible(Boolean)");
    redoAction = buttonLayout.addWidget(redoButton);
    buttonLayout.toggleRedoVisible.triggered.connect(this, "toggleRedoVisible(Boolean)");
   
    buttonLayout.addWidget(newSeparator());
    cutAction = buttonLayout.addWidget(cutButton);
    buttonLayout.toggleCutVisible.triggered.connect(this, "toggleCutVisible(Boolean)");
    copyAction = buttonLayout.addWidget(copyButton);
    buttonLayout.toggleCopyVisible.triggered.connect(this, "toggleCopyVisible(Boolean)");
    pasteAction = buttonLayout.addWidget(pasteButton);
    buttonLayout.togglePasteVisible.triggered.connect(this, "togglePasteVisible(Boolean)");

    buttonLayout.addWidget(newSeparator());
    boldAction = buttonLayout.addWidget(boldButton);
    buttonLayout.toggleBoldVisible.triggered.connect(this, "toggleBoldVisible(Boolean)");
    italicAction = buttonLayout.addWidget(italicButton);
    buttonLayout.toggleItalicVisible.triggered.connect(this, "toggleItalicVisible(Boolean)");
    underlineAction = buttonLayout.addWidget(underlineButton);
    buttonLayout.toggleUnderlineVisible.triggered.connect(this, "toggleUnderlineVisible(Boolean)");
    strikethroughAction = buttonLayout.addWidget(strikethroughButton);
    buttonLayout.toggleStrikethroughVisible.triggered.connect(this, "toggleStrikethroughVisible(Boolean)");

   
    buttonLayout.addWidget(newSeparator());
    leftAlignAction = buttonLayout.addWidget(leftAlignButton);
    buttonLayout.toggleLeftAlignVisible.triggered.connect(this, "toggleLeftAlignVisible(Boolean)");
    centerAlignAction = buttonLayout.addWidget(centerAlignButton);
    buttonLayout.toggleCenterAlignVisible.triggered.connect(this, "toggleCenterAlignVisible(Boolean)");
    rightAlignAction = buttonLayout.addWidget(rightAlignButton);
    buttonLayout.toggleRightAlignVisible.triggered.connect(this, "toggleRightAlignVisible(Boolean)");

    buttonLayout.addWidget(newSeparator());
    hlineAction = buttonLayout.addWidget(hlineButton);
    buttonLayout.toggleHLineVisible.triggered.connect(this, "toggleHLineVisible(Boolean)");

    indentAction = buttonLayout.addWidget(indentButton);
    buttonLayout.toggleIndentVisible.triggered.connect(this, "toggleIndentVisible(Boolean)");
    outdentAction = buttonLayout.addWidget(outdentButton);
    buttonLayout.toggleOutdentVisible.triggered.connect(this, "toggleOutdentVisible(Boolean)");
    bulletListAction = buttonLayout.addWidget(bulletListButton);
    buttonLayout.toggleBulletListVisible.triggered.connect(this, "toggleBulletListVisible(Boolean)");
    numberListAction = buttonLayout.addWidget(numberListButton);
    buttonLayout.toggleNumberListVisible.triggered.connect(this, "toggleNumberListVisible(Boolean)");

    // Setup the font & font size combo boxes
    buttonLayout.addWidget(newSeparator());
    fontList = new QComboBox();
    fontSize = new QComboBox();
    fontList.setToolTip("Font");
    fontSize.setToolTip("Font Size");
    fontList.activated.connect(this, "fontChanged(String)");
    fontSize.activated.connect(this, "fontSizeChanged(String)");
    fontListAction = buttonLayout.addWidget(fontList);
View Full Code Here

        tagTree = new TagTreeWidget(conn);
        savedSearchTree = new SavedSearchTreeWidget();
        trashTree = new TrashTreeWidget();
        noteTableView = new TableView(logger, listManager);       
       
        searchField = new QComboBox();
        searchField.setObjectName("searchField");
        //setStyleSheet("QComboBox#searchField { background-color: yellow }");
        searchField.setEditable(true);
      searchField.activatedIndex.connect(this, "searchFieldChanged()");
      searchField.setDuplicatesEnabled(false);
View Full Code Here

   
    // Style sheet formats
    List<String> styles = QStyleFactory.keys();
    QGroupBox styleGroup = new QGroupBox(tr("GUI Style"));
    styleFormat = new QComboBox();       
    styleFormat.addItems(styles);
    styleFormat.activated.connect(this, "styleSelected(String)");
   
    standardPalette = new QCheckBox();
    standardPalette.setText(tr("Use standard palette"));
    standardPalette.clicked.connect(this, "standardPaletteChanged()");

    QFormLayout styleLayout = new QFormLayout();
    styleLayout.addWidget(styleFormat);
    styleLayout.addWidget(standardPalette);
   
    styleGroup.setLayout(styleLayout);

    QGroupBox tagBehaviorGroup = new QGroupBox(tr("Tag Behavior"));
    tagBehavior = new QComboBox();
    tagBehavior.addItem(tr("Do nothing"),"DoNothing");
    tagBehavior.addItem(tr("Count tags & do not hide inactive"),"NoHideInactiveCount");
    tagBehavior.addItem(tr("Count tags & hide inactive"),"HideInactiveCount");
    tagBehavior.addItem(tr("Color active tags"),"ColorActive");
   
    QFormLayout tagLayout = new QFormLayout();
    tagLayout.addWidget(tagBehavior);
    tagBehaviorGroup.setLayout(tagLayout);
   
   
   
    // Date/Time settings
    QGroupBox datetimeGroup = new QGroupBox(tr("Date/Time Format"));
    dateFormat = new QComboBox();       
    for (int i=0; i<dformats.size(); i++) {
      dateFormat.addItem(tr(dformats.get(i)));
    }
   
    timeFormat = new QComboBox();   
    for (int i=0; i<tformats.size(); i++) {
      timeFormat.addItem(tr(tformats.get(i)));
    }

    QFormLayout formatLayout = new QFormLayout();
    formatLayout.addWidget(dateFormat);
    formatLayout.addWidget(timeFormat);
    datetimeGroup.setLayout(formatLayout);
   
    mimicEvernote = new QCheckBox(tr("Mimic Evernote Selection Behavior (Requires Restart)"));
    showSplashScreen = new QCheckBox(tr("Show Splash Screen on Startup"));
    showTrayIcon = new QCheckBox(tr("Minimize To Tray"));
    minimizeOnClose = new QCheckBox(tr("Close To Tray"));
    if (!QSystemTrayIcon.isSystemTrayAvailable()) {
      showTrayIcon.setEnabled(false);
      minimizeOnClose.setEnabled(false);
    }
    verifyDelete = new QCheckBox(tr("Verify Deletes"));
    startMinimized = new QCheckBox(tr("Start Minimized"));
    pdfPreview = new QCheckBox(tr("Display PDF Documents Inline"));
    checkForUpdates = new QCheckBox(tr("Check For Updates At Startup"));
    newNoteWithTags = new QCheckBox(tr("Create New Notes With Selected Tags"));
    anyTagSelection = new QCheckBox(tr("Display Notes Matching Any Selected Tags"));
    includeTagChildren = new QCheckBox(tr("Include Children In Tag Selection"));
    displayRightToLeft = new QCheckBox(tr("Display Notes Right-To-Left"));
   
    QHBoxLayout startupNotebookLayout = new QHBoxLayout();
    startupNotebook = new QComboBox();
    startupNotebook.addItem(tr("All Notebooks"), "AllNotebooks");
    startupNotebook.addItem(tr("Default Notebook"), "DefaultNotebook");
    startupNotebookLayout.addWidget(new QLabel(tr("Startup Notebook")));
    startupNotebookLayout.addWidget(startupNotebook);
    startupNotebookLayout.addStretch();
View Full Code Here

    if (record != null)
      directory.setText(record.folder);
    else
      directory.setText(System.getProperty("user.home"));
   
    keep = new QComboBox();
    keep.addItem(tr("Keep"),"Keep");
    keep.addItem(tr("Delete"),"Delete");
    if (record != null) {
      if (record.keep)
        keep.setCurrentIndex(0);
      else
        keep.setCurrentIndex(1);
    }
   
    books = new QComboBox();
    for (int i=0; i<notebooks.size(); i++) {
      books.addItem(notebooks.get(i).getName());
      if (record != null) {
        if (record.notebook.equals(notebooks.get(i).getName()))
          books.setCurrentIndex(i);
View Full Code Here

    overrideFonts.clicked.connect(this, "toggleFontOverride(Boolean)");
    fontLayout.addWidget(overrideFonts,1,2);
   
   
    // Fonts
    fontList = new QComboBox();       
    fontList.activated.connect(this, "fontSelected(String)");
    fontLayout.addWidget(new QLabel(tr("Font")),2,1);
    fontLayout.addWidget(fontList,2,2);
   
    // Font Sizes
    fontSizeList = new QComboBox();       
    fontLayout.addWidget(fontSizeList,3,2);
    fontSizeList.activated.connect(this, "fontSizeSelected(String)");
    fontLayout.addWidget(new QLabel(tr("Size")),3,1);
    fontGroup.setLayout(fontLayout);
    fontLayout.setColumnStretch(2, 100);
View Full Code Here

  public ConfigConnectionPage(QWidget parent) {
   
    // Userid settings
    QGroupBox useridGroup = new QGroupBox(tr("Connection"));
   
    syncInterval = new QComboBox(this);
    syncTimes = new SyncTimes();
    syncInterval.addItems(syncTimes.stringValues());
   
    autoLogin = new QCheckBox("Automatic Connect");
    synchronizeDeletedContents = new QCheckBox("Synchronze Deleted Note Content");
View Full Code Here

    setWindowTitle(tr("Application Logs"));
    logs = l;
    setWindowIcon(new QIcon(iconPath+"notebook-green.png"));
    QVBoxLayout main = new QVBoxLayout();
    setLayout(main);
    fileCombo = new QComboBox(this);
   
    QHBoxLayout comboLayout = new QHBoxLayout();
    comboLayout.addWidget(new QLabel(tr("Log File:")));
    comboLayout.addWidget(fileCombo);
    comboLayout.addStretch(100);
View Full Code Here

TOP

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

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.