libyui-qt
YQAlignment.h
1 /*
2  Copyright (C) 2000-2012 Novell, Inc
3  This library is free software; you can redistribute it and/or modify
4  it under the terms of the GNU Lesser General Public License as
5  published by the Free Software Foundation; either version 2.1 of the
6  License, or (at your option) version 3.0 of the License. This library
7  is distributed in the hope that it will be useful, but WITHOUT ANY
8  WARRANTY; without even the implied warranty of MERCHANTABILITY or
9  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
10  License for more details. You should have received a copy of the GNU
11  Lesser General Public License along with this library; if not, write
12  to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
13  Floor, Boston, MA 02110-1301 USA
14 */
15 
16 
17 /*-/
18 
19  File: YQAlignment.h
20 
21  Author: Stefan Hundhammer <shundhammer@suse.de>
22 
23 /-*/
24 
25 
26 #ifndef YQAlignment_h
27 #define YQAlignment_h
28 
29 #include <qwidget.h>
30 
31 #include <yui/YAlignment.h>
32 
33 class QWidget;
34 
35 class YQAlignment : public QWidget, public YAlignment
36 {
37  Q_OBJECT
38 
39 public:
40 
44  YQAlignment( YWidget * parent,
45  YAlignmentType horAlign,
46  YAlignmentType vertAlign );
47 
56  YQAlignment( YWidget * yParent,
57  QWidget * qParent,
58  YAlignmentType horAlign,
59  YAlignmentType vertAlign );
60 
66  virtual void moveChild( YWidget * child, int newX, int newY );
67 
73  virtual void setEnabled( bool enabled );
74 
80  virtual void setSize( int newWidth, int newHeight );
81 
87  virtual void setBackgroundPixmap( const std::string & pixmapFileName );
88 
89 protected:
90  std::string _pixmapFileName;
91  virtual void paintEvent ( QPaintEvent * event );
92 
93 };
94 
95 
96 #endif // YQAlignment_h
Definition: YQAlignment.h:35
virtual void setBackgroundPixmap(const std::string &pixmapFileName)
Definition: YQAlignment.cc:86
virtual void setEnabled(bool enabled)
Definition: YQAlignment.cc:56
virtual void moveChild(YWidget *child, int newX, int newY)
Definition: YQAlignment.cc:63
YQAlignment(YWidget *parent, YAlignmentType horAlign, YAlignmentType vertAlign)
Definition: YQAlignment.cc:35
virtual void setSize(int newWidth, int newHeight)
Definition: YQAlignment.cc:70