mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-07 14:46:33 +02:00
Add a basic DiagnosticsDialog without actual functionality
This commit is contained in:
@@ -64,6 +64,7 @@ SET( tomahawkSourcesGui ${tomahawkSourcesGui}
|
|||||||
tomahawktrayicon.cpp
|
tomahawktrayicon.cpp
|
||||||
audiocontrols.cpp
|
audiocontrols.cpp
|
||||||
settingsdialog.cpp
|
settingsdialog.cpp
|
||||||
|
diagnosticsdialog.cpp
|
||||||
configdelegatebase.cpp
|
configdelegatebase.cpp
|
||||||
sipconfigdelegate.cpp
|
sipconfigdelegate.cpp
|
||||||
resolverconfigdelegate.cpp
|
resolverconfigdelegate.cpp
|
||||||
@@ -106,6 +107,7 @@ SET( tomahawkHeadersGui ${tomahawkHeadersGui}
|
|||||||
tomahawktrayicon.h
|
tomahawktrayicon.h
|
||||||
audiocontrols.h
|
audiocontrols.h
|
||||||
settingsdialog.h
|
settingsdialog.h
|
||||||
|
diagnosticsdialog.h
|
||||||
configdelegatebase.h
|
configdelegatebase.h
|
||||||
resolverconfigdelegate.h
|
resolverconfigdelegate.h
|
||||||
sipconfigdelegate.h
|
sipconfigdelegate.h
|
||||||
@@ -117,6 +119,7 @@ SET( tomahawkHeadersGui ${tomahawkHeadersGui}
|
|||||||
SET( tomahawkUI ${tomahawkUI}
|
SET( tomahawkUI ${tomahawkUI}
|
||||||
tomahawkwindow.ui
|
tomahawkwindow.ui
|
||||||
settingsdialog.ui
|
settingsdialog.ui
|
||||||
|
diagnosticsdialog.ui
|
||||||
stackedsettingsdialog.ui
|
stackedsettingsdialog.ui
|
||||||
proxydialog.ui
|
proxydialog.ui
|
||||||
|
|
||||||
|
47
src/diagnosticsdialog.cpp
Normal file
47
src/diagnosticsdialog.cpp
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
/* === This file is part of Tomahawk Player - <http://tomahawk-player.org> ===
|
||||||
|
*
|
||||||
|
* Copyright 2011, Dominik Schmidt <dev@dominik-schmidt.de>
|
||||||
|
*
|
||||||
|
* Tomahawk is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* Tomahawk is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with Tomahawk. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "diagnosticsdialog.h"
|
||||||
|
#include "ui_diagnosticsdialog.h"
|
||||||
|
|
||||||
|
|
||||||
|
#include <QPlainTextEdit>
|
||||||
|
|
||||||
|
DiagnosticsDialog::DiagnosticsDialog( QWidget *parent )
|
||||||
|
: QDialog( parent )
|
||||||
|
, ui( new Ui::DiagnosticsDialog )
|
||||||
|
{
|
||||||
|
ui->setupUi( this );
|
||||||
|
|
||||||
|
connect( ui->buttonBox, SIGNAL( rejected() ), this, SLOT( reject() ) );
|
||||||
|
|
||||||
|
ui->logView->setReadOnly(true);
|
||||||
|
|
||||||
|
updateLogView();
|
||||||
|
}
|
||||||
|
|
||||||
|
void DiagnosticsDialog::updateLogView()
|
||||||
|
{
|
||||||
|
QString log(
|
||||||
|
"Tomahawk Diagnostics Log\n\n"
|
||||||
|
);
|
||||||
|
|
||||||
|
ui->logView->setPlainText(log);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
44
src/diagnosticsdialog.h
Normal file
44
src/diagnosticsdialog.h
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
/* === This file is part of Tomahawk Player - <http://tomahawk-player.org> ===
|
||||||
|
*
|
||||||
|
* Copyright 2011, Dominik Schmidt <dev@dominik-schmidt.de>
|
||||||
|
*
|
||||||
|
* Tomahawk is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* Tomahawk is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with Tomahawk. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef DIGANOSTICSDIALOG_H
|
||||||
|
#define DIAGNOSTICSDIALOG_H
|
||||||
|
|
||||||
|
#include <QDialog>
|
||||||
|
#include <QDebug>
|
||||||
|
|
||||||
|
namespace Ui
|
||||||
|
{
|
||||||
|
class DiagnosticsDialog;
|
||||||
|
}
|
||||||
|
|
||||||
|
class DiagnosticsDialog : public QDialog
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
explicit DiagnosticsDialog( QWidget* parent = 0 );
|
||||||
|
~DiagnosticsDialog() {};
|
||||||
|
|
||||||
|
private slots:
|
||||||
|
void updateLogView();
|
||||||
|
private:
|
||||||
|
Ui::DiagnosticsDialog* ui;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // DIAGNOSTICSDIALOG_H
|
42
src/diagnosticsdialog.ui
Normal file
42
src/diagnosticsdialog.ui
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<ui version="4.0">
|
||||||
|
<class>DiagnosticsDialog</class>
|
||||||
|
<widget class="QDialog" name="DiagnosticsDialog">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>621</width>
|
||||||
|
<height>434</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>353</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="windowTitle">
|
||||||
|
<string>Tomahawk Diagnostics</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||||
|
<item>
|
||||||
|
<widget class="QTextEdit" name="logView"/>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QDialogButtonBox" name="buttonBox">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="standardButtons">
|
||||||
|
<set>QDialogButtonBox::Close</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<resources>
|
||||||
|
<include location="../resources.qrc"/>
|
||||||
|
</resources>
|
||||||
|
<connections/>
|
||||||
|
</ui>
|
@@ -52,6 +52,7 @@
|
|||||||
|
|
||||||
#include "audiocontrols.h"
|
#include "audiocontrols.h"
|
||||||
#include "settingsdialog.h"
|
#include "settingsdialog.h"
|
||||||
|
#include "diagnosticsdialog.h"
|
||||||
#include "tomahawksettings.h"
|
#include "tomahawksettings.h"
|
||||||
#include "sourcelist.h"
|
#include "sourcelist.h"
|
||||||
#include "transferview.h"
|
#include "transferview.h"
|
||||||
@@ -261,6 +262,7 @@ TomahawkWindow::setupSignals()
|
|||||||
|
|
||||||
// <Menu Items>
|
// <Menu Items>
|
||||||
connect( ui->actionPreferences, SIGNAL( triggered() ), SLOT( showSettingsDialog() ) );
|
connect( ui->actionPreferences, SIGNAL( triggered() ), SLOT( showSettingsDialog() ) );
|
||||||
|
connect( ui->actionDiagnostics, SIGNAL( triggered() ), SLOT( showDiagnosticsDialog() ) );
|
||||||
connect( ui->actionToggleConnect, SIGNAL( triggered() ), APP->sipHandler(), SLOT( toggleConnect() ) );
|
connect( ui->actionToggleConnect, SIGNAL( triggered() ), APP->sipHandler(), SLOT( toggleConnect() ) );
|
||||||
// connect( ui->actionAddPeerManually, SIGNAL( triggered() ), SLOT( addPeerManually() ) );
|
// connect( ui->actionAddPeerManually, SIGNAL( triggered() ), SLOT( addPeerManually() ) );
|
||||||
connect( ui->actionRescanCollection, SIGNAL( triggered() ), SLOT( updateCollectionManually() ) );
|
connect( ui->actionRescanCollection, SIGNAL( triggered() ), SLOT( updateCollectionManually() ) );
|
||||||
@@ -349,6 +351,13 @@ TomahawkWindow::showSettingsDialog()
|
|||||||
win.exec();
|
win.exec();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void TomahawkWindow::showDiagnosticsDialog()
|
||||||
|
{
|
||||||
|
qDebug() << Q_FUNC_INFO;
|
||||||
|
DiagnosticsDialog win;
|
||||||
|
win.exec();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
TomahawkWindow::updateCollectionManually()
|
TomahawkWindow::updateCollectionManually()
|
||||||
|
@@ -66,6 +66,7 @@ public slots:
|
|||||||
void createPlaylist();
|
void createPlaylist();
|
||||||
void loadSpiff();
|
void loadSpiff();
|
||||||
void showSettingsDialog();
|
void showSettingsDialog();
|
||||||
|
void showDiagnosticsDialog();
|
||||||
void updateCollectionManually();
|
void updateCollectionManually();
|
||||||
void pluginMenuAdded(QMenu*);
|
void pluginMenuAdded(QMenu*);
|
||||||
void pluginMenuRemoved(QMenu*);
|
void pluginMenuRemoved(QMenu*);
|
||||||
|
@@ -83,6 +83,8 @@
|
|||||||
<property name="title">
|
<property name="title">
|
||||||
<string>&Help</string>
|
<string>&Help</string>
|
||||||
</property>
|
</property>
|
||||||
|
<addaction name="actionDiagnostics"/>
|
||||||
|
<addaction name="separator"/>
|
||||||
<addaction name="actionAboutTomahawk"/>
|
<addaction name="actionAboutTomahawk"/>
|
||||||
</widget>
|
</widget>
|
||||||
<addaction name="menuApp"/>
|
<addaction name="menuApp"/>
|
||||||
@@ -181,6 +183,11 @@
|
|||||||
<string>Meta+Ctrl+Z</string>
|
<string>Meta+Ctrl+Z</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
|
<action name="actionDiagnostics">
|
||||||
|
<property name="text">
|
||||||
|
<string>Diagnostics...</string>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
</widget>
|
</widget>
|
||||||
<layoutdefault spacing="6" margin="11"/>
|
<layoutdefault spacing="6" margin="11"/>
|
||||||
<resources/>
|
<resources/>
|
||||||
|
Reference in New Issue
Block a user