summaryrefslogtreecommitdiffstats
path: root/src/app/adjustSizeButton.h
blob: 6eed27c3ef63c540531fff66739fbe058d0518b4 (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
// (C) 2005 Max Howell ([email protected])
// See COPYING file for licensing information

#ifndef CODEINE_ADJUST_SIZE_BUTTON_H
#define CODEINE_ADJUST_SIZE_BUTTON_H

#include <qframe.h>

namespace Codeine
{
   class AdjustSizeButton : public QFrame
   {
      int m_counter;
      int m_stage;
      int m_offset;
      int m_timerId;

      QWidget *m_preferred;
      QWidget *m_oneToOne;

      QFrame *m_thingy;

   public:
      AdjustSizeButton( QWidget *parent );

   private:
      virtual void timerEvent( QTimerEvent* );
      virtual bool eventFilter( QObject*, QEvent* );

      inline void move()
      {
         QWidget::move( parentWidget()->width() - width(), parentWidget()->height() - m_offset );
      }
   };
}

#endif