Package cx.fbn.nevernote.sql

Examples of cx.fbn.nevernote.sql.WatchFolderRecord


  }

 
  @SuppressWarnings("unused")
  private void editPressed() {
    WatchFolderRecord record = new WatchFolderRecord();
    QModelIndex index = table.currentIndex();
    int row = index.row();
    QTableWidgetItem item = table.item(row, 0);
    record.folder = item.text();
    item = table.item(row, 1);
    record.notebook = item.text();
    item = table.item(row,2);
    if (item.data(ItemDataRole.UserRole).toString().equalsIgnoreCase("keep"))
      record.keep = true;
    else
      record.keep = false;
   
    WatchFolderAdd dialog = new WatchFolderAdd(record, notebooks);
    dialog.exec();
    if (dialog.okClicked()) {
      String dir = dialog.directory.text();
      String notebook = dialog.books.currentText();
     
      boolean keep;
      int idx = dialog.keep.currentIndex();
      if (dialog.keep.itemData(idx, ItemDataRole.UserRole).toString().equalsIgnoreCase("keep"))
        keep = true;
      else
        keep = false;
      table.removeRow(row);
      table.insertRow(table.rowCount());
      addRow(table.rowCount()-1, dir, notebook, keep);
      WatchFolderRecord newRecord = new WatchFolderRecord();
      newRecord.folder = dir;
      newRecord.notebook = notebook;
      newRecord.keep = keep;
      records.add(newRecord);
    }
View Full Code Here

TOP

Related Classes of cx.fbn.nevernote.sql.WatchFolderRecord

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.