Rename WindowMain back to MainWindow and DialogAdd to AddDialog.
Looked weird.
This commit is contained in:
parent
e73a55e1ca
commit
adf0e62106
|
@ -6,7 +6,7 @@
|
|||
namespace FediPotato
|
||||
{
|
||||
|
||||
DialogAbout::DialogAbout(QDialog *parent)
|
||||
AboutDialog::AboutDialog(QDialog *parent)
|
||||
: QDialog(parent)
|
||||
{
|
||||
setupUi(this);
|
||||
|
@ -17,7 +17,7 @@ DialogAbout::DialogAbout(QDialog *parent)
|
|||
display_authors();
|
||||
}
|
||||
|
||||
void DialogAbout::display_authors() const
|
||||
void AboutDialog::display_authors() const
|
||||
{
|
||||
QFile file(":/AUTHORS");
|
||||
if (file.open(QIODevice::ReadOnly))
|
||||
|
|
|
@ -9,26 +9,26 @@
|
|||
namespace FediPotato
|
||||
{
|
||||
|
||||
class DialogAbout : public QDialog, private Ui::DialogAbout
|
||||
class AboutDialog : public QDialog, private Ui::AboutDialog
|
||||
{
|
||||
public:
|
||||
//! Default constructor
|
||||
explicit DialogAbout(QDialog *parent = nullptr);
|
||||
explicit AboutDialog(QDialog *parent = nullptr);
|
||||
|
||||
//! Copy constructor
|
||||
DialogAbout(const DialogAbout &other) = delete;
|
||||
AboutDialog(const AboutDialog &other) = delete;
|
||||
|
||||
//! Move constructor
|
||||
DialogAbout(DialogAbout &&other) noexcept = delete;
|
||||
AboutDialog(AboutDialog &&other) noexcept = delete;
|
||||
|
||||
//! Destructor
|
||||
~DialogAbout() noexcept override = default;
|
||||
~AboutDialog() noexcept override = default;
|
||||
|
||||
//! Copy assignment operator
|
||||
DialogAbout& operator=(const DialogAbout &other) = delete;
|
||||
AboutDialog& operator=(const AboutDialog &other) = delete;
|
||||
|
||||
//! Move assignment operator
|
||||
DialogAbout& operator=(DialogAbout &&other) noexcept = delete;
|
||||
AboutDialog& operator=(AboutDialog &&other) noexcept = delete;
|
||||
|
||||
public:
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ int main(int argc, char *argv[])
|
|||
QLibraryInfo::location(QLibraryInfo::TranslationsPath));
|
||||
QGuiApplication::installTranslator(&appTranslator);
|
||||
|
||||
WindowMain win;
|
||||
MainWindow win;
|
||||
win.show();
|
||||
|
||||
return QGuiApplication::exec();
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
namespace FediPotato
|
||||
{
|
||||
|
||||
WindowMain::WindowMain(QMainWindow *parent)
|
||||
MainWindow::MainWindow(QMainWindow *parent)
|
||||
: QMainWindow(parent)
|
||||
, _model_channel(new QStandardItemModel(this))
|
||||
{
|
||||
|
@ -36,7 +36,7 @@ WindowMain::WindowMain(QMainWindow *parent)
|
|||
add_account();
|
||||
}
|
||||
|
||||
void WindowMain::add_account()
|
||||
void MainWindow::add_account()
|
||||
{
|
||||
QStandardItem *item_root{_model_channel->invisibleRootItem()};
|
||||
auto *item_account{new ChannelItem("@user@example.com", id_channel::none)};
|
||||
|
@ -69,18 +69,18 @@ void WindowMain::add_account()
|
|||
treeview_channel->setFont(font_channel);
|
||||
}
|
||||
|
||||
void WindowMain::show_about()
|
||||
void MainWindow::show_about()
|
||||
{
|
||||
auto *dlg{new DialogAbout()}; // NOLINT(cppcoreguidelines-owning-memory)
|
||||
auto *dlg{new AboutDialog()}; // NOLINT(cppcoreguidelines-owning-memory)
|
||||
dlg->show();
|
||||
}
|
||||
|
||||
void WindowMain::open_website()
|
||||
void MainWindow::open_website()
|
||||
{
|
||||
QDesktopServices::openUrl(QUrl("http://fedipotato.org/"));
|
||||
}
|
||||
|
||||
void WindowMain::clicked_channel(const QModelIndex &index)
|
||||
void MainWindow::clicked_channel(const QModelIndex &index)
|
||||
{
|
||||
auto item{dynamic_cast<ChannelItem*>(_model_channel->itemFromIndex(index))};
|
||||
|
||||
|
|
|
@ -13,28 +13,28 @@
|
|||
namespace FediPotato
|
||||
{
|
||||
|
||||
class WindowMain : public QMainWindow, private Ui::WindowMain
|
||||
class MainWindow : public QMainWindow, private Ui::MainWindow
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
//! Default constructor
|
||||
explicit WindowMain(QMainWindow *parent = nullptr);
|
||||
explicit MainWindow(QMainWindow *parent = nullptr);
|
||||
|
||||
//! Copy constructor
|
||||
WindowMain(const WindowMain &other) = delete;
|
||||
MainWindow(const MainWindow &other) = delete;
|
||||
|
||||
//! Move constructor
|
||||
WindowMain(WindowMain &&other) noexcept = delete;
|
||||
MainWindow(MainWindow &&other) noexcept = delete;
|
||||
|
||||
//! Destructor
|
||||
~WindowMain() noexcept override = default;
|
||||
~MainWindow() noexcept override = default;
|
||||
|
||||
//! Copy assignment operator
|
||||
WindowMain& operator=(const WindowMain &other) = delete;
|
||||
MainWindow& operator=(const MainWindow &other) = delete;
|
||||
|
||||
//! Move assignment operator
|
||||
WindowMain& operator=(WindowMain &&other) noexcept = delete;
|
||||
MainWindow& operator=(MainWindow &&other) noexcept = delete;
|
||||
|
||||
private:
|
||||
QStandardItemModel *_model_channel;
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>DialogAbout</class>
|
||||
<widget class="QDialog" name="DialogAbout">
|
||||
<class>AboutDialog</class>
|
||||
<widget class="QDialog" name="AboutDialog">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>400</width>
|
||||
<height>187</height>
|
||||
<height>200</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
|
@ -76,6 +76,9 @@
|
|||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="openExternalLinks">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="textInteractionFlags">
|
||||
<set>Qt::LinksAccessibleByKeyboard|Qt::LinksAccessibleByMouse|Qt::TextBrowserInteraction|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
|
||||
</property>
|
||||
|
@ -102,7 +105,7 @@
|
|||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>358</width>
|
||||
<height>116</height>
|
||||
<height>129</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>WindowMain</class>
|
||||
<widget class="QMainWindow" name="WindowMain">
|
||||
<class>MainWindow</class>
|
||||
<widget class="QMainWindow" name="MainWindow">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
|
@ -103,7 +103,7 @@
|
|||
<connection>
|
||||
<sender>action_about</sender>
|
||||
<signal>triggered()</signal>
|
||||
<receiver>WindowMain</receiver>
|
||||
<receiver>MainWindow</receiver>
|
||||
<slot>show_about()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
|
@ -119,7 +119,7 @@
|
|||
<connection>
|
||||
<sender>action_quit</sender>
|
||||
<signal>triggered()</signal>
|
||||
<receiver>WindowMain</receiver>
|
||||
<receiver>MainWindow</receiver>
|
||||
<slot>close()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
|
@ -135,7 +135,7 @@
|
|||
<connection>
|
||||
<sender>action_website</sender>
|
||||
<signal>triggered()</signal>
|
||||
<receiver>WindowMain</receiver>
|
||||
<receiver>MainWindow</receiver>
|
||||
<slot>open_website()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
|
@ -151,7 +151,7 @@
|
|||
<connection>
|
||||
<sender>treeview_channel</sender>
|
||||
<signal>clicked(QModelIndex)</signal>
|
||||
<receiver>WindowMain</receiver>
|
||||
<receiver>MainWindow</receiver>
|
||||
<slot>clicked_channel(QModelIndex)</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
|
|
Reference in New Issue