mirror of
https://github.com/arcan1s/netctl-gui.git
synced 2025-07-13 22:05:50 +00:00
add dbus interface proto
This commit is contained in:
53
sources/gui/src/netctlguiadaptor.cpp
Normal file
53
sources/gui/src/netctlguiadaptor.cpp
Normal file
@ -0,0 +1,53 @@
|
||||
/***************************************************************************
|
||||
* This file is part of netctl-gui *
|
||||
* *
|
||||
* netctl-gui 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. *
|
||||
* *
|
||||
* netctl-gui 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 netctl-gui. If not, see http://www.gnu.org/licenses/ *
|
||||
***************************************************************************/
|
||||
|
||||
|
||||
#include <QDebug>
|
||||
|
||||
#include "mainwindow.h"
|
||||
#include "netctlguiadaptor.h"
|
||||
|
||||
|
||||
NetctlGuiAdaptor::NetctlGuiAdaptor(MainWindow *parent, const bool debugCmd)
|
||||
: QDBusAbstractAdaptor(parent),
|
||||
debug(debugCmd),
|
||||
mainWindow(parent)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
NetctlGuiAdaptor::~NetctlGuiAdaptor()
|
||||
{
|
||||
if (debug) qDebug() << "[NetctlGuiAdaptor]" << "[~NetctlGuiAdaptor]";
|
||||
}
|
||||
|
||||
|
||||
QString NetctlGuiAdaptor::Information()
|
||||
{
|
||||
if (debug) qDebug() << "[NetctlGuiAdaptor]" << "[RestoreWindow]";
|
||||
|
||||
return mainWindow->getInformation();
|
||||
}
|
||||
|
||||
|
||||
bool NetctlGuiAdaptor::RestoreWindow()
|
||||
{
|
||||
if (debug) qDebug() << "[NetctlGuiAdaptor]" << "[RestoreWindow]";
|
||||
|
||||
mainWindow->show();
|
||||
return true;
|
||||
}
|
Reference in New Issue
Block a user