| 82 | extern Global global; |
| 83 | |
| 84 | NBrowserWindow::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(¬eTitle,20); |
| 115 | line1Layout->addWidget(&alarmText); |
| 116 | line1Layout->addWidget(&alarmButton); |
| 117 | line1Layout->addWidget(¬ebookMenu,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(¬eTitle); |
| 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 |
nothing calls this directly
no test coverage detected