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

KStyles

tileset.h

Go to the documentation of this file.
00001 /*
00002  * Copyright 2007 Matthew Woehlke <mw_triad@users.sourceforge.net>
00003  *
00004  * This library is free software; you can redistribute it and/or
00005  * modify it under the terms of the GNU Library General Public
00006  * License version 2 as published by the Free Software Foundation.
00007  *
00008  * This library is distributed in the hope that it will be useful,
00009  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00010  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00011  * Library General Public License for more details.
00012  *
00013  * You should have received a copy of the GNU Library General Public License
00014  * along with this library; see the file COPYING.LIB.  If not, write to
00015  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00016  * Boston, MA 02110-1301, USA.
00017  */
00018 
00019 #ifndef TILESET_H
00020 #define TILESET_H
00021 
00022 #include <QtGui/QPixmap>
00023 #include <QtCore/QRect>
00024 
00025 class TileSet
00026 {
00027 public:
00038     TileSet(const QPixmap&, int w1, int h1, int w2, int h2);
00039 
00056     TileSet(const QPixmap &pix, int w1, int h1, int w3, int h3, int x2, int y2, int w2, int h2);
00057 
00058     TileSet() : _empty(true) {}
00059     TileSet(const TileSet&);
00060 
00061     virtual ~TileSet() {}
00062 
00063     TileSet& operator=(const TileSet&);
00064 
00071     enum Tile {
00072         Top = 0x1,
00073         Left = 0x2,
00074         Right = 0x8,
00075         Bottom = 0x4,
00076         Center = 0x10,
00077         Ring = 0x0f,
00078         Horizontal = 0x1a,
00079         Vertical = 0x15,
00080         Full = 0x1f
00081     };
00082     Q_DECLARE_FLAGS(Tiles, Tile)
00083 
00084     
00090     void render(const QRect&, QPainter*, Tiles = Ring) const;
00091 
00092 protected:
00093     void initPixmap(int s, const QPixmap&, int w, int h, const QRect &region);
00094 
00095     bool _empty;
00096     QPixmap _pixmap[9];
00097     int _w1, _h1, _w3, _h3;
00098 };
00099 
00100 Q_DECLARE_OPERATORS_FOR_FLAGS(TileSet::Tiles)
00101 
00102 #endif //TILESET_H

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.7
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