Skip to content

Commit

Permalink
Menu entry update on camera or file view open
Browse files Browse the repository at this point in the history
About window updated.
  • Loading branch information
Asitha committed Dec 18, 2013
1 parent 0941b4f commit 4b1fa76
Show file tree
Hide file tree
Showing 8 changed files with 37 additions and 30 deletions.
17 changes: 0 additions & 17 deletions NoobaFE/CameraView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -419,23 +419,6 @@ void CameraView::resizeEvent(QResizeEvent *event)
ui->mdiArea->tileSubWindows();
}

QImage CameraView::cvt2QImage(const Mat &cvImg)
{
QImage img;
if(cvImg.channels() == 1)
{
img = QImage((const unsigned char*)(cvImg.data),
cvImg.cols,cvImg.rows,cvImg.step, QImage::Format_Indexed8);
}
else
{
img = QImage((const unsigned char*)(cvImg.data),
cvImg.cols,cvImg.rows,cvImg.step, QImage::Format_RGB888);

}
return img;
}

void CameraView::setVideoState(nooba::VideoState state)
{
switch(state){
Expand Down
6 changes: 0 additions & 6 deletions NoobaFE/CameraView.h
Original file line number Diff line number Diff line change
Expand Up @@ -96,12 +96,6 @@ private slots:
FrameViewer* _frameViewer;
};

/*
\brief get a color QImage from cv::Mat
\return QImage with three color channels
*/
inline QImage cvt2QImage(const cv::Mat &cvImg);

/*
* Updates the current video state
* \param state
Expand Down
25 changes: 23 additions & 2 deletions NoobaFE/Forms/OutputWind.ui
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,18 @@
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<property name="leftMargin">
<number>3</number>
</property>
<property name="topMargin">
<number>3</number>
</property>
<property name="rightMargin">
<number>3</number>
</property>
<property name="bottomMargin">
<number>3</number>
</property>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
Expand All @@ -52,16 +64,25 @@
</item>
<item>
<widget class="QPushButton" name="pushButton">
<property name="toolTip">
<string>Clear Output</string>
</property>
<property name="text">
<string>Clear</string>
<string/>
</property>
<property name="icon">
<iconset resource="../Resources/mainwind.qrc">
<normaloff>:/Resources/clear.png</normaloff>:/Resources/clear.png</iconset>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
<resources/>
<resources>
<include location="../Resources/mainwind.qrc"/>
</resources>
<connections>
<connection>
<sender>pushButton</sender>
Expand Down
18 changes: 13 additions & 5 deletions NoobaFE/MainWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ void MainWindow::onMdiSubWindowActivated(QMdiSubWindow *subWindow)

void MainWindow::onCamViewClose()
{
if(ui->mdiArea->subWindowList().count() == 1) // 1 is goint to close. so disable menus
if(ui->mdiArea->subWindowList().count() == 0) // 1 is goint to close. so disable menus
enableMenuItems(false);
}

Expand Down Expand Up @@ -277,11 +277,18 @@ void MainWindow::onPluginAct_triggerred()

void MainWindow::on_actionAbout_NoobaVSS_triggered()
{
QString arch;
#if defined(Q_PROCESSOR_X86_32)
arch = "32 bit";
#elif defined(Q_PROCESSOR_X86_64)
arch = "64 bit";
#endif

QMessageBox::about(this, "About NoobaVSS",
QString("<h2 style=\"font-family:sans-serif;\" >NoobaVSS %1.%2 </h2>"
"<p>Nooba Plugin API version %3.%4</p>"
"<p>Using OpenCV %5.%6 and Qt %7</p>"
"<p>Built on %8</p>"
QString("<h2 style=\"font-family:sans-serif;\" >NoobaVSS %1.%2 (%3)</h2>"
"<p>Nooba Plugin API version %4.%5</p>"
"<p>Using OpenCV %6.%7 and Qt %8</p>"
"<p>Built on %9</p>"
"<p>Copyright (C) 2014 by the Nooba team. All rights reserved.</p>"
"<p><b>NoobaVSS</b> is free software: you can redistribute it and/or modify "
"it under the terms of the GNU General Public License as published by "
Expand All @@ -291,6 +298,7 @@ void MainWindow::on_actionAbout_NoobaVSS_triggered()
" but <b>WITHOUT ANY WARRANTY;</b> without even the implied warranty of"
" <b>MERCHANTABILITY</b> or <b>FITNESS FOR A PARTICULAR PURPOSE.</b></p>")
.arg(nooba::MajorVersion).arg(nooba::MinorVersion)
.arg(arch)
.arg(API_MAJOR_VERSION).arg(API_MINOR_VERSION)
.arg(CV_MAJOR_VERSION).arg(CV_MINOR_VERSION)
.arg(QT_VERSION_STR)
Expand Down
Binary file added NoobaFE/Resources/add.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added NoobaFE/Resources/clear.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions NoobaFE/Resources/mainwind.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@
<file>show_hide.png</file>
<file>Nooba_logo.png</file>
<file>Nooba_logo.ico</file>
<file>clear.png</file>
</qresource>
</RCC>
Binary file added NoobaFE/Resources/remove.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 4b1fa76

Please sign in to comment.