Package com.trolltech.qt.gui

Examples of com.trolltech.qt.gui.QGridLayout


  // Constructor
  public InsertLatexImage() {
    okPressed = false;
    setWindowTitle(tr("Insert LaTeX Formula"));
    setWindowIcon(new QIcon(iconPath+"link.png"));
    QGridLayout grid = new QGridLayout();
    QGridLayout input = new QGridLayout();
    QGridLayout button = new QGridLayout();
    setLayout(grid);
   
   
    url = new QTextEdit("");
   
    input.addWidget(new QLabel(tr("Formula")), 1,1);
    input.addWidget(url, 2, 1);
    input.setContentsMargins(10, 10,  -10, -10);
    grid.addLayout(input, 1,1);
     
    ok = new QPushButton(tr("OK"));
    ok.clicked.connect(this, "accept()");
    ok.setEnabled(false);
   
    QPushButton cancel = new QPushButton(tr("Cancel"));
    cancel.clicked.connect(this, "reject()");
    button.addWidget(ok, 1, 1);
    button.addWidget(cancel, 1,2);
    grid.addLayout(button, 3, 1);
    url.textChanged.connect(this, "validateInput()");
   
    setAttribute(Qt.WidgetAttribute.WA_DeleteOnClose);
  }
View Full Code Here


 
  // Constructor
  public SharedNotebookSyncError(String notebook) {
    okPressed = false;
    setWindowTitle(tr("Shared Notebook Synchronization Error"));
    QGridLayout grid = new QGridLayout();
    setWindowIcon(new QIcon(iconPath+"synchronize.png"));
    QVBoxLayout vLayout = new QVBoxLayout();
    setLayout(vLayout);

    QTextBrowser msg1 = new QTextBrowser();
    msg1.setText(tr("There was an error with notebook ") +notebook
        +tr("\nThe most probable reason is that the owner of the notebook has revoked your authority to view it.\n\n")
        +tr("Below are the choices available to resolve this issue."));
    vLayout.addWidget(msg1);
   
    choiceGroup = new QGroupBox(this);
    doNothing = new QRadioButton(this);
    doNothing.setChecked(true);
    doNothing.setText(tr("Do nothing and ask me later."));
    deleteNotebook = new QRadioButton(this);
    deleteNotebook.setText(tr("Permanently delete this notebook & all notes"));
    convertToLocal = new QRadioButton(this);
    convertToLocal.setText(tr("Convert this notebook to a local notebook and keep all notes"));
    convertToShared = new QRadioButton(this);
    convertToShared.setText(tr("Convert this notebook to a shared notebook and keep all notes"));
   
    QVBoxLayout optionLayout = new QVBoxLayout();
    optionLayout.addWidget(doNothing);
    optionLayout.addWidget(deleteNotebook);
//    optionLayout.addWidget(convertToLocal);
//    optionLayout.addWidget(convertToShared);
    choiceGroup.setLayout(optionLayout);
    vLayout.addWidget(choiceGroup);
   
    QGridLayout buttonGrid = new QGridLayout();
    ok = new QPushButton(tr("OK"));
    ok.clicked.connect(this, "okButtonPressed()");
    QPushButton cancel = new QPushButton(tr("Cancel"));
    cancel.clicked.connect(this, "cancelButtonPressed()");
    buttonGrid.addWidget(ok, 3, 1);
    buttonGrid.addWidget(cancel, 3,2);
    grid.addLayout(buttonGrid,3,1);
    vLayout.addLayout(grid);
  }
View Full Code Here

    useridLayout.addWidget(syncInterval);
    useridLayout.addWidget(autoLogin);
    useridLayout.addWidget(synchronizeOnClose);
    useridLayout.addWidget(synchronizeDeletedContents);
   
    QGridLayout proxyLayout = new QGridLayout();
    proxyLayout.addWidget(proxyHostLabel,1,1);
    proxyLayout.addWidget(proxyHost,1,2);
    proxyLayout.addWidget(proxyPortLabel,2,1);
    proxyLayout.addWidget(proxyPort,2,2);
    proxyLayout.addWidget(proxyUseridLabel,3,1);
    proxyLayout.addWidget(proxyUserid,3,2);
    proxyLayout.addWidget(proxyPasswordLabel,4,1);
    proxyLayout.addWidget(proxyPassword,4,2);
       
    useridGroup.setLayout(useridLayout);
    proxyGroup.setLayout(proxyLayout);
   
    // Add everything together
View Full Code Here

  public UpgradeAvailableDialog() {
    okPressed = false;
    setWindowTitle(tr("Upgrade Available"));
    setWindowIcon(new QIcon(iconPath+"nevernote.png"));
    QVBoxLayout grid = new QVBoxLayout();
    QGridLayout input = new QGridLayout();
    QHBoxLayout button = new QHBoxLayout();
    setLayout(grid);   
     
    QWebView page = new QWebView(this);
    page.setUrl(new QUrl(Global.getUpdateAnnounceUrl()));
   
    doNotRemindeMe = new QCheckBox();
    doNotRemindeMe.setText(tr("Automatically check for updates at startup"));
    input.addWidget(page,1,1);
    doNotRemindeMe.setChecked(true);
    input.addWidget(doNotRemindeMe,2,1);
   
    grid.addLayout(input);
   
    ok = new QPushButton("OK");
    ok.clicked.connect(this, "okButtonPressed()");
View Full Code Here

 
  // Constructor
  public FindDialog() {
    setWindowTitle(tr("Find"));
    setWindowIcon(new QIcon(iconPath+"search.png"));
    QGridLayout grid = new QGridLayout();
    setLayout(grid);

    text = new QLineEdit();
    wrap = new QCheckBox();
    forward = new QCheckBox();
    backward = new QCheckBox();
    caseSensitive = new QCheckBox();

    QGridLayout textGrid = new QGridLayout();
    textGrid.addWidget(new QLabel(tr("Text")), 1,1);
    textGrid.addWidget(text, 1, 2);
    grid.addLayout(textGrid, 1, 1);
   
    QGridLayout opt = new QGridLayout();
    opt.addWidget(new QLabel(tr("Case Sensitive")), 1,1);
    opt.addWidget(caseSensitive, 1, 2);
    opt.addWidget(new QLabel(tr("Forward")), 2,1);
    opt.addWidget(forward, 2, 2);
    opt.addWidget(new QLabel(tr("Backward")), 3,1);
    opt.addWidget(backward, 3, 2);
    opt.addWidget(new QLabel(tr("Wrap")), 4,1);
    opt.addWidget(wrap, 4, 2);
    opt.setContentsMargins(10, 10,  -10, -10);
    grid.addLayout(opt,2,1);
   
    forward.clicked.connect(this, "forwardClicked()");
    backward.clicked.connect(this, "backwardClicked()");
   
    QGridLayout buttonLayout = new QGridLayout();
    ok = new QPushButton(tr("OK"));
    ok.clicked.connect(this, "okButtonPressed()");
    QPushButton cancel = new QPushButton(tr("Close"));
    cancel.clicked.connect(this, "closeButtonPressed()");
    buttonLayout.addWidget(ok, 1, 1);
    buttonLayout.addWidget(cancel, 1,2);
    grid.addLayout(buttonLayout,3,1);
  }
View Full Code Here

  // Constructor
  public SavedSearchEdit() {
    okPressed = false;
    setWindowTitle(tr("Add a search"));
    setWindowIcon(new QIcon(iconPath+"search.png"));
    QGridLayout grid = new QGridLayout();
    setLayout(grid);
   
    QGridLayout textLayout = new QGridLayout();
    searchName = new QLineEdit();
    textLayout.addWidget(new QLabel(tr("Name")), 1,1);
    textLayout.addWidget(searchName, 1, 2);
    query = new QLineEdit();
    textLayout.addWidget(new QLabel(tr("String")), 2,1);
    textLayout.addWidget(query, 2, 2);
    textLayout.setContentsMargins(10, 10,-10, -10);
    grid.addLayout(textLayout, 1, 1);
   
    QGridLayout buttonLayout = new QGridLayout();
    ok = new QPushButton(tr("OK"));
    ok.clicked.connect(this, "okButtonPressed()");
    ok.setEnabled(false);
    QPushButton cancel = new QPushButton(tr("Cancel"));
    cancel.clicked.connect(this, "cancelButtonPressed()");
    searchName.textChanged.connect(this, "textChanged()");
    query.textChanged.connect(this, "textChanged()");
    buttonLayout.addWidget(ok, 1, 1);
    buttonLayout.addWidget(cancel, 1,2);
    grid.addLayout(buttonLayout,2,1);
  }
View Full Code Here

  // Constructor
  public GeoDialog() {
    okPressed = false;
    setWindowTitle(tr("Geo Location"));
    setWindowIcon(new QIcon(iconPath+"globe.png"));
    QGridLayout grid = new QGridLayout();
    setLayout(grid);
    QGridLayout passwordGrid = new QGridLayout();
    QGridLayout buttonGrid = new QGridLayout();
   
   
    longitude = new QLineEdit();
    QDoubleValidator longVal = new QDoubleValidator(-180.0,180.0,4,longitude);
    longVal.setNotation(Notation.StandardNotation);
    longitude.setValidator(longVal);
   
    latitude = new QLineEdit();
    QDoubleValidator latVal = new QDoubleValidator(-90.0,90.0,4,latitude);
    latVal.setNotation(Notation.StandardNotation);
    latitude.setValidator(latVal);
   
    altitude = new QLineEdit();
    QDoubleValidator altVal = new QDoubleValidator(-9999.0,9999.0,4,altitude);
    altVal.setNotation(Notation.StandardNotation);
    altitude.setValidator(altVal);

   
    passwordGrid.addWidget(new QLabel(tr("Longitude")), 1,1);
    passwordGrid.addWidget(longitude, 1, 2);
    passwordGrid.addWidget(new QLabel(tr("Latitude")), 2,1);
    passwordGrid.addWidget(latitude, 2, 2);
    passwordGrid.addWidget(new QLabel(tr("Altitude")), 3,1);
    passwordGrid.addWidget(altitude, 3, 2);
    passwordGrid.setContentsMargins(10, 10,  -10, -10);
    grid.addLayout(passwordGrid,1,1);
   
    ok = new QPushButton(tr("OK"));
    ok.clicked.connect(this, "okButtonPressed()");
    QPushButton cancel = new QPushButton(tr("Cancel"));
    cancel.clicked.connect(this, "cancelButtonPressed()");
    buttonGrid.addWidget(ok, 1, 1);
    buttonGrid.addWidget(cancel, 1,2);
    grid.addLayout(buttonGrid,2,1);
  }
View Full Code Here

  // Constructor
  public EnCryptDialog() {
    okPressed = false;
    setWindowTitle(tr("Encrypt Text"));
    setWindowIcon(new QIcon(iconPath+"password.png"));
    QGridLayout grid = new QGridLayout();
    QGridLayout input = new QGridLayout();
    QGridLayout msgGrid = new QGridLayout();
    QGridLayout button = new QGridLayout();
    setLayout(grid);
   
   
    hint = new QLineEdit("");
    password = new QLineEdit("");
    password.setEchoMode(QLineEdit.EchoMode.Password);
    password2 = new QLineEdit("");
    password2.setEchoMode(QLineEdit.EchoMode.Password);
   
   
    input.addWidget(new QLabel(tr("Password")), 1,1);
    input.addWidget(password, 1, 2);
    input.addWidget(new QLabel(tr("Verify")), 2,1);
    input.addWidget(password2, 2, 2);
    input.addWidget(new QLabel(tr("Hint")), 3,1);
    input.addWidget(hint, 3, 2);
    input.setContentsMargins(10, 10,  -10, -10);
    grid.addLayout(input, 1,1);
   
    error = new QLabel();
    msgGrid.addWidget(error, 1, 1);
    grid.addLayout(msgGrid, 2, 1);
   
    ok = new QPushButton(tr("OK"));
    ok.clicked.connect(this, "okButtonPressed()");
    ok.setEnabled(false);
   
    QPushButton cancel = new QPushButton(tr("Cancel"));
    cancel.clicked.connect(this, "cancelButtonPressed()");
    button.addWidget(ok, 1, 1);
    button.addWidget(cancel, 1,2);
    grid.addLayout(button, 3, 1);
   
    password.textChanged.connect(this, "validateInput()");
    password2.textChanged.connect(this, "validateInput()");
    hint.textChanged.connect(this, "validateInput()");
View Full Code Here

    alignRightLayout.addWidget(showAlignRight);
    alignRightLayout.addWidget(hideAlignRight);
    alignRightLayout.setStretch(1, 100);
    alignRightGroup.setLayout(alignRightLayout);
   
    QGridLayout mainLayout = new QGridLayout();
    mainLayout.addWidget(undoGroup, 0,0);
    mainLayout.addWidget(redoGroup, 0,1);
    mainLayout.addWidget(cutGroup, 0,2);
    mainLayout.addWidget(copyGroup, 1,0);
    mainLayout.addWidget(pasteGroup, 1,1);
    mainLayout.addWidget(boldGroup, 1,2);
    mainLayout.addWidget(italicGroup, 2,0);
    mainLayout.addWidget(underlineGroup, 2,1);
    mainLayout.addWidget(strikethroughGroup, 2,2);
    mainLayout.addWidget(hlineGroup, 3,0);
    mainLayout.addWidget(indentGroup, 3,1);
    mainLayout.addWidget(outdentGroup, 3,2);
    mainLayout.addWidget(bulletListGroup, 4,0);
    mainLayout.addWidget(numberListGroup, 4,1);
    mainLayout.addWidget(fontGroup, 5,0);
    mainLayout.addWidget(fontSizeGroup, 5,1);
    mainLayout.addWidget(fontColorGroup, 5,2);
    mainLayout.addWidget(fontHighlightGroup, 4,2);
    mainLayout.addWidget(alignLeftGroup, 6,0);
    mainLayout.addWidget(alignCenterGroup, 6,1);
    mainLayout.addWidget(alignRightGroup, 6,2);

    mainLayout.setColumnStretch(3, 100);
    mainLayout.setRowStretch(7, 100);
    setLayout(mainLayout);
  }
View Full Code Here


    // Build the window
    setWindowTitle(tr("Please Grant Nixnote Access"));
    setWindowIcon(new QIcon(iconPath+"icons/password.png"));
    grid = new QGridLayout();
    setLayout(grid);
    tempPage = new QWebView();
    authPage = new QWebView();
    grid.addWidget(authPage);
    tempPage.loadFinished.connect(this, "temporaryCredentialsReceived()");
View Full Code Here

TOP

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

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.