blob: 9ddce3648e2afea929a307ad19d48bb47bf45223 (
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
|
#ifndef __INFOWIN_H
#define __INFOWIN_H
#include <qlayout.h>
#include <qpushbutton.h>
#include <qgrid.h>
#include <qlabel.h>
class infowin : public QWidget
{
Q_OBJECT
QLabel* fileSize;
QLabel* textSize;
QLabel* ratio;
QLabel* location;
QLabel* read;
QGridLayout* grid;
public:
infowin::infowin( QWidget *parent=0, const char *name=0, WFlags f = 0);
/*
void addcancel(QPushButton* exitbutton)
{
grid->addWidget(exitbutton, 5, 1);
}
*/
void setFileSize(int sz) { fileSize->setNum(sz); }
void setTextSize(int sz) { textSize->setNum(sz); }
void setRatio(int sz) { ratio->setText(QString().setNum(sz)+"%"); }
void setLocation(int sz) { location->setNum(sz); }
void setRead(int sz) { read->setText(QString().setNum(sz)+"%"); }
/*
virtual void keyPressEvent(QKeyEvent* e)
{
printf("Received:%d\n", e->key());
switch (e->key())
{
case Key_Escape:
e->accept();
emit Close();
break;
default:
e->ignore();
}
}
*/
private slots:
void infoClose() { emit Close(); }
signals:
void Close();
};
#endif
|