Package com.trolltech.qt.gui

Examples of com.trolltech.qt.gui.QListWidgetItem


          found = true;
          j=archive.size();
        }
      }
      if (!found) {
        QListWidgetItem item = new QListWidgetItem(allBooks.get(i).getName());
        item.setSelected(false);
        syncBookList.addItem(item);
      }
    }
   
    setWindowTitle(tr("Open Notebooks"));
    for (int i=0; i<archive.size(); i++) {
      QListWidgetItem item = new QListWidgetItem(archive.get(i).getName());
      item.setSelected(false);
      ignoreBookList.addItem(item);
    }
   
    for (int i=0; i<allTags.size(); i++) {
      boolean found = false;
      for (int j=0; j<ignoreTags.size(); j++) {
        if (ignoreTags.get(j).getName().equalsIgnoreCase(allTags.get(i).getName())) {
          found = true;
          j=ignoreTags.size();
        }
      }
      if (!found) {
        QListWidgetItem item = new QListWidgetItem(allTags.get(i).getName());
        item.setSelected(false);
        syncTagList.addItem(item);
      }
    }
    for (int i=0; i<ignoreTags.size(); i++) {
      QListWidgetItem item = new QListWidgetItem(ignoreTags.get(i).getName());
      item.setSelected(false);
      ignoreTagList.addItem(item);
    }
   
    for (int i=0; i<allLinkedNotebooks.size(); i++) {
      boolean found = false;
      for (int j=0; j<ignoreLinkedNotebooks.size(); j++) {
        if (ignoreLinkedNotebooks.get(j).getShareName().equalsIgnoreCase(allLinkedNotebooks.get(i).getShareName())) {
          found = true;
          j=ignoreLinkedNotebooks.size();
        }
      }
      if (!found) {
        QListWidgetItem item = new QListWidgetItem(allLinkedNotebooks.get(i).getShareName());
        item.setSelected(false);
        syncLinkedNotebookList.addItem(item);
      }
    }
    for (int i=0; i<ignoreLinkedNotebooks.size(); i++) {
      QListWidgetItem item = new QListWidgetItem(ignoreLinkedNotebooks.get(i).getShareName());
      item.setSelected(false);
      ignoreLinkedNotebookList.addItem(item);
    }


    syncBookList.itemSelectionChanged.connect(this, "itemSelected()");
View Full Code Here


  // Create icons used for navigating the page
  public void createIcons() {
    String iconPath = new String("classpath:cx/fbn/nevernote/icons/");

   
    QListWidgetItem formatsButton = new QListWidgetItem(contentsWidget);
    formatsButton.setText(tr("Appearance"));
    formatsButton.setTextAlignment(AlignmentFlag.AlignHCenter.value());
    formatsButton.setFlags(ItemFlag.ItemIsSelectable, ItemFlag.ItemIsEnabled);
    formatsButton.setIcon(new QIcon(iconPath+"appearance.jpg"));
   
    QListWidgetItem fontButton = new QListWidgetItem(contentsWidget);
    fontButton.setText(tr("Fonts"));
    fontButton.setTextAlignment(AlignmentFlag.AlignHCenter.value());
    fontButton.setFlags(ItemFlag.ItemIsSelectable, ItemFlag.ItemIsEnabled);
    fontButton.setIcon(new QIcon(iconPath+"fontConfig.png"));
   
    QListWidgetItem indexButton = new QListWidgetItem(contentsWidget);
    indexButton.setText(tr("Indexing"));
    indexButton.setTextAlignment(AlignmentFlag.AlignHCenter.value());
    indexButton.setFlags(ItemFlag.ItemIsSelectable, ItemFlag.ItemIsEnabled);
    indexButton.setIcon(new QIcon(iconPath+"search_config.jpg"));

    QListWidgetItem spellButton = new QListWidgetItem(contentsWidget);
    spellButton.setText(tr("Spell Check"));
    spellButton.setTextAlignment(AlignmentFlag.AlignHCenter.value());
    spellButton.setFlags(ItemFlag.ItemIsSelectable, ItemFlag.ItemIsEnabled);
    spellButton.setIcon(new QIcon(iconPath+"dictionary.png"));

    QListWidgetItem configButton = new QListWidgetItem(contentsWidget);
    configButton.setText(tr("Connection"));
    configButton.setTextAlignment(AlignmentFlag.AlignHCenter.value());
    configButton.setFlags(ItemFlag.ItemIsSelectable, ItemFlag.ItemIsEnabled);
    configButton.setIcon(new QIcon(iconPath+"synchronize.png"));

    QListWidgetItem debugButton = new QListWidgetItem(contentsWidget);
    debugButton.setText(tr("Debugging"));
    debugButton.setTextAlignment(AlignmentFlag.AlignHCenter.value());
    debugButton.setFlags(ItemFlag.ItemIsSelectable, ItemFlag.ItemIsEnabled);
    debugButton.setIcon(new QIcon(iconPath+"debug.jpg"));
   
    contentsWidget.currentItemChanged.connect(this, "changePage(QListWidgetItem, QListWidgetItem)");
  }
View Full Code Here

   
    if (allTags != null) {
      for (int i=0; i<allTags.size(); i++) {
        tags.add(allTags.get(i).getName());
//        tagList.addItem(allTags.get(i).getName());
        QListWidgetItem item = new QListWidgetItem(allTags.get(i).getName());
        tagList.addItem(item);
        if (selectedTags != null) {
          for (int j=0; j<selectedTags.size(); j++) {
            String name = selectedTags.get(j);
            if (name.equals(item.text())) {
              item.setSelected(true);
              j=selectedTags.size()+1;
            }
          }
        }
      }
View Full Code Here

    tagList.addItem(tag);
    newTag.setText("");
    newTagButton.setEnabled(false);
   
    for (int i=0; i<tagList.count(); i++) {
      QListWidgetItem item = tagList.item(i);
      if (item.text().equals(tag)) {
        item.setSelected(true);
        return;
      }
    }
  }
View Full Code Here

          found = true;
          j=archive.size();
        }
      }
      if (!found) {
        QListWidgetItem item = new QListWidgetItem(allBooks.get(i).getName());
        item.setSelected(false);
        openBookList.addItem(item);
      }
    }
   
    setWindowTitle(tr("Open Notebooks"));
    for (int i=0; i<archive.size(); i++) {
      QListWidgetItem item = new QListWidgetItem(archive.get(i).getName());
      item.setSelected(false);
      closedBookList.addItem(item);
    }
    openBookList.itemSelectionChanged.connect(this, "itemSelected()");
  }
View Full Code Here

TOP

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

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.