KVIrc  4.9.2
DeveloperAPIs
KviPixmap.h
Go to the documentation of this file.
1 #ifndef _KVI_PIXMAP_H_
2 #define _KVI_PIXMAP_H_
3 
4 //=============================================================================
5 //
6 // File : KviPixmap.h
7 // Creation date : Sat Jun 24 2000 13:59:04 by Szymon Stefanek
8 //
9 // This file is part of the KVIrc IRC client distribution
10 // Copyright (C) 2000-2010 Szymon Stefanek (pragma at kvirc dot net)
11 //
12 // This program is FREE software. You can redistribute it and/or
13 // modify it under the terms of the GNU General Public License
14 // as published by the Free Software Foundation; either version 2
15 // of the License, or (at your option) any later version.
16 //
17 // This program is distributed in the HOPE that it will be USEFUL,
18 // but WITHOUT ANY WARRANTY; without even the implied warranty of
19 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
20 // See the GNU General Public License for more details.
21 //
22 // You should have received a copy of the GNU General Public License
23 // along with this program. If not, write to the Free Software Foundation,
24 // Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
25 //
26 //=============================================================================
27 
28 #include "kvi_settings.h"
29 #include "KviCString.h"
30 
31 #include <QPixmap>
32 
34 {
35 public:
36  KviPixmap();
37  KviPixmap(const char * path);
38  KviPixmap(const KviPixmap & pix);
39  ~KviPixmap();
40 
41 private:
42  QPixmap * m_pPix;
43  QString m_szPath;
44 
45 public:
46  bool isNull() { return m_pPix == 0; };
47  bool load(const char * path);
48  bool load(const QString & path);
49  const QString & path() const { return m_szPath; };
50  QPixmap * pixmap() const { return m_pPix; };
51  void set(const QPixmap & pix, const QString & szPath);
52  KviPixmap & operator=(const KviPixmap & pix); // deep copy
53  void setNull();
54 };
55 
56 #endif //_KVI_PIXMAP_H_
QPixmap * m_pPix
Definition: KviPixmap.h:42
QString m_szPath
Definition: KviPixmap.h:43
Definition: KviPixmap.h:33
const QString & path() const
Definition: KviPixmap.h:49
QPixmap * pixmap() const
Definition: KviPixmap.h:50
bool isNull()
Definition: KviPixmap.h:46
void set(void *dst_ptr, char c, int len)
Initializes len bytes of memory starting from dst_ptr to c.
Definition: KviMemory.h:152
This file contains compile time settings.
#define KVILIB_API
Definition: kvi_settings.h:125