Changed clang format to new agreement
This commit is contained in:
committed by
borgmanJeremy
parent
2cbccc3d0a
commit
0d5386edd4
@@ -36,61 +36,61 @@
|
||||
ConfigWindow::ConfigWindow(QWidget* parent)
|
||||
: QTabWidget(parent)
|
||||
{
|
||||
setAttribute(Qt::WA_DeleteOnClose);
|
||||
const int size = GlobalValues::buttonBaseSize() * 12;
|
||||
setMinimumSize(size, size);
|
||||
setWindowIcon(QIcon(":img/app/flameshot.svg"));
|
||||
setWindowTitle(tr("Configuration"));
|
||||
setAttribute(Qt::WA_DeleteOnClose);
|
||||
const int size = GlobalValues::buttonBaseSize() * 12;
|
||||
setMinimumSize(size, size);
|
||||
setWindowIcon(QIcon(":img/app/flameshot.svg"));
|
||||
setWindowTitle(tr("Configuration"));
|
||||
|
||||
auto changedSlot = [this](QString s) {
|
||||
QStringList files = m_configWatcher->files();
|
||||
if (!files.contains(s)) {
|
||||
this->m_configWatcher->addPath(s);
|
||||
}
|
||||
emit updateChildren();
|
||||
};
|
||||
m_configWatcher = new QFileSystemWatcher(this);
|
||||
m_configWatcher->addPath(ConfigHandler().configFilePath());
|
||||
connect(m_configWatcher, &QFileSystemWatcher::fileChanged, this, changedSlot);
|
||||
auto changedSlot = [this](QString s) {
|
||||
QStringList files = m_configWatcher->files();
|
||||
if (!files.contains(s)) {
|
||||
this->m_configWatcher->addPath(s);
|
||||
}
|
||||
emit updateChildren();
|
||||
};
|
||||
m_configWatcher = new QFileSystemWatcher(this);
|
||||
m_configWatcher->addPath(ConfigHandler().configFilePath());
|
||||
connect(
|
||||
m_configWatcher, &QFileSystemWatcher::fileChanged, this, changedSlot);
|
||||
|
||||
QColor background = this->palette().window().color();
|
||||
bool isDark = ColorUtils::colorIsDark(background);
|
||||
QString modifier =
|
||||
isDark ? PathInfo::whiteIconPath() : PathInfo::blackIconPath();
|
||||
QColor background = this->palette().window().color();
|
||||
bool isDark = ColorUtils::colorIsDark(background);
|
||||
QString modifier =
|
||||
isDark ? PathInfo::whiteIconPath() : PathInfo::blackIconPath();
|
||||
|
||||
// visuals
|
||||
m_visuals = new VisualsEditor();
|
||||
addTab(m_visuals, QIcon(modifier + "graphics.svg"), tr("Interface"));
|
||||
// visuals
|
||||
m_visuals = new VisualsEditor();
|
||||
addTab(m_visuals, QIcon(modifier + "graphics.svg"), tr("Interface"));
|
||||
|
||||
// filename
|
||||
m_filenameEditor = new FileNameEditor();
|
||||
addTab(m_filenameEditor,
|
||||
QIcon(modifier + "name_edition.svg"),
|
||||
tr("Filename Editor"));
|
||||
// filename
|
||||
m_filenameEditor = new FileNameEditor();
|
||||
addTab(m_filenameEditor,
|
||||
QIcon(modifier + "name_edition.svg"),
|
||||
tr("Filename Editor"));
|
||||
|
||||
// general
|
||||
m_generalConfig = new GeneneralConf();
|
||||
addTab(m_generalConfig, QIcon(modifier + "config.svg"), tr("General"));
|
||||
// general
|
||||
m_generalConfig = new GeneneralConf();
|
||||
addTab(m_generalConfig, QIcon(modifier + "config.svg"), tr("General"));
|
||||
|
||||
// connect update sigslots
|
||||
connect(this,
|
||||
&ConfigWindow::updateChildren,
|
||||
m_filenameEditor,
|
||||
&FileNameEditor::updateComponents);
|
||||
connect(this,
|
||||
&ConfigWindow::updateChildren,
|
||||
m_visuals,
|
||||
&VisualsEditor::updateComponents);
|
||||
connect(this,
|
||||
&ConfigWindow::updateChildren,
|
||||
m_generalConfig,
|
||||
&GeneneralConf::updateComponents);
|
||||
// connect update sigslots
|
||||
connect(this,
|
||||
&ConfigWindow::updateChildren,
|
||||
m_filenameEditor,
|
||||
&FileNameEditor::updateComponents);
|
||||
connect(this,
|
||||
&ConfigWindow::updateChildren,
|
||||
m_visuals,
|
||||
&VisualsEditor::updateComponents);
|
||||
connect(this,
|
||||
&ConfigWindow::updateChildren,
|
||||
m_generalConfig,
|
||||
&GeneneralConf::updateComponents);
|
||||
}
|
||||
|
||||
void
|
||||
ConfigWindow::keyPressEvent(QKeyEvent* e)
|
||||
void ConfigWindow::keyPressEvent(QKeyEvent* e)
|
||||
{
|
||||
if (e->key() == Qt::Key_Escape) {
|
||||
close();
|
||||
}
|
||||
if (e->key() == Qt::Key_Escape) {
|
||||
close();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user