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

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