OpendTect  6.6
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  RCS: $Id$
10 ________________________________________________________________________
11 
12 -*/
13 
14 #include "uibasemod.h"
15 #include "namedobj.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 
38  uiPixmap(int w,int h);
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  void fill(const ColTab::Sequence&,bool hor);
54  void fillGradient(const Color& col1,const Color& col2,
55  bool hor);
56 
57  int width() const;
58  int height() const;
59  bool isEmpty() const;
60 
61  const char* source() const { return srcname_.buf(); }
62 
63  bool save(const char* fnm,const char* fmt=0,
64  int quality=-1) const;
65 
66  static bool isPresent(const char*);
67 
68 protected:
69 
70  mQtclass(QPixmap*) qpixmap_;
72 };
73 
74 
75 
76 mGlobal(uiBase) void supportedImageFormats(BufferStringSet&,bool forread=false,
77  bool withprintformats=false);
78 mGlobal(uiBase) void getImageFormatDescs(BufferStringSet& descs,bool forread,
79  bool withprintformats=false);
80 mGlobal(uiBase) void getImageFileFilter(BufferString& filter,bool forread,
81  bool withprintformats=false);
82 
uiPixmap::save
bool save(const char *fnm, const char *fmt=0, int quality=-1) const
getImageFileFilter
void getImageFileFilter(BufferString &filter, bool forread, bool withprintformats=false)
NamedObject
object with a name.
Definition: namedobj.h:42
uiPixmap::uiPixmap
uiPixmap(const uiRGBArray &)
uiPixmap
Off-screen pixel-based paint device.
Definition: uipixmap.h:34
mGlobal
#define mGlobal(module)
Definition: commondefs.h:180
ColTab
Color Table
Definition: coltab.h:22
uiPixmap::convertFromRGBArray
void convertFromRGBArray(const uiRGBArray &)
uiPixmap::~uiPixmap
virtual ~uiPixmap()
BufferStringSet
Set of BufferString objects.
Definition: bufstringset.h:26
uiPixmap::fillGradient
void fillGradient(const Color &col1, const Color &col2, bool hor)
uiPixmap::source
const char * source() const
Definition: uipixmap.h:61
mExpClass
#define mExpClass(module)
Definition: commondefs.h:177
namedobj.h
getImageFormatDescs
void getImageFormatDescs(BufferStringSet &descs, bool forread, bool withprintformats=false)
uiPixmap::uiPixmap
uiPixmap(const char *xpm[])
uiPixmap::height
int height() const
ColTab::Sequence
Maps from [0,1] -> Color.
Definition: coltabsequence.h:37
uiPixmap::mQtclass
mQtclass(QPixmap *) qpixmap_
uiPixmap::uiPixmap
uiPixmap(const uiPixmap &)
uiPixmap::srcname_
BufferString srcname_
Definition: uipixmap.h:71
supportedImageFormats
void supportedImageFormats(BufferStringSet &, bool forread=false, bool withprintformats=false)
uiPixmap::uiPixmap
uiPixmap(int w, int h)
uiPixmap::width
int width() const
uiPixmap::uiPixmap
uiPixmap(const char *icon_identifier)
uiPixmap::isPresent
static bool isPresent(const char *)
uiPixmap::mQtclass
mQtclass(QPixmap *) qpixmap()
Definition: uipixmap.h:49
BufferString
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size.
Definition: bufstring.h:40
mQtclass
#define mQtclass(cls)
Definition: commondefs.h:234
mFDQtclass
mFDQtclass(QBitmap) mFDQtclass(QPaintDevice) mFDQtclass(QPixmap) class BufferStringSet
uiPixmap::fill
void fill(const Color &)
uiPixmap::isEmpty
bool isEmpty() const
uiPixmap::uiPixmap
uiPixmap()
Color
Color is an RGB color object, with a transparancy. The storage is in a 4-byte integer,...
Definition: color.h:26
uiPixmap::uiPixmap
uiPixmap(const mQtclass(QPixmap &))
uiPixmap::mQtclass
const mQtclass(QPixmap *) qpixmap() const
Definition: uipixmap.h:50
uiPixmap::fill
void fill(const ColTab::Sequence &, bool hor)

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