MCPcopy Create free account
hub / github.com/Artikash/Textractor / ExtenWindow

Method ExtenWindow

GUI/extenwindow.cpp:135–148  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

133}
134
135ExtenWindow::ExtenWindow(QWidget* parent) : QMainWindow(parent, Qt::WindowCloseButtonHint)
136{
137 This = this;
138 ui.setupUi(this);
139 ui.vboxLayout->addWidget(new QLabel(EXTEN_WINDOW_INSTRUCTIONS, this));
140 setWindowTitle(EXTENSIONS);
141
142 connect(ui.extenList, &QListWidget::customContextMenuRequested, ContextMenu);
143 ui.extenList->installEventFilter(this);
144
145 if (!QFile::exists(EXTEN_SAVE_FILE)) QTextFile(EXTEN_SAVE_FILE, QIODevice::WriteOnly).write(DEFAULT_EXTENSIONS);
146 for (auto extenName : QString(QTextFile(EXTEN_SAVE_FILE, QIODevice::ReadOnly).readAll()).split(">")) Load(extenName);
147 Sync();
148}
149
150bool ExtenWindow::eventFilter(QObject* target, QEvent* event)
151{

Callers

nothing calls this directly

Calls 3

QTextFileClass · 0.85
LoadFunction · 0.85
SyncFunction · 0.85

Tested by

no test coverage detected