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

Method NBrowserWindow

gui/nbrowserwindow.cpp:84–281  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

82extern Global global;
83
84NBrowserWindow::NBrowserWindow(QWidget *parent) :
85 QWidget(parent)
86{
87 // Setup a unique identifier for this editor instance.
88 QUuid uuid;
89 this->uuid = uuid.createUuid().toString().replace("{","").replace("}","");
90
91
92 browserThread = new QThread();
93 connect(browserThread, SIGNAL(started()), this, SLOT(browserThreadStarted()));
94 browserRunner = new BrowserRunner(0);
95 connect(this, SIGNAL(requestNoteContentUpdate(qint32, QString, bool)), browserRunner, SLOT(updateNoteContent(qint32, QString, bool)));
96 browserThread->start();
97
98
99// this->setStyleSheet("margins:0px;");
100 QHBoxLayout *line1Layout = new QHBoxLayout();
101 QVBoxLayout *layout = new QVBoxLayout(); // Note content layout
102
103
104 // Setup the alarm button & display
105 alarmText.setStyleSheet("QPushButton {background-color: transparent; border-radius: 0px;}");
106 connect(alarmButton.setAction, SIGNAL(triggered()), this, SLOT(alarmSet()));
107 connect(alarmButton.clearAction, SIGNAL(triggered()), this, SLOT(alarmClear()));
108 connect(alarmButton.doneAction, SIGNAL(triggered()), this, SLOT(alarmCompleted()));
109 connect(&alarmButton.menu, SIGNAL(aboutToShow()), this, SLOT(alarmMenuActivated()));
110
111 // Setup line #1 of the window. The text & notebook
112 connect(&alarmText, SIGNAL(clicked()), this, SLOT(alarmCompleted()));
113 layout->addLayout(line1Layout);
114 line1Layout->addWidget(&noteTitle,20);
115 line1Layout->addWidget(&alarmText);
116 line1Layout->addWidget(&alarmButton);
117 line1Layout->addWidget(&notebookMenu,4);
118 line1Layout->addWidget(&expandButton);
119
120
121 // Add the second layout display
122 layout->addLayout(&line2Layout);
123 line2Layout.addWidget(&urlEditor,1);
124 line2Layout.addWidget(&tagEditor, 3);
125
126 // Add the third layout display
127 layout->addLayout(&line3Layout);
128 line3Layout.addWidget(&dateEditor);
129
130
131 editor = new NWebView(this);
132 editor->setTitleEditor(&noteTitle);
133 setupToolBar();
134 layout->addWidget(buttonBar);
135
136 // setup the source editor
137 sourceEdit = new QTextEdit(this);
138 sourceEdit->setVisible(false);
139 sourceEdit->setTabChangesFocus(true);
140
141

Callers

nothing calls this directly

Calls 11

setupShortcutMethod · 0.95
addWidgetMethod · 0.80
setTitleEditorMethod · 0.80
getGuiFontMethod · 0.80
setAttributeMethod · 0.80
setupVisibleButtonsMethod · 0.80
valueMethod · 0.80
setStateMethod · 0.80
QStringClass · 0.50
toStringMethod · 0.45
startMethod · 0.45

Tested by

no test coverage detected