Screwed up last import
This commit is contained in:
parent
beeaeb95b1
commit
2aac8ae0ae
4 changed files with 15 additions and 5 deletions
|
@ -1,8 +1,9 @@
|
|||
#include "MainWindow.h"
|
||||
#include "NumberDisplay.h"
|
||||
|
||||
NumberDisplay::NumberDisplay (QWidget *parent, uint w, uint startpx) : PixWidget (parent)
|
||||
NumberDisplay::NumberDisplay (QWidget *parent, TimeDisplay *td,uint w, uint startpx) : PixWidget (parent)
|
||||
{
|
||||
m_td = td;
|
||||
m_w = w;
|
||||
m_startpx = startpx;
|
||||
|
||||
|
@ -53,6 +54,8 @@ NumberDisplay::mousePressEvent (QMouseEvent *event)
|
|||
void
|
||||
NumberDisplay::mouseReleaseEvent (QMouseEvent *event)
|
||||
{
|
||||
// TimeDisplay *td = dynamic_cast<TimeDisplay *>(parent());
|
||||
emit clicked();
|
||||
m_td->drawMinus ();
|
||||
}
|
||||
|
||||
|
|
|
@ -1,13 +1,16 @@
|
|||
#ifndef __NUMBERDISPLAY_H__
|
||||
#define __NUMBERDISPLAY_H__
|
||||
|
||||
class TimeDisplay;
|
||||
|
||||
#include "PixWidget.h"
|
||||
//#include "TimeDisplay.h"
|
||||
|
||||
class NumberDisplay : public PixWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
NumberDisplay (QWidget *parent, uint, uint);
|
||||
NumberDisplay (QWidget *parent, TimeDisplay *td, uint, uint);
|
||||
~NumberDisplay ();
|
||||
|
||||
void setNumber (uint, uint);
|
||||
|
@ -23,6 +26,7 @@ class NumberDisplay : public PixWidget
|
|||
int m_w;
|
||||
int m_startpx;
|
||||
|
||||
TimeDisplay *m_td;
|
||||
uint m_n1;
|
||||
uint m_n2;
|
||||
};
|
||||
|
|
|
@ -24,9 +24,9 @@ TimeDisplay::TimeDisplay (QWidget *parent, int time) : PixWidget (parent)
|
|||
m_number_sec->move (78-37, 0);
|
||||
*/
|
||||
|
||||
m_number_min = new NumberDisplay (parent, 24, 0);
|
||||
m_number_min = new NumberDisplay (parent, this,24, 0);
|
||||
m_number_min->move (37+10, 26);
|
||||
m_number_sec = new NumberDisplay (parent, 24, 0);
|
||||
m_number_sec = new NumberDisplay (parent, this,24, 0);
|
||||
m_number_sec->move (78, 26);
|
||||
|
||||
connect (m_number_min, SIGNAL(clicked()), parent, SLOT(toggleTime()));
|
||||
|
@ -95,5 +95,6 @@ void
|
|||
TimeDisplay::mouseReleaseEvent (QMouseEvent *event)
|
||||
{
|
||||
emit clicked();
|
||||
drawMinus ();
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
#ifndef __TIMEDISPLAY_H__
|
||||
#define __TIMEDISPLAY_H__
|
||||
|
||||
class TimeDisplay;
|
||||
|
||||
#include "PixWidget.h"
|
||||
#include "NumberDisplay.h"
|
||||
|
||||
|
@ -11,6 +13,7 @@ class TimeDisplay : public PixWidget
|
|||
TimeDisplay (QWidget *parent, int time);
|
||||
~TimeDisplay ();
|
||||
void setTime (int);
|
||||
void drawMinus();
|
||||
public slots:
|
||||
void setPixmaps (Skin *skin);
|
||||
signals:
|
||||
|
@ -19,7 +22,6 @@ class TimeDisplay : public PixWidget
|
|||
protected:
|
||||
void mousePressEvent (QMouseEvent *event);
|
||||
void mouseReleaseEvent (QMouseEvent *event);
|
||||
void drawMinus();
|
||||
int m_time;
|
||||
NumberDisplay *m_number_min;
|
||||
NumberDisplay *m_number_sec;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue