2 * QCPUFreq - a simple cpufreq GUI
3 * Copyright (C) 2010 Daniel Klaffenbach <danielklaffenbach@gmail.com>
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
19 #include "loadpreset.h"
20 #include "ui_loadpreset.h"
22 LoadPreset::LoadPreset(QWidget *parent) :
24 ui(new Ui::LoadPreset)
28 connect(ui->loadDefault, SIGNAL(toggled()), this, SLOT(buttonPressed("loadDefault")));
29 connect(ui->loadIdeal, SIGNAL(toggled()), this, SLOT(buttonPressed("loadIdeal")));
30 connect(ui->loadLV, SIGNAL(toggled()), this, SLOT(buttonPressed("loadLV")));
31 connect(ui->loadULV, SIGNAL(toggled()), this, SLOT(buttonPressed("loadULV")));
32 connect(ui->loadXLV, SIGNAL(toggled()), this, SLOT(buttonPressed("loadXLV")));
33 connect(ui->loadCustom, SIGNAL(toggled()), this, SLOT(buttonPressed("loadCustom")));
37 LoadPreset::~LoadPreset()
44 * This slot is called when a button was pressed. It takes care of emmiting
45 * the "load" signal. The load signal will contain the actual name of the
46 * preset which needs to be loaded.
48 * @emits: load(QString)
50 void LoadPreset::buttonPressed(QString buttonName)
52 if (buttonName == "loadDefault") {
54 } else if (buttonName == "loadIdeal") {
56 } else if (buttonName == "loadLV") {
58 } else if (buttonName == "loadULV") {
60 } else if (buttonName == "loadXLV")
62 } else if (buttonName == "loadCustom") {