This function sets up the note list window. This is what the users select view a specific note
| 895 | //* view a specific note |
| 896 | //****************************************************************************** |
| 897 | void NixNote::setupNoteList() { |
| 898 | QLOG_TRACE() << "Starting NixNote.setupNoteList()"; |
| 899 | |
| 900 | // Setup a generic widget to hold the search & note table |
| 901 | topRightWidget = new QWidget(this); |
| 902 | topRightLayout = new QVBoxLayout(); |
| 903 | topRightLayout->addWidget(searchText); |
| 904 | topRightWidget->setLayout(topRightLayout); |
| 905 | noteTableView = new NTableView(); |
| 906 | topRightLayout->addWidget(noteTableView); |
| 907 | topRightLayout->setContentsMargins(QMargins(0,0,0,0)); |
| 908 | |
| 909 | // Add the generic widget |
| 910 | if (global.listView == Global::ListViewWide) |
| 911 | rightPanelSplitter->addWidget(topRightWidget); |
| 912 | else |
| 913 | mainSplitter->addWidget(topRightWidget); |
| 914 | |
| 915 | connect(noteTableView, SIGNAL(newNote()), this, SLOT(newNote())); |
| 916 | connect(noteTableView, SIGNAL(notesDeleted(QList<qint32>,bool)), this, SLOT(notesDeleted(QList<qint32>))); |
| 917 | connect(noteTableView, SIGNAL(notesRestored(QList<qint32>)), this, SLOT(notesRestored(QList<qint32>))); |
| 918 | connect(&syncRunner, SIGNAL(syncComplete()), noteTableView, SLOT(refreshData())); |
| 919 | connect(&syncRunner, SIGNAL(noteSynchronized(qint32, bool)), this, SLOT(noteSynchronized(qint32, bool))); |
| 920 | |
| 921 | QLOG_TRACE() << "Leaving NixNote.setupNoteList()"; |
| 922 | } |
| 923 | |
| 924 | |
| 925 |