OpendTect  6.3
uipixmap.h
Go to the documentation of this file.
1 #pragma once
2 
3 /*+
4 ________________________________________________________________________
5 
6  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
7  Author: A.H. Lammertink
8  Date: 08/12/1999
9 ________________________________________________________________________
10 
11 -*/
12 
13 #include "uibasemod.h"
14 #include "namedobj.h"
15 #include "coltab.h"
16 
17 mFDQtclass(QBitmap)
18 mFDQtclass(QPaintDevice)
19 mFDQtclass(QPixmap)
20 
21 class BufferStringSet;
22 namespace ColTab { class Sequence; }
23 class uiRGBArray;
24 
25 
33 mExpClass(uiBase) uiPixmap : public NamedObject
34 {
35 public:
36 
37  uiPixmap();
38  uiPixmap(int w,int h,Color col=Color::NoColor());
39  uiPixmap(const char* icon_identifier);
40  uiPixmap(const uiRGBArray&);
41  uiPixmap(const char* xpm[]);
42  uiPixmap(const mQtclass(QPixmap&));
43  uiPixmap(const uiPixmap&);
44 
45  virtual ~uiPixmap();
46 
47  void convertFromRGBArray(const uiRGBArray&);
48 
49  mQtclass(QPixmap*) qpixmap() { return qpixmap_; }
50  const mQtclass(QPixmap*) qpixmap() const { return qpixmap_; }
51 
52  void fill(const Color&);
53 
54  int width() const;
55  int height() const;
56  bool isEmpty() const;
57 
58  const char* source() const { return srcname_; }
59  void setSource( const char* src ) { srcname_ = src; }
60 
61  bool save(const char* fnm,const char* fmt=0,
62  int quality=-1) const;
63 
64  static bool isPresent(const char*);
65 
66 protected:
67 
68  mQtclass(QPixmap*) qpixmap_;
70 };
71 
72 
73 
74 mGlobal(uiBase) void supportedImageFormats(BufferStringSet&,bool forread=false,
75  bool withprintformats=false);
76 mGlobal(uiBase) void getImageFormatDescs(BufferStringSet& descs,bool forread,
77  bool withprintformats=false);
78 mGlobal(uiBase) void getImageFileFilter(BufferString& filter,bool forread,
79  bool withprintformats=false);
#define mExpClass(module)
Definition: commondefs.h:157
void supportedImageFormats(BufferStringSet &, bool forread=false, bool withprintformats=false)
void setSource(const char *src)
Definition: uipixmap.h:59
#define mQtclass(cls)
Definition: commondefs.h:232
const mQtclass(QPixmap *) qpixmap() const
Definition: uipixmap.h:50
#define mGlobal(module)
Definition: commondefs.h:160
mFDQtclass(QBitmap) mFDQtclass(QPaintDevice) mFDQtclass(QPixmap) class BufferStringSet
Set of BufferString objects.
Definition: bufstringset.h:25
void getImageFormatDescs(BufferStringSet &descs, bool forread, bool withprintformats=false)
void getImageFileFilter(BufferString &filter, bool forread, bool withprintformats=false)
BufferString srcname_
Definition: uipixmap.h:69
Off-screen pixel-based paint device.
Definition: uipixmap.h:33
mQtclass(QPixmap *) qpixmap()
Definition: uipixmap.h:49
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size...
Definition: bufstring.h:38
bool isEmpty(const char *)
object with a name.
Definition: namedobj.h:20
const char * source() const
Definition: uipixmap.h:58
Definition: coltab.h:20
Color is an RGB color object, with a transparancy. The storage is in a 4-byte integer, similar to Qt.
Definition: color.h:24
static Color NoColor()
Definition: color.h:74

Generated at for the OpendTect seismic interpretation project. Copyright (C): dGB Beheer B. V. 2017