Back to index

kdeartwork  4.3.2
Palette.h
Go to the documentation of this file.
00001 /*
00002   RISC OS KWin client
00003   
00004   Copyright 2000
00005     Rik Hemsley <rik@kde.org>
00006 
00007   This program is free software; you can redistribute it and/or
00008   modify it under the terms of the GNU General Public
00009   License as published by the Free Software Foundation; either
00010   version 2 of the License, or (at your option) any later version.
00011 
00012   This program is distributed in the hope that it will be useful,
00013   but WITHOUT ANY WARRANTY; without even the implied warranty of
00014   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00015   General Public License for more details.
00016 
00017   You should have received a copy of the GNU General Public License
00018   along with this program; see the file COPYING.  If not, write to
00019   the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00020   Boston, MA 02110-1301, USA.
00021 */
00022 
00023 #ifndef RISC_OS_PALETTE_H
00024 #define RISC_OS_PALETTE_H
00025 
00026 #include <q3memarray.h>
00027 #include <qglobal.h>
00028 
00029 namespace RiscOS
00030 {
00031 
00032 class Palette
00033 {
00034    public:
00035 
00036       Palette()
00037       {
00038          data_.resize(8);
00039 
00040          data_[0] = 0xFFFFFFFF;
00041          data_[1] = 0xFFDCDCDC;
00042          data_[2] = 0xFFC3C3C3;
00043          data_[3] = 0xFFA0A0A0;
00044          data_[4] = 0xFF808080;
00045          data_[5] = 0xFF585858;
00046          data_[6] = 0xFF303030;
00047          data_[7] = 0xFF000000;
00048       }
00049 
00050       QRgb& operator [] (int idx)
00051       {
00052          return data_[idx];
00053       }
00054 
00055       QRgb operator [] (int idx) const
00056       {
00057          return data_[idx];
00058       }
00059 
00060    private:
00061 
00062       Q3MemArray<QRgb> data_;
00063 };
00064 
00065 } // End namespace
00066 
00067 #endif
00068 
00069 // vim:ts=2:sw=2:tw=78