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 "MainWindow.h"
|
||||||
#include "NumberDisplay.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_w = w;
|
||||||
m_startpx = startpx;
|
m_startpx = startpx;
|
||||||
|
|
||||||
|
@ -53,6 +54,8 @@ NumberDisplay::mousePressEvent (QMouseEvent *event)
|
||||||
void
|
void
|
||||||
NumberDisplay::mouseReleaseEvent (QMouseEvent *event)
|
NumberDisplay::mouseReleaseEvent (QMouseEvent *event)
|
||||||
{
|
{
|
||||||
|
// TimeDisplay *td = dynamic_cast<TimeDisplay *>(parent());
|
||||||
emit clicked();
|
emit clicked();
|
||||||
|
m_td->drawMinus ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,13 +1,16 @@
|
||||||
#ifndef __NUMBERDISPLAY_H__
|
#ifndef __NUMBERDISPLAY_H__
|
||||||
#define __NUMBERDISPLAY_H__
|
#define __NUMBERDISPLAY_H__
|
||||||
|
|
||||||
|
class TimeDisplay;
|
||||||
|
|
||||||
#include "PixWidget.h"
|
#include "PixWidget.h"
|
||||||
|
//#include "TimeDisplay.h"
|
||||||
|
|
||||||
class NumberDisplay : public PixWidget
|
class NumberDisplay : public PixWidget
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
NumberDisplay (QWidget *parent, uint, uint);
|
NumberDisplay (QWidget *parent, TimeDisplay *td, uint, uint);
|
||||||
~NumberDisplay ();
|
~NumberDisplay ();
|
||||||
|
|
||||||
void setNumber (uint, uint);
|
void setNumber (uint, uint);
|
||||||
|
@ -23,6 +26,7 @@ class NumberDisplay : public PixWidget
|
||||||
int m_w;
|
int m_w;
|
||||||
int m_startpx;
|
int m_startpx;
|
||||||
|
|
||||||
|
TimeDisplay *m_td;
|
||||||
uint m_n1;
|
uint m_n1;
|
||||||
uint m_n2;
|
uint m_n2;
|
||||||
};
|
};
|
||||||
|
|
|
@ -24,9 +24,9 @@ TimeDisplay::TimeDisplay (QWidget *parent, int time) : PixWidget (parent)
|
||||||
m_number_sec->move (78-37, 0);
|
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_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);
|
m_number_sec->move (78, 26);
|
||||||
|
|
||||||
connect (m_number_min, SIGNAL(clicked()), parent, SLOT(toggleTime()));
|
connect (m_number_min, SIGNAL(clicked()), parent, SLOT(toggleTime()));
|
||||||
|
@ -95,5 +95,6 @@ void
|
||||||
TimeDisplay::mouseReleaseEvent (QMouseEvent *event)
|
TimeDisplay::mouseReleaseEvent (QMouseEvent *event)
|
||||||
{
|
{
|
||||||
emit clicked();
|
emit clicked();
|
||||||
|
drawMinus ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
#ifndef __TIMEDISPLAY_H__
|
#ifndef __TIMEDISPLAY_H__
|
||||||
#define __TIMEDISPLAY_H__
|
#define __TIMEDISPLAY_H__
|
||||||
|
|
||||||
|
class TimeDisplay;
|
||||||
|
|
||||||
#include "PixWidget.h"
|
#include "PixWidget.h"
|
||||||
#include "NumberDisplay.h"
|
#include "NumberDisplay.h"
|
||||||
|
|
||||||
|
@ -11,6 +13,7 @@ class TimeDisplay : public PixWidget
|
||||||
TimeDisplay (QWidget *parent, int time);
|
TimeDisplay (QWidget *parent, int time);
|
||||||
~TimeDisplay ();
|
~TimeDisplay ();
|
||||||
void setTime (int);
|
void setTime (int);
|
||||||
|
void drawMinus();
|
||||||
public slots:
|
public slots:
|
||||||
void setPixmaps (Skin *skin);
|
void setPixmaps (Skin *skin);
|
||||||
signals:
|
signals:
|
||||||
|
@ -19,7 +22,6 @@ class TimeDisplay : public PixWidget
|
||||||
protected:
|
protected:
|
||||||
void mousePressEvent (QMouseEvent *event);
|
void mousePressEvent (QMouseEvent *event);
|
||||||
void mouseReleaseEvent (QMouseEvent *event);
|
void mouseReleaseEvent (QMouseEvent *event);
|
||||||
void drawMinus();
|
|
||||||
int m_time;
|
int m_time;
|
||||||
NumberDisplay *m_number_min;
|
NumberDisplay *m_number_min;
|
||||||
NumberDisplay *m_number_sec;
|
NumberDisplay *m_number_sec;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue