From 73253e93327cf4ef0932de1b4afb56af22a0f37e Mon Sep 17 00:00:00 2001 From: pohly Date: Tue, 24 Aug 2004 20:52:45 +0000 Subject: updated source to opie-reader 0.7g --- (limited to 'noncore/apps/opie-reader/infowin.cpp') 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 @@ #include "infowin.h" #include "version.h" #include +#include +#include +#include #include "names.h" +void infowin::setAbout(const QString& _s) +{ + char vstr[128]; + sprintf(vstr, PROGNAME " v%u.%u%c (%s) - A small e-text reader\n%s %s", MAJOR, BKMKTYPE, MINOR, RELEASE_TYPE, __DATE__, __TIME__); + // l = new QLabel(vstr, this); + QString c = vstr; + c += _s; + aboutbox->setText(c); +} + infowin::infowin( QWidget *parent, const char *name, WFlags f) : QWidget(parent, name, f) { - grid = new QGridLayout(this, 6, 2); + QVBoxLayout* vl = new QVBoxLayout(this); + aboutbox = new QMultiLineEdit(this); + aboutbox->setReadOnly(true); + aboutbox->setWordWrap(QMultiLineEdit::WidgetWidth); + //grid->addWidget(l, 5, 0); + vl->addWidget(aboutbox); + QGridLayout* grid = new QGridLayout(vl, 10, 2); QLabel* l; l = new QLabel("Compressed file size", this); grid->addWidget(l, 0, 0); @@ -28,16 +47,37 @@ infowin::infowin( QWidget *parent, const char *name, WFlags f) : location = new QLabel("0", this); location->setAlignment( AlignVCenter | AlignRight ); grid->addWidget(location, 3, 1); - l = new QLabel("Per centage read", this); + l = new QLabel("Per centage read (file)", this); grid->addWidget(l, 4, 0); read = new QLabel("0", this); read->setAlignment( AlignVCenter | AlignRight ); grid->addWidget(read, 4, 1); - char vstr[128]; - sprintf(vstr, PROGNAME " v%u.%u%c (%s)\nA small e-text reader", MAJOR, BKMKTYPE, MINOR, RELEASE_TYPE); - l = new QLabel(vstr, this); + + l = new QLabel("Document Size", this); grid->addWidget(l, 5, 0); + docSize = new QLabel("0", this); + docSize->setAlignment( AlignVCenter | AlignRight ); + grid->addWidget(docSize, 5, 1); + + l = new QLabel("Document Location", this); + grid->addWidget(l, 6, 0); + docLocation = new QLabel("0", this); + docLocation->setAlignment( AlignVCenter | AlignRight ); + grid->addWidget(docLocation, 6, 1); + + l = new QLabel("Per centage read (doc)", this); + grid->addWidget(l, 7, 0); + docread = new QLabel("0", this); + docread->setAlignment( AlignVCenter | AlignRight ); + grid->addWidget(docread, 7, 1); + + + l = new QLabel("Zoom", this); + grid->addWidget(l, 8, 0); + zoom = new QLabel("0", this); + zoom->setAlignment( AlignVCenter | AlignRight ); + grid->addWidget(zoom, 8, 1); QPushButton* exitbutton = new QPushButton("Cancel", this); - connect( exitbutton, SIGNAL( released() ), this, SLOT( infoClose() ) ); - grid->addWidget(exitbutton, 5, 1); + connect( exitbutton, SIGNAL( clicked() ), this, SLOT( infoClose() ) ); + grid->addWidget(exitbutton, 9, 1); } -- cgit v0.9.0.2