summaryrefslogtreecommitdiffstats
path: root/ksplashml/themeengine/standard/wndicon.h
blob: a47082ae617a127f5dc2a8598d5323441b1b9619 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
/***************************************************************************
 *   Copyright Brian Ledbetter 2001-2003 <brian@shadowcom.net>             *
 *   Copyright Ravikiran Rajagopal 2003                                    *
 *   ravi@ee.eng.ohio-state.edu                                            *
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License (version 2) as   *
 *   published by the Free Software Foundation. (The original KSplash/ML   *
 *   codebase (upto version 0.95.3) is BSD-licensed.)                      *
 *                                                                         *
 ***************************************************************************/

// This file exists for the convenience of other KDE headers. It may change between
// different versions of KDE, and may disappear altogether. Do NOT include this
// directly in your program. We mean it.


#ifndef __WNDICON_H__
#define __WNDICON_H__

#include <kpixmap.h>

#include <qhbox.h>

/**
 * @short Displays an icon on the screen.
 */
class WndIcon:
      public QHBox
{
  Q_OBJECT
public:

  enum Position
  {
    HBottomLeft = 0,
    HBottomRight = 1,
    HTopLeft = 2,
    HTopRight = 3,
    VBottomLeft = 10,
    VBottomRight = 11,
    VTopLeft = 12,
    VTopRight = 13
  };

  WndIcon( unsigned int, unsigned int, unsigned int, int, const KPixmap&, const QString&, Position, bool, bool );

signals:
  void setStatusText( const QString& );

public slots:
  void show();
  void noshow();
  void slotStopJumping();
  void slotJump();

private:
  QPoint determinePosition();

protected:
  QString mStatusText;
  Position mIconPos;
  int mXineramaScreen;
  int mPosX, mPosY, mGroundX, mGroundY;
  float mVelocity, mInitialVelocity, mGravity;
  int mIconNum, mStatusHeight, mIconSize;
  bool mStatusAtTop, mStopJump, mIconJumping;
};

#endif