Allow opening another window
This commit is contained in:
parent
fcf07aa46f
commit
0a4cbe42aa
|
@ -175,7 +175,8 @@ set(REQUIRED_ICONS
|
||||||
system-file-manager
|
system-file-manager
|
||||||
document-save
|
document-save
|
||||||
view-media-lyrics
|
view-media-lyrics
|
||||||
image-resize-symbolic)
|
image-resize-symbolic
|
||||||
|
window-new)
|
||||||
|
|
||||||
# find c++utilities
|
# find c++utilities
|
||||||
set(CONFIGURATION_PACKAGE_SUFFIX
|
set(CONFIGURATION_PACKAGE_SUFFIX
|
||||||
|
|
|
@ -114,6 +114,7 @@ MainWindow::MainWindow(QWidget *parent)
|
||||||
|
|
||||||
// connect signals and slots, install event filter
|
// connect signals and slots, install event filter
|
||||||
// menu: application
|
// menu: application
|
||||||
|
connect(m_ui->actionNew_window, &QAction::triggered, this, &MainWindow::showNewWindow);
|
||||||
connect(m_ui->actionSettings, &QAction::triggered, this, &MainWindow::showSettingsDlg);
|
connect(m_ui->actionSettings, &QAction::triggered, this, &MainWindow::showSettingsDlg);
|
||||||
connect(m_ui->actionOpen_MusicBrainz_search, &QAction::triggered, this, &MainWindow::toggleDbQueryWidget);
|
connect(m_ui->actionOpen_MusicBrainz_search, &QAction::triggered, this, &MainWindow::toggleDbQueryWidget);
|
||||||
connect(m_ui->lockLayout, &QAction::triggered, this, &MainWindow::toggleLayoutLocked);
|
connect(m_ui->lockLayout, &QAction::triggered, this, &MainWindow::toggleLayoutLocked);
|
||||||
|
@ -378,6 +379,17 @@ void MainWindow::showAboutDlg()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* \brief MainWindow::showNewWindow
|
||||||
|
*/
|
||||||
|
void MainWindow::showNewWindow()
|
||||||
|
{
|
||||||
|
auto *const newWindow = new MainWindow;
|
||||||
|
newWindow->setAttribute(Qt::WA_DeleteOnClose);
|
||||||
|
newWindow->show();
|
||||||
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Shows the settings dialog (modal).
|
* \brief Shows the settings dialog (modal).
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -69,6 +69,7 @@ private Q_SLOTS:
|
||||||
void handleCurrentPathChanged(const QString &newPath);
|
void handleCurrentPathChanged(const QString &newPath);
|
||||||
|
|
||||||
// settings
|
// settings
|
||||||
|
void showNewWindow();
|
||||||
void showSettingsDlg();
|
void showSettingsDlg();
|
||||||
void applySettingsFromDialog();
|
void applySettingsFromDialog();
|
||||||
|
|
||||||
|
|
|
@ -46,7 +46,7 @@
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>1225</width>
|
<width>1225</width>
|
||||||
<height>26</height>
|
<height>30</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QMenu" name="menuFile">
|
<widget class="QMenu" name="menuFile">
|
||||||
|
@ -82,6 +82,7 @@
|
||||||
<property name="title">
|
<property name="title">
|
||||||
<string>A&pplication</string>
|
<string>A&pplication</string>
|
||||||
</property>
|
</property>
|
||||||
|
<addaction name="actionNew_window"/>
|
||||||
<addaction name="actionSettings"/>
|
<addaction name="actionSettings"/>
|
||||||
<addaction name="actionOpen_MusicBrainz_search"/>
|
<addaction name="actionOpen_MusicBrainz_search"/>
|
||||||
<addaction name="lockLayout"/>
|
<addaction name="lockLayout"/>
|
||||||
|
@ -363,6 +364,14 @@
|
||||||
<string>&Lock layout</string>
|
<string>&Lock layout</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
|
<action name="actionNew_window">
|
||||||
|
<property name="icon">
|
||||||
|
<iconset theme="window-new"/>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>New window</string>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
</widget>
|
</widget>
|
||||||
<customwidgets>
|
<customwidgets>
|
||||||
<customwidget>
|
<customwidget>
|
||||||
|
|
Loading…
Reference in New Issue