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

KStyles

light.cpp

Go to the documentation of this file.
00001 /*
00002   Copyright (c) 2000-2001 Trolltech AS (info@trolltech.com)
00003 
00004   Permission is hereby granted, free of charge, to any person obtaining a
00005   copy of this software and associated documentation files (the "Software"),
00006   to deal in the Software without restriction, including without limitation
00007   the rights to use, copy, modify, merge, publish, distribute, sublicense,
00008   and/or sell copies of the Software, and to permit persons to whom the
00009   Software is furnished to do so, subject to the following conditions:
00010 
00011   The above copyright notice and this permission notice shall be included in
00012   all copies or substantial portions of the Software.
00013 
00014   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
00015   IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
00016   FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
00017   THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
00018   LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
00019   FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
00020   DEALINGS IN THE SOFTWARE.
00021 */
00022 
00023 #include <QtGui/QStylePlugin>
00024 #include "lightstyle-v2.h"
00025 #include "lightstyle-v3.h"
00026 
00027 class LightStylePlugin : public QStylePlugin
00028 {
00029 public:
00030     LightStylePlugin();
00031 
00032     QStringList keys() const;
00033     QStyle *create(const QString &);
00034 };
00035 
00036 LightStylePlugin::LightStylePlugin()
00037     : QStylePlugin()
00038 {
00039 }
00040 
00041 QStringList LightStylePlugin::keys() const
00042 {
00043     QStringList list;
00044     list << "Light, 2nd revision";
00045     list << "Light, 3rd revision";
00046     return list;
00047 }
00048 
00049 QStyle *LightStylePlugin::create(const QString &s)
00050 {
00051     if (s.toLower() == "light, 2nd revision")
00052     return new LightStyleV2;
00053     if (s.toLower() == "light, 3rd revision")
00054     return new LightStyleV3;
00055     return 0;
00056 }
00057 
00058 Q_EXPORT_PLUGIN( LightStylePlugin )

KStyles

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

API Reference

Skip menu "API Reference"
  • KCMShell
  • KNotify
  • KStyles
  • Nepomuk Daemons
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