MCPcopy Create free account
hub / github.com/FreesmTeam/FreesmLauncher / LogPage

Method LogPage

launcher/ui/pages/instance/LogPage.cpp:140–176  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

138};
139
140LogPage::LogPage(InstancePtr instance, QWidget* parent) : QWidget(parent), ui(new Ui::LogPage), m_instance(instance)
141{
142 ui->setupUi(this);
143 ui->tabWidget->tabBar()->hide();
144
145 m_proxy = new LogFormatProxyModel(this);
146
147 // set up fonts in the log proxy
148 {
149 QString fontFamily = APPLICATION->settings()->get("ConsoleFont").toString();
150 bool conversionOk = false;
151 int fontSize = APPLICATION->settings()->get("ConsoleFontSize").toInt(&conversionOk);
152 if (!conversionOk) {
153 fontSize = 11;
154 }
155 m_proxy->setFont(QFont(fontFamily, fontSize));
156 }
157
158 ui->text->setModel(m_proxy);
159
160 // set up instance and launch process recognition
161 {
162 auto launchTask = m_instance->getLaunchTask();
163 if (launchTask) {
164 setInstanceLaunchTaskChanged(launchTask, true);
165 }
166 connect(m_instance.get(), &BaseInstance::launchTaskChanged, this, &LogPage::onInstanceLaunchTaskChanged);
167 }
168
169 auto findShortcut = new QShortcut(QKeySequence(QKeySequence::Find), this);
170 connect(findShortcut, SIGNAL(activated()), SLOT(findActivated()));
171 auto findNextShortcut = new QShortcut(QKeySequence(QKeySequence::FindNext), this);
172 connect(findNextShortcut, SIGNAL(activated()), SLOT(findNextActivated()));
173 connect(ui->searchBar, SIGNAL(returnPressed()), SLOT(on_findButton_clicked()));
174 auto findPreviousShortcut = new QShortcut(QKeySequence(QKeySequence::FindPrevious), this);
175 connect(findPreviousShortcut, SIGNAL(activated()), SLOT(findPreviousActivated()));
176}
177
178LogPage::~LogPage()
179{

Callers

nothing calls this directly

Calls 8

hideMethod · 0.80
setFontMethod · 0.80
getLaunchTaskMethod · 0.80
setupUiMethod · 0.45
toStringMethod · 0.45
getMethod · 0.45
settingsMethod · 0.45
setModelMethod · 0.45

Tested by

no test coverage detected