summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-reader/infowin.cpp
Unidiff
Diffstat (limited to 'noncore/apps/opie-reader/infowin.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-reader/infowin.cpp54
1 files changed, 47 insertions, 7 deletions
diff --git a/noncore/apps/opie-reader/infowin.cpp b/noncore/apps/opie-reader/infowin.cpp
index c52a1f0..816a09f 100644
--- a/noncore/apps/opie-reader/infowin.cpp
+++ b/noncore/apps/opie-reader/infowin.cpp
@@ -1,12 +1,31 @@
1#include "infowin.h" 1#include "infowin.h"
2#include "version.h" 2#include "version.h"
3#include <stdio.h> 3#include <stdio.h>
4#include <qmultilineedit.h>
5#include <qlayout.h>
6#include <qpushbutton.h>
4#include "names.h" 7#include "names.h"
5 8
9void infowin::setAbout(const QString& _s)
10{
11 char vstr[128];
12 sprintf(vstr, PROGNAME " v%u.%u%c (%s) - A small e-text reader\n%s %s", MAJOR, BKMKTYPE, MINOR, RELEASE_TYPE, __DATE__, __TIME__);
13 // l = new QLabel(vstr, this);
14 QString c = vstr;
15 c += _s;
16 aboutbox->setText(c);
17}
18
6infowin::infowin( QWidget *parent, const char *name, WFlags f) : 19infowin::infowin( QWidget *parent, const char *name, WFlags f) :
7 QWidget(parent, name, f) 20 QWidget(parent, name, f)
8{ 21{
9 grid = new QGridLayout(this, 6, 2); 22 QVBoxLayout* vl = new QVBoxLayout(this);
23 aboutbox = new QMultiLineEdit(this);
24 aboutbox->setReadOnly(true);
25 aboutbox->setWordWrap(QMultiLineEdit::WidgetWidth);
26 //grid->addWidget(l, 5, 0);
27 vl->addWidget(aboutbox);
28 QGridLayout* grid = new QGridLayout(vl, 10, 2);
10 QLabel* l; 29 QLabel* l;
11 l = new QLabel("Compressed file size", this); 30 l = new QLabel("Compressed file size", this);
12 grid->addWidget(l, 0, 0); 31 grid->addWidget(l, 0, 0);
@@ -28,16 +47,37 @@ infowin::infowin( QWidget *parent, const char *name, WFlags f) :
28 location = new QLabel("0", this); 47 location = new QLabel("0", this);
29 location->setAlignment( AlignVCenter | AlignRight ); 48 location->setAlignment( AlignVCenter | AlignRight );
30 grid->addWidget(location, 3, 1); 49 grid->addWidget(location, 3, 1);
31 l = new QLabel("Per centage read", this); 50 l = new QLabel("Per centage read (file)", this);
32 grid->addWidget(l, 4, 0); 51 grid->addWidget(l, 4, 0);
33 read = new QLabel("0", this); 52 read = new QLabel("0", this);
34 read->setAlignment( AlignVCenter | AlignRight ); 53 read->setAlignment( AlignVCenter | AlignRight );
35 grid->addWidget(read, 4, 1); 54 grid->addWidget(read, 4, 1);
36 char vstr[128]; 55
37 sprintf(vstr, PROGNAME " v%u.%u%c (%s)\nA small e-text reader", MAJOR, BKMKTYPE, MINOR, RELEASE_TYPE); 56 l = new QLabel("Document Size", this);
38 l = new QLabel(vstr, this);
39 grid->addWidget(l, 5, 0); 57 grid->addWidget(l, 5, 0);
58 docSize = new QLabel("0", this);
59 docSize->setAlignment( AlignVCenter | AlignRight );
60 grid->addWidget(docSize, 5, 1);
61
62 l = new QLabel("Document Location", this);
63 grid->addWidget(l, 6, 0);
64 docLocation = new QLabel("0", this);
65 docLocation->setAlignment( AlignVCenter | AlignRight );
66 grid->addWidget(docLocation, 6, 1);
67
68 l = new QLabel("Per centage read (doc)", this);
69 grid->addWidget(l, 7, 0);
70 docread = new QLabel("0", this);
71 docread->setAlignment( AlignVCenter | AlignRight );
72 grid->addWidget(docread, 7, 1);
73
74
75 l = new QLabel("Zoom", this);
76 grid->addWidget(l, 8, 0);
77 zoom = new QLabel("0", this);
78 zoom->setAlignment( AlignVCenter | AlignRight );
79 grid->addWidget(zoom, 8, 1);
40 QPushButton* exitbutton = new QPushButton("Cancel", this); 80 QPushButton* exitbutton = new QPushButton("Cancel", this);
41 connect( exitbutton, SIGNAL( released() ), this, SLOT( infoClose() ) ); 81 connect( exitbutton, SIGNAL( clicked() ), this, SLOT( infoClose() ) );
42 grid->addWidget(exitbutton, 5, 1); 82 grid->addWidget(exitbutton, 9, 1);
43} 83}