added main functions

This commit is contained in:
arcan1s
2014-02-04 21:59:06 +04:00
parent e4c2402530
commit 7a6930ce2c
11 changed files with 1293 additions and 4 deletions

View File

@ -0,0 +1,60 @@
/***************************************************************************
* This file is part of netctl-plasmoid *
* *
* netctl-plasmoid 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-plasmoid 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-plasmoid. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QApplication>
#include <QItemSelection>
#include <QMainWindow>
#include <QTableWidgetItem>
class Netctl;
namespace Ui {
class MainWindow;
}
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
explicit MainWindow(QWidget *parent = 0);
~MainWindow();
private slots:
void updateTabs(const int tab);
void updateMainTab();
// main tab slots
void mainTabEnableProfile();
void mainTabRestartProfile();
void mainTabStartProfile();
void mainTabRefreshButtons(QTableWidgetItem *current, QTableWidgetItem *previous);
private:
Netctl *netctlCommand;
Ui::MainWindow *ui;
void createActions();
// configuration
QString netctlPath;
QString profileDir;
QString sudoPath;
};
#endif /* MAINWINDOW_H */