diff options
| author | deva <deva> | 2005-11-25 21:52:29 +0000 | 
|---|---|---|
| committer | deva <deva> | 2005-11-25 21:52:29 +0000 | 
| commit | 3ed6455c3166079d9b8fc1653b307b3c8349055d (patch) | |
| tree | 09f03ac122b8a48ac02b2250c561618669728137 | |
| parent | 42edda012a460e1bb69173f9c5a3c2bd55176149 (diff) | |
*** empty log message ***
| -rw-r--r-- | TODO | 54 | ||||
| -rw-r--r-- | src/mainwindow.cc | 4 | ||||
| -rw-r--r-- | src/mainwindow.h | 2 | ||||
| -rw-r--r-- | src/messagebox.cc | 20 | ||||
| -rw-r--r-- | src/messagebox.h | 1 | 
5 files changed, 75 insertions, 6 deletions
| @@ -228,3 +228,57 @@ A cron job examines this folder regularly (test how often).  If a file has been here for more than a week, the administrator is contacted by  email. +===================== + Multiple recordings +===================== +Definitions: +Camera +	Decoder - "input" (global) +	Transmitter - "network connection" (one pr. session) +		Buffer +	Player - "output" (global) + +Implementations: +Camera { +	set active transmitter to NULL +	start decoder +	start player +} + +Camera::start(cpr) { +	start transmitter +	set active transmitter to the new transmitter +} + +Camera::stop { +	tell transmitter that the last frame has been read +	set active transmitter to NULL +} + + +Decoder { +	while(!done) { +		read frame +		push it to the player +		push it to the active transmitter +	} +} + +Transmitter(cpr) { +	connect +	while(!last frame read && !queue empty) { +		send frame over the network +	} +	disconnect +} + +Player { +	while(!done) { +		show frame +	} +} + +Frame { +	properties: +		flags; (FREEZE, SNAPSHOT, SAVESTATE) +}
\ No newline at end of file diff --git a/src/mainwindow.cc b/src/mainwindow.cc index 9f2197a..5e64a75 100644 --- a/src/mainwindow.cc +++ b/src/mainwindow.cc @@ -319,7 +319,7 @@ void MainWindow::createGui()  QPushButton *MainWindow::createButton(char *caption, int width, int height)  { -  return createButton(caption, this, width, height); +  return createButton(caption, this);//, width, height);  } @@ -328,7 +328,7 @@ QPushButton *MainWindow::createButton(char *caption, QWidget *parent, int width,    QPushButton *btn = new QPushButton(caption, parent);    btn->setFont( QFont( "Sans Serif", (int)(unit * height / 2), QFont::Bold ) );    btn->setFixedHeight((int)(unit * height)); -  btn->setFixedWidth((int)(unit * width)); +  //  btn->setFixedWidth((int)(unit * width));    return btn;  } diff --git a/src/mainwindow.h b/src/mainwindow.h index e95933d..2ac7d82 100644 --- a/src/mainwindow.h +++ b/src/mainwindow.h @@ -55,7 +55,7 @@ using namespace std;   */  //#define NUM_HISTORY 3 // moved to a genuine variable  // Button sizes in cm (metric) -#define BUTTON_WIDTH 8 +#define BUTTON_WIDTH 7  #define BUTTON_HEIGHT 2  #define HISTORY_LIST_MARGIN 25 diff --git a/src/messagebox.cc b/src/messagebox.cc index df0e813..fd812eb 100644 --- a/src/messagebox.cc +++ b/src/messagebox.cc @@ -27,6 +27,10 @@  #include <config.h>  #ifdef USE_GUI  #include "messagebox.h" +#include "miav_config.h" + +// For button sizes! +#include "mainwindow.h"  ////////////////////////////////////////////////////////////////////////////////////////  /* If the cpr input by the user is not valid, this dialog @@ -41,6 +45,11 @@ MessageBox::MessageBox(QWidget* parent,                         msg_icon icon)  	: QDialog(parent, name, TRUE)  { +  int resolution_w = config->readInt("pixel_width"); +  //int resolution_h = config->readInt("pixel_height"); +  unit = ((float)resolution_w / config->readFloat("screensize")) / INCH_IN_CM; + +    setCaption(name);  	QFrame *topf = new QFrame(this);    topf->setFrameStyle(QFrame::Box | QFrame::Raised); @@ -99,7 +108,12 @@ MessageBox::MessageBox(QWidget* parent,  	QLabel *lbl_text = new QLabel(topf);  	lbl_text->setText(text); -	lbl_text->setFont(QFont("Arial", 18)); +  lbl_text->setFont( QFont( "Sans Serif",  +                       //(height>1)?(int)(unit * height / 2):(int)(unit * height / 2),  +                       (int)(unit * 0.7 * BUTTON_HEIGHT / 2),  +                       QFont::Normal ) ); +  lbl_text->setFixedHeight((int)(unit * BUTTON_HEIGHT)); +  //	lbl_text->setFont(QFont("Arial", 18));  	QFrame *f = new QFrame(topf);  	QVBoxLayout *blayout = new QVBoxLayout(topf, 20, 20); @@ -198,8 +212,8 @@ QPushButton *MessageBox::createButton(QWidget *parent, const char *text)  {  	QPushButton *q = new QPushButton(parent);  	q->setText(text); -	q->setFont(QFont("Arial", 18)); -	q->setFixedSize(200, 75); +  q->setFont( QFont( "Sans Serif", (int)(unit * 0.7 * BUTTON_HEIGHT / 2 ), QFont::Normal ) ); +	q->setFixedSize((int)(BUTTON_WIDTH * unit), (int)(BUTTON_HEIGHT * unit));  	return q;  } diff --git a/src/messagebox.h b/src/messagebox.h index c6786ca..30a8307 100644 --- a/src/messagebox.h +++ b/src/messagebox.h @@ -102,6 +102,7 @@ public slots:    void bmaybe_clicked();  private: +  float unit;    QPixmap *pix_icon;    QPushButton *createButton(QWidget *parent, const char *text);  }; | 
