MCPcopy Create free account
hub / github.com/KDE/okular / createConsoleWindow

Function createConsoleWindow

core/script/js_console.cpp:27–43  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25static QPlainTextEdit *g_jsConsoleLog = 0;
26
27static void createConsoleWindow()
28{
29 if (g_jsConsoleWindow.exists())
30 return;
31
32 g_jsConsoleWindow->setButtons(KDialog::Close | KDialog::User1);
33 g_jsConsoleWindow->setButtonGuiItem(KDialog::User1, KStandardGuiItem::clear());
34
35 QVBoxLayout *mainLay = new QVBoxLayout(g_jsConsoleWindow->mainWidget());
36 mainLay->setContentsMargins(0, 0, 0, 0);
37 g_jsConsoleLog = new QPlainTextEdit(g_jsConsoleWindow->mainWidget());
38 g_jsConsoleLog->setReadOnly(true);
39 mainLay->addWidget(g_jsConsoleLog);
40
41 QObject::connect(g_jsConsoleWindow, SIGNAL(closeClicked()), g_jsConsoleWindow, SLOT(close()));
42 QObject::connect(g_jsConsoleWindow, SIGNAL(user1Clicked()), g_jsConsoleLog, SLOT(clear()));
43}
44#endif
45
46void JSConsole::show()

Callers 1

showMethod · 0.85

Calls 1

setReadOnlyMethod · 0.45

Tested by

no test coverage detected