Skip to content

Commit

Permalink
Merge pull request #61 from g-maxime/hdr
Browse files Browse the repository at this point in the history
GUI: Allow to hide columns in technical table
  • Loading branch information
JeromeMartinez authored Oct 22, 2023
2 parents 206e9fd + b2ddf44 commit 11fe880
Show file tree
Hide file tree
Showing 5 changed files with 424 additions and 17 deletions.
4 changes: 4 additions & 0 deletions Source/GUI/Qt/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@
//---------------------------------------------------------------------------
int main(int argc, char *argv[])
{
QCoreApplication::setOrganizationDomain("mediaarea.net");
QCoreApplication::setOrganizationName("MediaArea.net");
QCoreApplication::setApplicationName("MOVMetaEdit");

QApplication a(argc, argv);
MainWindow w;

Expand Down
78 changes: 77 additions & 1 deletion Source/GUI/Qt/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,51 @@ MainWindow::MainWindow(QWidget *Parent) : QMainWindow(Parent), Ui(new Ui::MainWi
//Setup context menu
Context_Menu = new QMenu(this);
Context_Menu->addAction(Ui->Menu_File_Close);
//Context_Menu->actions.at(0)->setShortcut(QKeySequence());

//Setup tech view menu
QStringList HiddenColumns = QSettings().value("techtablewidget/hiddencolumns", QStringList()).toStringList();
Ui->Menu_View_Tech_Clef->setData((int)TechTableWidget::CLEF_COLUMN);
Ui->Menu_View_Tech_Clef->setChecked(!HiddenColumns.contains("clef"));
connect(Ui->Menu_View_Tech_Clef, SIGNAL(toggled(bool)), Ui->Tech_Table_Widget, SLOT(On_View_Option_Changed(bool)));
Ui->Menu_View_Tech_Prof->setData((int)TechTableWidget::PROF_COLUMN);
Ui->Menu_View_Tech_Prof->setChecked(!HiddenColumns.contains("prof"));
connect(Ui->Menu_View_Tech_Prof, SIGNAL(toggled(bool)), Ui->Tech_Table_Widget, SLOT(On_View_Option_Changed(bool)));
Ui->Menu_View_Tech_Enof->setData((int)TechTableWidget::ENOF_COLUMN);
Ui->Menu_View_Tech_Enof->setChecked(!HiddenColumns.contains("enof"));
connect(Ui->Menu_View_Tech_Enof, SIGNAL(toggled(bool)), Ui->Tech_Table_Widget, SLOT(On_View_Option_Changed(bool)));
Ui->Menu_View_Tech_Pasp->setData((int)TechTableWidget::PASP_COLUMN);
Ui->Menu_View_Tech_Pasp->setChecked(!HiddenColumns.contains("pasp"));
connect(Ui->Menu_View_Tech_Pasp, SIGNAL(toggled(bool)), Ui->Tech_Table_Widget, SLOT(On_View_Option_Changed(bool)));
Ui->Menu_View_Tech_Wscl->setData((int)TechTableWidget::WSCL_COLUMN);
Ui->Menu_View_Tech_Wscl->setChecked(!HiddenColumns.contains("wscl"));
connect(Ui->Menu_View_Tech_Wscl, SIGNAL(toggled(bool)), Ui->Tech_Table_Widget, SLOT(On_View_Option_Changed(bool)));
Ui->Menu_View_Tech_Fiel->setData((int)TechTableWidget::FIEL_COLUMN);
Ui->Menu_View_Tech_Fiel->setChecked(!HiddenColumns.contains("fiel"));
connect(Ui->Menu_View_Tech_Fiel, SIGNAL(toggled(bool)), Ui->Tech_Table_Widget, SLOT(On_View_Option_Changed(bool)));
Ui->Menu_View_Tech_Colr->setData((int)TechTableWidget::COLR_COLUMN);
Ui->Menu_View_Tech_Colr->setChecked(!HiddenColumns.contains("colr"));
connect(Ui->Menu_View_Tech_Colr, SIGNAL(toggled(bool)), Ui->Tech_Table_Widget, SLOT(On_View_Option_Changed(bool)));
Ui->Menu_View_Tech_Gama->setData((int)TechTableWidget::GAMA_COLUMN);
Ui->Menu_View_Tech_Gama->setChecked(!HiddenColumns.contains("gama"));
connect(Ui->Menu_View_Tech_Gama, SIGNAL(toggled(bool)), Ui->Tech_Table_Widget, SLOT(On_View_Option_Changed(bool)));
Ui->Menu_View_Tech_Clap->setData((int)TechTableWidget::CLAP_COLUMN);
Ui->Menu_View_Tech_Clap->setChecked(!HiddenColumns.contains("clap"));
connect(Ui->Menu_View_Tech_Clap, SIGNAL(toggled(bool)), Ui->Tech_Table_Widget, SLOT(On_View_Option_Changed(bool)));
Ui->Menu_View_Tech_Dpri->setData((int)TechTableWidget::DPRI_COLUMN);
Ui->Menu_View_Tech_Dpri->setChecked(!HiddenColumns.contains("dpri"));
connect(Ui->Menu_View_Tech_Dpri, SIGNAL(toggled(bool)), Ui->Tech_Table_Widget, SLOT(On_View_Option_Changed(bool)));
Ui->Menu_View_Tech_Dlum->setData((int)TechTableWidget::DLUM_COLUMN);
Ui->Menu_View_Tech_Dlum->setChecked(!HiddenColumns.contains("dlum"));
connect(Ui->Menu_View_Tech_Dlum, SIGNAL(toggled(bool)), Ui->Tech_Table_Widget, SLOT(On_View_Option_Changed(bool)));
Ui->Menu_View_Tech_Mcll->setData((int)TechTableWidget::MCLL_COLUMN);
Ui->Menu_View_Tech_Mcll->setChecked(!HiddenColumns.contains("mcll"));
connect(Ui->Menu_View_Tech_Mcll, SIGNAL(toggled(bool)), Ui->Tech_Table_Widget, SLOT(On_View_Option_Changed(bool)));
Ui->Menu_View_Tech_Mfal->setData((int)TechTableWidget::MFAL_COLUMN);
Ui->Menu_View_Tech_Mfal->setChecked(!HiddenColumns.contains("mfal"));
connect(Ui->Menu_View_Tech_Mfal, SIGNAL(toggled(bool)), Ui->Tech_Table_Widget, SLOT(On_View_Option_Changed(bool)));
Ui->Menu_View_Tech_Chan->setData((int)TechTableWidget::CHAN_COLUMN);
Ui->Menu_View_Tech_Chan->setChecked(!HiddenColumns.contains("chan"));
connect(Ui->Menu_View_Tech_Chan, SIGNAL(toggled(bool)), Ui->Tech_Table_Widget, SLOT(On_View_Option_Changed(bool)));

connect(Ui->Tech_Table_Widget, SIGNAL(customContextMenuRequested(const QPoint&)),
this, SLOT(Show_Context_Menu(const QPoint&)));
Expand Down Expand Up @@ -284,6 +328,22 @@ void MainWindow::on_Menu_View_Technical_triggered()
{
if (Ui->StackedWidget->currentIndex()!=0) //TODO: use enum
{
Ui->Menu_View_Tech_Separator->setVisible(true);
Ui->Menu_View_Tech_Clef->setVisible(true);
Ui->Menu_View_Tech_Prof->setVisible(true);
Ui->Menu_View_Tech_Enof->setVisible(true);
Ui->Menu_View_Tech_Pasp->setVisible(true);
Ui->Menu_View_Tech_Wscl->setVisible(true);
Ui->Menu_View_Tech_Fiel->setVisible(true);
Ui->Menu_View_Tech_Colr->setVisible(true);
Ui->Menu_View_Tech_Gama->setVisible(true);
Ui->Menu_View_Tech_Clap->setVisible(true);
Ui->Menu_View_Tech_Dpri->setVisible(true);
Ui->Menu_View_Tech_Dlum->setVisible(true);
Ui->Menu_View_Tech_Mcll->setVisible(true);
Ui->Menu_View_Tech_Mfal->setVisible(true);
Ui->Menu_View_Tech_Chan->setVisible(true);

Ui->StackedWidget->setCurrentIndex(0);
Ui->Table_Widget->clearSelection();
}
Expand All @@ -294,6 +354,22 @@ void MainWindow::on_Menu_View_AdId_triggered()
{
if (Ui->StackedWidget->currentIndex()!=1) //TODO: use enum
{
Ui->Menu_View_Tech_Separator->setVisible(false);
Ui->Menu_View_Tech_Clef->setVisible(false);
Ui->Menu_View_Tech_Prof->setVisible(false);
Ui->Menu_View_Tech_Enof->setVisible(false);
Ui->Menu_View_Tech_Pasp->setVisible(false);
Ui->Menu_View_Tech_Wscl->setVisible(false);
Ui->Menu_View_Tech_Fiel->setVisible(false);
Ui->Menu_View_Tech_Colr->setVisible(false);
Ui->Menu_View_Tech_Gama->setVisible(false);
Ui->Menu_View_Tech_Clap->setVisible(false);
Ui->Menu_View_Tech_Dpri->setVisible(false);
Ui->Menu_View_Tech_Dlum->setVisible(false);
Ui->Menu_View_Tech_Mcll->setVisible(false);
Ui->Menu_View_Tech_Mfal->setVisible(false);
Ui->Menu_View_Tech_Chan->setVisible(false);

Ui->StackedWidget->setCurrentIndex(1);
Ui->Tech_Table_Widget->clearSelection();
}
Expand Down
261 changes: 261 additions & 0 deletions Source/GUI/Qt/mainwindow.ui
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,21 @@
</property>
<addaction name="Menu_View_Technical"/>
<addaction name="Menu_View_AdId"/>
<addaction name="Menu_View_Tech_Separator"/>
<addaction name="Menu_View_Tech_Clef"/>
<addaction name="Menu_View_Tech_Prof"/>
<addaction name="Menu_View_Tech_Enof"/>
<addaction name="Menu_View_Tech_Pasp"/>
<addaction name="Menu_View_Tech_Wscl"/>
<addaction name="Menu_View_Tech_Fiel"/>
<addaction name="Menu_View_Tech_Colr"/>
<addaction name="Menu_View_Tech_Gama"/>
<addaction name="Menu_View_Tech_Clap"/>
<addaction name="Menu_View_Tech_Dpri"/>
<addaction name="Menu_View_Tech_Dlum"/>
<addaction name="Menu_View_Tech_Mcll"/>
<addaction name="Menu_View_Tech_Mfal"/>
<addaction name="Menu_View_Tech_Chan"/>
</widget>
<widget class="QMenu" name="Menu_Help">
<property name="title">
Expand Down Expand Up @@ -385,6 +400,252 @@
<bool>false</bool>
</property>
</action>
<action name="Menu_View_Tech_Separator">
<property name="separator">
<bool>true</bool>
</property>
<property name="visible">
<bool>true</bool>
</property>
</action>
<action name="Menu_View_Tech_Clef">
<property name="checkable">
<bool>true</bool>
</property>
<property name="checked">
<bool>true</bool>
</property>
<property name="text">
<string>Clean Ap.</string>
</property>
<property name="toolTip">
<string>Show clean aperture column</string>
</property>
<property name="visible">
<bool>true</bool>
</property>
</action>
<action name="Menu_View_Tech_Prof">
<property name="checkable">
<bool>true</bool>
</property>
<property name="checked">
<bool>true</bool>
</property>
<property name="text">
<string>Prod Ap.</string>
</property>
<property name="toolTip">
<string>Show production aperture column</string>
</property>
<property name="visible">
<bool>true</bool>
</property>
</action>
<action name="Menu_View_Tech_Enof">
<property name="checkable">
<bool>true</bool>
</property>
<property name="checked">
<bool>true</bool>
</property>
<property name="text">
<string>Enc. Ap.</string>
</property>
<property name="toolTip">
<string>Show encoded pixels dimension column</string>
</property>
<property name="visible">
<bool>true</bool>
</property>
</action>
<action name="Menu_View_Tech_Pasp">
<property name="checkable">
<bool>true</bool>
</property>
<property name="checked">
<bool>true</bool>
</property>
<property name="text">
<string>PAR</string>
</property>
<property name="toolTip">
<string>Show PAR column</string>
</property>
<property name="visible">
<bool>true</bool>
</property>
</action>
<action name="Menu_View_Tech_Wscl">
<property name="checkable">
<bool>true</bool>
</property>
<property name="checked">
<bool>true</bool>
</property>
<property name="text">
<string>w-scale</string>
</property>
<property name="toolTip">
<string>Show width scale column</string>
</property>
<property name="visible">
<bool>true</bool>
</property>
</action>
<action name="Menu_View_Tech_Fiel">
<property name="checkable">
<bool>true</bool>
</property>
<property name="checked">
<bool>true</bool>
</property>
<property name="text">
<string>Field</string>
</property>
<property name="toolTip">
<string>Show field handling column</string>
</property>
<property name="visible">
<bool>true</bool>
</property>
</action>
<action name="Menu_View_Tech_Colr">
<property name="checkable">
<bool>true</bool>
</property>
<property name="checked">
<bool>true</bool>
</property>
<property name="text">
<string>Color</string>
</property>
<property name="toolTip">
<string>Show color column</string>
</property>
<property name="visible">
<bool>true</bool>
</property>
</action>
<action name="Menu_View_Tech_Gama">
<property name="checkable">
<bool>true</bool>
</property>
<property name="checked">
<bool>true</bool>
</property>
<property name="text">
<string>Gamma</string>
</property>
<property name="toolTip">
<string>Show gamma column</string>
</property>
<property name="visible">
<bool>true</bool>
</property>
</action>
<action name="Menu_View_Tech_Clap">
<property name="checkable">
<bool>true</bool>
</property>
<property name="checked">
<bool>true</bool>
</property>
<property name="text">
<string>Aperture</string>
</property>
<property name="toolTip">
<string>Show clean aperture column</string>
</property>
<property name="visible">
<bool>true</bool>
</property>
</action>
<action name="Menu_View_Tech_Dpri">
<property name="checkable">
<bool>true</bool>
</property>
<property name="checked">
<bool>true</bool>
</property>
<property name="text">
<string>Display Primaries</string>
</property>
<property name="toolTip">
<string>Show display primaries column</string>
</property>
<property name="visible">
<bool>true</bool>
</property>
</action>
<action name="Menu_View_Tech_Dlum">
<property name="checkable">
<bool>true</bool>
</property>
<property name="checked">
<bool>true</bool>
</property>
<property name="text">
<string>Luminance</string>
</property>
<property name="toolTip">
<string>Show luminance column</string>
</property>
<property name="visible">
<bool>true</bool>
</property>
</action>
<action name="Menu_View_Tech_Mcll">
<property name="checkable">
<bool>true</bool>
</property>
<property name="checked">
<bool>true</bool>
</property>
<property name="text">
<string>Max. CLL</string>
</property>
<property name="toolTip">
<string>Show maximum content light level column</string>
</property>
<property name="visible">
<bool>true</bool>
</property>
</action>
<action name="Menu_View_Tech_Mfal">
<property name="checkable">
<bool>true</bool>
</property>
<property name="checked">
<bool>true</bool>
</property>
<property name="text">
<string>Max. FALL</string>
</property>
<property name="toolTip">
<string>Show maximum frame average light level column</string>
</property>
<property name="visible">
<bool>true</bool>
</property>
</action>
<action name="Menu_View_Tech_Chan">
<property name="checkable">
<bool>true</bool>
</property>
<property name="checked">
<bool>true</bool>
</property>
<property name="text">
<string>Chan</string>
</property>
<property name="toolTip">
<string>Show audio channels description labels column</string>
</property>
<property name="visible">
<bool>true</bool>
</property>
</action>
<actiongroup name="Menu_View_ActionGroup">
<action name="Menu_View_Technical">
<property name="checkable">
Expand Down
Loading

0 comments on commit 11fe880

Please sign in to comment.