Skip to content

Commit

Permalink
updated saving state interface
Browse files Browse the repository at this point in the history
  • Loading branch information
jaredmales committed May 2, 2024
1 parent 74570c9 commit 58e59e3
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 3 deletions.
7 changes: 7 additions & 0 deletions src/rtimvInterfaces.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,13 @@
namespace rtimv
{

/// States to indicated whether or not data are being saved
enum class savingState{ on, ///< images are not being saved
waiting, ///< the next image will be saved
off ///< images are being saved
};


/// Warning levels used to change colors
/**
* \todo put this in an rtimv.hpp file. Or, maybe, rtimvInterfaces.hpp should be rtimv.hpp
Expand Down
10 changes: 8 additions & 2 deletions src/rtimvMainWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1926,13 +1926,18 @@ void rtimvMainWindow::setTarget()
}
}

void rtimvMainWindow::savingState(bool ss)
void rtimvMainWindow::savingState(rtimv::savingState ss)
{
if(ss)
if(ss == rtimv::savingState::on)
{
ui.graphicsView->saveBoxFontColor("lightgreen");
ui.graphicsView->m_saveBox->setText("S");
}
else if(ss == rtimv::savingState::waiting)
{
ui.graphicsView->saveBoxFontColor("yellow");
ui.graphicsView->m_saveBox->setText("S");
}
else
{
ui.graphicsView->saveBoxFontColor("red");
Expand Down Expand Up @@ -2603,6 +2608,7 @@ void rtimvMainWindow::borderWarningLevel(rtimv::warningLevel lvl)
{
ui.graphicsView->setStyleSheet("#graphicsView {border: 0px solid black}");
int w=width();
//std::cerr << "width: " << w << "\n";
resize(w+1, height());
resize(w,height());
}
Expand Down
12 changes: 11 additions & 1 deletion src/rtimvMainWindow.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ using namespace mx::app;
#define ViewViewNoImage 1
#define ViewViewModeMax 2





class rtimvControlPanel;

class rtimvMainWindow : public rtimvBase, public application
Expand Down Expand Up @@ -589,7 +593,13 @@ public slots:
/// Called when a user line is selected
void userLineDeSelected(StretchLine *sl /**< [in] The StretchLine to update*/);

void savingState(bool ss);
/** Set the saving indicator
* Possible stats are:
* - rtimv::savingState::off images are not being saved
* - rtimv::savingState::waiting the next image will be saved
* - rtimv::savingState::on images are being saved
*/
void savingState(rtimv::savingState ss);

public:

Expand Down

0 comments on commit 58e59e3

Please sign in to comment.