summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordeva <deva>2005-10-25 15:00:16 +0000
committerdeva <deva>2005-10-25 15:00:16 +0000
commit0e3b67ab40dc002a08812ab95635614d84d71a82 (patch)
tree44fadf58cfd00fac9225c0a1206c07cb873386e5
parentc77b3d0043625d0be45b7b061904287b6b8992be (diff)
*** empty log message ***
-rw-r--r--ChangeLog11
-rw-r--r--configure.in2
-rw-r--r--etc/multicast.conf47
-rw-r--r--src/mainwindow.cc66
-rw-r--r--src/mainwindow.h8
5 files changed, 107 insertions, 27 deletions
diff --git a/ChangeLog b/ChangeLog
index 4f90acc..c7cd5ab 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,7 +2,16 @@
Changelog for MIaV
=======================================
-Oct XX 2005 - MIaV version 0.3.1
+Oct XX 2005 - MIaV version 0.3.2
+---------------------------------------
+New Features:
+ - Mute/Unmute button added to the gui.
+
+Bug Fixes:
+ - Font size of name label adjusted in mainwindow.
+
+=======================================
+Oct 19 2005 - MIaV version 0.3.1
---------------------------------------
New Features:
- Savestate are now used to move (or not) the files into the proper folder
diff --git a/configure.in b/configure.in
index 06a8073..301321b 100644
--- a/configure.in
+++ b/configure.in
@@ -1,6 +1,6 @@
# Filename: configure.in
AC_INIT(src/miav.cc)
-AM_INIT_AUTOMAKE( miav, 0.3.0 )
+AM_INIT_AUTOMAKE( miav, 0.3.2 )
AC_PROG_CXX
diff --git a/etc/multicast.conf b/etc/multicast.conf
new file mode 100644
index 0000000..9e9e067
--- /dev/null
+++ b/etc/multicast.conf
@@ -0,0 +1,47 @@
+#######################
+## Global settings
+## (If a setting is not defined in a client, these settings are inherited)
+##
+
+# Enable multicasting on a globally
+enabled = false
+
+# Multicast adress:
+# 224.0.0.1 All systems on this subnet
+# 224.0.0.2 All routers on this subnet
+# 224.0.0.5 OSPF routers
+# 224.0.0.6 OSPF designated routers
+# 224.0.0.12 DHCP server/relay agent
+address = "224.0.0.1"
+
+#######################
+## Client 1
+##
+
+# Client ip
+client = "192.168.0.10"
+
+# Multicast adress:
+# 224.0.0.1 All systems on this subnet
+# 224.0.0.2 All routers on this subnet
+# 224.0.0.5 OSPF routers
+# 224.0.0.6 OSPF designated routers
+# 224.0.0.12 DHCP server/relay agent
+address = "224.0.0.2"
+
+# Multicast port
+port=1234
+
+# Enable for this client (locally)
+enabled=yes
+
+#######################
+## Client 2
+##
+
+# Client ip
+client = "192.168.0.11"
+
+# Multicast port
+port=1235
+
diff --git a/src/mainwindow.cc b/src/mainwindow.cc
index e709fe8..555d3ab 100644
--- a/src/mainwindow.cc
+++ b/src/mainwindow.cc
@@ -82,6 +82,8 @@ MainWindow::MainWindow(QApplication *qApp, QWidget* parent, const char* name )
img_clear = loadButtonIcon( PIXMAP_CLEAR );
img_snapshot = loadButtonIcon( PIXMAP_SNAPSHOT );
img_logo = loadButtonIcon( PIXMAP_LOGO_SMALL, 1 );
+ img_mute = loadButtonIcon( PIXMAP_MUTE );
+ img_unmute = loadButtonIcon( PIXMAP_UNMUTE );
img_dummy = loadImage( PIXMAP_DUMMY );
@@ -106,6 +108,7 @@ MainWindow::MainWindow(QApplication *qApp, QWidget* parent, const char* name )
recording = false;
frozen = false;
+ muted = false;
info->log("MIaV is ready.");
@@ -157,29 +160,29 @@ void MainWindow::createGui()
{
// Layout widgets
- /* _________________________________________________
- *(0) __________________________ | ______________ |
- * | | | | | | | | |
- * |(1) | | | |(2) | |
- * | | | | | | | | |
- * | | | | | | | | |
- * | | | | | | |______________| |
- * | | | | | | | | |
- * | | | | | | | | |
- * | | | | | | | | |
- * | |________|________|________| | | | |
- * | | | | | | |______________| |
- * | |________|________|________| | | | |
- * | | | | | | | | |
- * | |________|________|________| | | | |
- * | | | | | | | | |
- * | |________|________|________| | |______________| |
- * |______________________________|__________________|
- * |______________________________|__________________|
+ /* __________________________________________________
+ *(0) ___________________________ | ______________ |
+ * | | | | | | | | | |
+ * |(1) | | | | |(2) | |
+ * | | | | | | | | | |
+ * | | | | | | | | | |
+ * | | | | | | | |______________| |
+ * | | | | | | | | | |
+ * | | | | | | | | | |
+ * | | | | | | | | | |
+ * | |______|______|______|______| | | | |
+ * | | | | | | | |______________| |
+ * | |______|______|______|______| | | | |
+ * | | | | | | | | | |
+ * | |______|______|______|______| | | | |
+ * | | | | | | | | | |
+ * | |______|______|______|______| | |______________| |
+ * |_______________________________|__________________|
+ * |_______________________________|__________________|
*/
QGridLayout *g0 = new QGridLayout(this, 2, 2, 0, -1);
- QGridLayout *g1 = new QGridLayout(3, 4, -1);
+ QGridLayout *g1 = new QGridLayout(4, 4, -1);
g0->addLayout(g1, 0, 0);
QGroupBox *gb = new QGroupBox(this);
@@ -211,22 +214,22 @@ void MainWindow::createGui()
img_live = new VideoWidget(img_recedge, camera);
img_live->setFixedSize(output_width - 20, output_height - 20);
img_live->move(10,10);
- g1->addMultiCellWidget ( img_recedge, 0, 0, 0, 2, Qt::AlignHCenter);
+ g1->addMultiCellWidget ( img_recedge, 0, 0, 0, 3, Qt::AlignHCenter);
// QObject::connect( img_live, SIGNAL(clicked()), this, SLOT(live_clicked()) );
// CPR/NAME LABEL + CPR button
lbl_cpr = createLabel("", output_width - (int)(BUTTON_WIDTH * unit), BUTTON_HEIGHT);
- g1->addMultiCellWidget ( lbl_cpr, 1, 1, 0, 1);
+ g1->addMultiCellWidget ( lbl_cpr, 1, 1, 0, 2);
btn_cpr = createButton("");
btn_cpr->setFocus();
btn_cpr->setPixmap(*img_cpr);
QObject::connect( btn_cpr, SIGNAL(clicked()), this, SLOT(cpr_clicked()) );
// Will also be connected in the MGUI code
- g1->addWidget(btn_cpr, 1, 2);
+ g1->addWidget(btn_cpr, 1, 3);
lbl_name = createLabel("", output_width, (int)(BUTTON_HEIGHT * 0.8f));
- g1->addMultiCellWidget ( lbl_name, 2, 2, 0, 2);
+ g1->addMultiCellWidget ( lbl_name, 2, 2, 0, 3);
/*
btn_clear = createButton("");
btn_clear->setPixmap(*img_clear);
@@ -250,6 +253,11 @@ void MainWindow::createGui()
QObject::connect( btn_freeze, SIGNAL(clicked()), this, SLOT(freeze_clicked()) );
g1->addWidget(btn_freeze, 3, 2);
+ btn_mute = createButton("");
+ btn_mute->setPixmap(*img_mute);
+ QObject::connect( btn_mute, SIGNAL(clicked()), this, SLOT(mute_clicked()) );
+ g1->addWidget(btn_mute, 3, 3);
+
// History widgets
int w = (int)((float)BUTTON_WIDTH * unit);
int h = (int)(576.0f / (720.0f / ((float)BUTTON_WIDTH * unit)));
@@ -316,7 +324,8 @@ QLabel *MainWindow::createLabel(char *caption, int width, int height)
{
QLabel *lbl = new QLabel(caption, this);
lbl->setFont( QFont( "Sans Serif",
- (height>1)?(int)(unit * height / 2):(int)(unit * height / 3),
+ //(height>1)?(int)(unit * height / 2):(int)(unit * height / 2),
+ (int)(unit * height / 2),
(height>1)?QFont::Bold:QFont::Normal ) );
lbl->setFixedHeight((int)(unit * height));
return lbl;
@@ -540,4 +549,11 @@ void MainWindow::freeze_clicked()
}
}
+void MainWindow::mute_clicked()
+{
+ muted = !muted;
+ if(muted) btn_mute->setPixmap(*img_unmute);
+ else btn_mute->setPixmap(*img_mute);
+}
+
#endif /*USE_GUI*/
diff --git a/src/mainwindow.h b/src/mainwindow.h
index 8f75aeb..617ac6b 100644
--- a/src/mainwindow.h
+++ b/src/mainwindow.h
@@ -77,6 +77,9 @@ Optagelsen standses ved tryk på den røde cirkel med gul streg over."
/**
* Images
*/
+#define PIXMAP_MUTE PIXMAPS"/mute.png"
+#define PIXMAP_UNMUTE PIXMAPS"/unmute.png"
+
#define PIXMAP_RECORD PIXMAPS"/record.png"
#define PIXMAP_STOP PIXMAPS"/stop.png"
@@ -108,6 +111,7 @@ public slots:
void redraw_edge();
void taskbar_update();
void about_clicked();
+ void mute_clicked();
private:
void clear();
@@ -131,6 +135,8 @@ private:
QImage *img_record;
QImage *img_stop;
QImage *img_logo;
+ QImage *img_mute;
+ QImage *img_unmute;
QImage *img_dummy;
@@ -155,6 +161,7 @@ private:
QPushButton *btn_rec;
QPushButton *btn_shoot;
QPushButton *btn_freeze;
+ QPushButton *btn_mute;
QPushButton *btn_about;
@@ -164,6 +171,7 @@ private:
bool recording;
bool frozen;
+ bool muted;
// Configuration values
float unit;