MCPcopy Create free account
hub / github.com/baumgarr/nixnote2 / setupTabWindow

Method setupTabWindow

nixnote.cpp:1061–1094  ·  view source on GitHub ↗

This function sets up the tab window that is used by the browser

Source from the content-addressed store, hash-verified

1059//* This function sets up the tab window that is used by the browser
1060//*****************************************************************************
1061void NixNote::setupTabWindow() {
1062 QLOG_TRACE() << "Starting NixNote.setupTabWindow()";
1063 tabWindow = new NTabWidget(this, &syncRunner, notebookTreeView, tagTreeView);
1064 QWidget *tabPanel = new QWidget(this);
1065 tabPanel->setLayout(new QVBoxLayout());
1066 tabPanel->layout()->addWidget(tabWindow);
1067 rightPanelSplitter->addWidget(tabPanel);
1068
1069 NBrowserWindow *newBrowser = new NBrowserWindow(this);
1070 connect(&syncRunner, SIGNAL(syncComplete()), &newBrowser->notebookMenu, SLOT(reloadData()));
1071 connect(&syncRunner, SIGNAL(syncComplete()), &newBrowser->tagEditor, SLOT(reloadTags()));
1072 connect(&syncRunner, SIGNAL(noteUpdated(qint32)), newBrowser, SLOT(noteSyncUpdate(qint32)));
1073 tabWindow->addBrowser(newBrowser, "");
1074 rightPanelSplitter->setStretchFactor(1,10);
1075
1076 connect(noteTableView, SIGNAL(openNote(bool)), this, SLOT(openNote(bool)));
1077 connect(noteTableView, SIGNAL(openNoteExternalWindow(qint32)), this, SLOT(openExternalNote(qint32)));
1078 connect(menuBar->viewSourceAction, SIGNAL(triggered()), tabWindow, SLOT(toggleSource()));
1079 connect(menuBar->viewHistoryAction, SIGNAL(triggered()), this, SLOT(viewNoteHistory()));
1080 connect(menuBar->viewPresentationModeAction, SIGNAL(triggered()), this, SLOT(presentationModeOn()));
1081 connect(tabWindow, SIGNAL(escapeKeyPressed()), this, SLOT(presentationModeOff()));
1082
1083 connect(menuBar->undoAction, SIGNAL(triggered()), tabWindow, SLOT(undoButtonPressed()));
1084 connect(menuBar->redoAction, SIGNAL(triggered()), tabWindow, SLOT(redoButtonPressed()));
1085 connect(menuBar->cutAction, SIGNAL(triggered()), tabWindow, SLOT(cutButtonPressed()));
1086 connect(menuBar->copyAction, SIGNAL(triggered()), tabWindow, SLOT(copyButtonPressed()));
1087 connect(menuBar->pasteAction, SIGNAL(triggered()), tabWindow, SLOT(pasteButtonPressed()));
1088 connect(menuBar->pasteAsTextAction, SIGNAL(triggered()), tabWindow, SLOT(pasteAsTextButtonPressed()));
1089 connect(menuBar->selectAllAction, SIGNAL(triggered()), tabWindow, SLOT(selectAllButtonPressed()));
1090 connect(menuBar->viewExtendedInformation, SIGNAL(triggered()), tabWindow, SLOT(viewExtendedInformation()));
1091
1092
1093 QLOG_TRACE() << "Exiting NixNote.setupTabWindow()";
1094}
1095
1096
1097

Callers 1

setupGuiMethod · 0.95

Calls 2

addWidgetMethod · 0.80
addBrowserMethod · 0.80

Tested by

no test coverage detected