• Skip to content
  • Skip to link menu
KDE 4.0 API Reference
  • KDE API Reference
  • kdenetwork
  • Sitemap
  • Contact Us
 

kget

errorgraph.cpp

Go to the documentation of this file.
00001 /***************************************************************************
00002  *                                                                         *
00003  *   This program is free software; you can redistribute it and/or modify  *
00004  *   it under the terms of the GNU General Public License as published by  *
00005  *   the Free Software Foundation; either version 2 of the License, or     *
00006  *   (at your option) any later version.                                   *
00007  *
00008  *   Copyright (C) 2007 by Javier Goday <jgoday@gmail.com>
00009  *                                                                         *
00010  *   This program is distributed in the hope that it will be useful,       *
00011  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00012  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00013  *   GNU General Public License for more details.                          *
00014  *                                                                         *
00015  *   You should have received a copy of the GNU General Public License     *
00016  *   along with this program; if not, write to the                         *
00017  *   Free Software Foundation, Inc.,                                       *
00018  *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA .        *
00019  ***************************************************************************/
00020 
00021 #include "errorgraph.h"
00022 #include "transfergraph.h"
00023 
00024 #include <plasma/widgets/icon.h>
00025 #include <plasma/widgets/label.h>
00026 #include <plasma/layouts/boxlayout.h>
00027 #include <plasma/widgets/pushbutton.h>
00028 
00029 #include <KIcon>
00030 #include <QProcess>
00031 
00032 ErrorGraph::ErrorGraph(Plasma::Applet *parent, Plasma::BoxLayout *mainlayout, const QString &message)
00033     : TransferGraph(parent)
00034 {
00035     m_layout = mainlayout;
00036 
00037     m_icon = new Plasma::Icon(KIcon("dialog-warning"), "", m_applet);
00038 
00039 
00040     m_errorLabel = new Plasma::Label(m_applet);
00041     m_errorLabel->setText(message);
00042     m_errorLabel->setPen(QPen(Qt::white));
00043     m_errorLabel->setAlignment(Qt::AlignCenter);
00044 
00045     m_launchButton = new Plasma::PushButton(KIcon("kget"), "Launch KGet", m_applet);
00046 
00047     m_layout->addItem(m_icon);
00048     m_layout->addItem(m_errorLabel);
00049     m_layout->addItem(m_launchButton);
00050 
00051     connect(m_launchButton, SIGNAL(clicked()), SLOT(launchKGet()));
00052 }
00053 
00054 ErrorGraph::~ErrorGraph()
00055 {
00056     delete m_icon;
00057     delete m_errorLabel;
00058     delete m_launchButton;
00059 }
00060 
00061 void ErrorGraph::launchKGet()
00062 {
00063     QProcess *kgetProcess = new QProcess(this);
00064     kgetProcess->startDetached("kget");
00065 }

kget

Skip menu "kget"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members

kdenetwork

Skip menu "kdenetwork"
  • kget
  • kopete
  •   kopete
  •   libkopete
  •       libpapillon
  • krfb
Generated for kdenetwork by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal