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

KDEPrint

cupsdsplash.cpp

Go to the documentation of this file.
00001 /*
00002  *  This file is part of the KDE libraries
00003  *  Copyright (c) 2001 Michael Goffioul <kdeprint@swing.be>
00004  *
00005  *  This library is free software; you can redistribute it and/or
00006  *  modify it under the terms of the GNU Library General Public
00007  *  License version 2 as published by the Free Software Foundation.
00008  *
00009  *  This library is distributed in the hope that it will be useful,
00010  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012  *  Library General Public License for more details.
00013  *
00014  *  You should have received a copy of the GNU Library General Public License
00015  *  along with this library; see the file COPYING.LIB.  If not, write to
00016  *  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00017  *  Boston, MA 02110-1301, USA.
00018  **/
00019 
00020 #include "cupsdsplash.h"
00021 
00022 #include <QtGui/QLabel>
00023 #include <QtGui/QPixmap>
00024 #include <QtGui/QLayout>
00025 #include <klocale.h>
00026 #include <kstandarddirs.h>
00027 
00028 CupsdSplash::CupsdSplash(QWidget *parent)
00029         : CupsdPage(parent)
00030 {
00031     setHeader(i18n("Welcome to the CUPS Server Configuration Tool"));
00032     setPageLabel(i18n("Welcome"));
00033     setPixmap("go");
00034 
00035     QVBoxLayout *main_ = new QVBoxLayout(this);
00036     main_->setMargin(10);
00037     main_->setSpacing(10);
00038     QHBoxLayout *sub_ = new QHBoxLayout();
00039     sub_->setMargin(0);
00040     sub_->setSpacing(10);
00041     main_->addLayout(sub_);
00042 
00043     QLabel *cupslogo_ = new QLabel(this);
00044     QString logopath = KStandardDirs::locate("data", QString("kdeprint/cups_logo.png"));
00045     cupslogo_->setPixmap(logopath.isEmpty() ? QPixmap() : QPixmap(logopath));
00046     cupslogo_->setAlignment(Qt::AlignCenter);
00047     QLabel *kupslogo_ = new QLabel(this);
00048     logopath = KStandardDirs::locate("data", QString("kdeprint/kde_logo.png"));
00049     kupslogo_->setPixmap(logopath.isEmpty() ? QPixmap() : QPixmap(logopath));
00050     kupslogo_->setAlignment(Qt::AlignCenter);
00051 
00052     QLabel *helptxt_ = new QLabel(this);
00053     helptxt_->setWordWrap(true);
00054     helptxt_->setText(i18n("<p>This tool will help you to configure graphically the server of the CUPS printing system. "
00055                            "The available options are grouped into sets of related topics and can be accessed "
00056                            "quickly through the icon view located on the left. Each option has a default value that is "
00057                            "shown if it has not been previously set. This default value should be OK in most cases.</p><br />"
00058                            "<p>You can access a short help message for each option using either the '?' button in the "
00059                            "the title bar, or the button at the bottom of this dialog.</p>"));
00060 
00061     sub_->addWidget(cupslogo_);
00062     sub_->addWidget(kupslogo_);
00063     main_->addWidget(helptxt_, 1);
00064 }
00065 
00066 CupsdSplash::~CupsdSplash()
00067 {
00068 }
00069 
00070 bool CupsdSplash::loadConfig(CupsdConf*, QString&)
00071 {
00072     return true;
00073 }
00074 
00075 bool CupsdSplash::saveConfig(CupsdConf*, QString&)
00076 {
00077     return true;
00078 }

KDEPrint

Skip menu "KDEPrint"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

API Reference

Skip menu "API Reference"
  •   KDEPrint
Generated for API Reference 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