gui: mainwindow: Add menu opening config and About dialogs
Dieser Commit ist enthalten in:
Ursprung
f14e2e77cd
Commit
3f85f214e3
@ -166,6 +166,34 @@ void MainWindow::connectSignals()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
connect(
|
||||||
|
ui->menuAboutAction, &QAction::triggered, this,
|
||||||
|
[this](bool checked)
|
||||||
|
{
|
||||||
|
QString html = "<h2>looqs</h2>";
|
||||||
|
html += "Full-text search with previews for your files<br><br>";
|
||||||
|
html += "Copyright (c) 2018-2022: Albert Schwarzkopf<br><br>";
|
||||||
|
html += QString("Version: %1<br><br>").arg(Common::versionText());
|
||||||
|
html += "Contact: looqs at quitesimple dot org<br><br>";
|
||||||
|
html += "Website: <a href=\"https://quitesimple.org\">https://quitesimple.org</a><br><br>";
|
||||||
|
html +=
|
||||||
|
"Source code: <a "
|
||||||
|
"href=\"https://github.com/quitesimpleorg/looqs\">https://github.com/quitesimpleorg/looqs</a><br><br>";
|
||||||
|
html += "License: GPLv3<br><br><br>";
|
||||||
|
html += "looqs is open source and free of charge in the hope it will be useful. The author(s) do not "
|
||||||
|
"give any warranty. In the unlikely event of any damage, the author(s) cannot be held responsible. "
|
||||||
|
"You are using looqs at your own risk";
|
||||||
|
|
||||||
|
QMessageBox::about(this, "About looqs", html);
|
||||||
|
});
|
||||||
|
connect(ui->menuOpenConfigInTextEditorAction, &QAction::triggered, this,
|
||||||
|
[this](bool checked)
|
||||||
|
{
|
||||||
|
QSettings setting;
|
||||||
|
QDesktopServices::openUrl(setting.fileName());
|
||||||
|
});
|
||||||
|
connect(ui->menuAboutQtAction, &QAction::triggered, this,
|
||||||
|
[this](bool checked) { QMessageBox::aboutQt(this, "About Qt"); });
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::spinPreviewPageValueChanged(int val)
|
void MainWindow::spinPreviewPageValueChanged(int val)
|
||||||
|
@ -82,7 +82,7 @@
|
|||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>1185</width>
|
<width>1185</width>
|
||||||
<height>419</height>
|
<height>384</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout"/>
|
<layout class="QHBoxLayout" name="horizontalLayout"/>
|
||||||
@ -363,6 +363,40 @@
|
|||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QStatusBar" name="statusBar"/>
|
<widget class="QStatusBar" name="statusBar"/>
|
||||||
|
<widget class="QMenuBar" name="menuBar">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>1221</width>
|
||||||
|
<height>35</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<widget class="QMenu" name="menulooqs">
|
||||||
|
<property name="title">
|
||||||
|
<string>looqs</string>
|
||||||
|
</property>
|
||||||
|
<addaction name="menuOpenConfigInTextEditorAction"/>
|
||||||
|
<addaction name="menuAboutAction"/>
|
||||||
|
<addaction name="menuAboutQtAction"/>
|
||||||
|
</widget>
|
||||||
|
<addaction name="menulooqs"/>
|
||||||
|
</widget>
|
||||||
|
<action name="menuAboutAction">
|
||||||
|
<property name="text">
|
||||||
|
<string>About</string>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
|
<action name="menuOpenConfigInTextEditorAction">
|
||||||
|
<property name="text">
|
||||||
|
<string>Open config in text editor</string>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
|
<action name="menuAboutQtAction">
|
||||||
|
<property name="text">
|
||||||
|
<string>About Qt</string>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
</widget>
|
</widget>
|
||||||
<layoutdefault spacing="6" margin="11"/>
|
<layoutdefault spacing="6" margin="11"/>
|
||||||
<resources/>
|
<resources/>
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren