Commit 888d1f80 authored by js9's avatar js9
Browse files

GUI now starts with selected files hidden. This is controlled by

one flag in each of four constructors:
   QvisPreferencesWindow:  showSelFiles = false;
   QvisPlotManagerWidget:  sourceVisible = true;
   QvisFilePanel:          showSelectedFiles = false;
   QvisMainWindow:         advancedMenuShowing = false;
Toggle these to change back to the old way.



git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@8890 18c085ea-50e0-402c-830e-de6fd14e8384
parent cfc950ea
......@@ -244,13 +244,16 @@ const int FileTree::FileTreeNode::DATABASE_NODE = 3;
// Cyrus Harrison, Tue Apr 14 13:35:54 PDT 2009
// Added creation & setup of filePopupMenu.
//
// Jeremy Meredith, Fri Nov 6 11:40:46 EST 2009
// File panel selected files list now starts out hidden.
//
// ****************************************************************************
QvisFilePanel::QvisFilePanel(QWidget *parent) :
QWidget(parent), SimpleObserver(), GUIBase(), displayInfo(),
timeStateFormat()
{
showSelectedFiles = true;
showSelectedFiles = false;
allowFileSelectionChange = true;
// Create the top layout that will contain the widgets.
......@@ -366,6 +369,16 @@ QvisFilePanel::QvisFilePanel(QWidget *parent) :
// Initialize the attached subjects
windowInfo = NULL;
// Selected files list starts out hidden
if (!showSelectedFiles)
{
fileTree->hide();
openButton->hide();
replaceButton->hide();
overlayButton->hide();
}
}
// ****************************************************************************
......
......@@ -36,8 +36,8 @@
*
*****************************************************************************/
#ifndef QVIS_FILE_PANEL
#define QVIS_FILE_PANEL
#ifndef QVIS_FILE_PANEL_H
#define QVIS_FILE_PANEL_H
#include <gui_exports.h>
#include <QWidget>
#include <SimpleObserver.h>
......
......@@ -322,6 +322,11 @@
// I changed the window so when we run on short screens, the notepad
// becomes the dominant window control and we post everything else into it.
//
// Jeremy Meredith, Fri Nov 6 11:51:51 EST 2009
// File panel selected files starts out hidden, which means starting
// out without the Advanced file menu. Changed default splitter
// sizes depending on if file panel starts hidden or not.
//
// ****************************************************************************
QvisMainWindow::QvisMainWindow(int orientation, const char *captionString)
......@@ -397,26 +402,32 @@ QvisMainWindow::QvisMainWindow(int orientation, const char *captionString)
QKeySequence(Qt::CTRL + Qt::Key_O));
// Advanced pull-right menu.
fileAdvancedPopup = new QMenu(tr("Advanced file options"),filePopup);
fileAdvancedPopupAct = filePopup->addMenu(fileAdvancedPopup);
advancedMenuShowing = true;
// ReOpen pull-right menu.
reopenPopup = new QMenu(tr("ReOpen file"),fileAdvancedPopup);
connect(reopenPopup, SIGNAL(triggered(QAction*)),
this, SLOT(reopenFile(QAction*)));
reopenPopupAct = fileAdvancedPopup->addMenu(reopenPopup);
reopenPopupAct->setEnabled(false);
advancedMenuShowing = false;
if (advancedMenuShowing)
{
fileAdvancedPopup = new QMenu(tr("Advanced file options"),filePopup);
fileAdvancedPopupAct = filePopup->addMenu(fileAdvancedPopup);
}
// Close pull-right menu
closePopup = new QMenu(tr("Close file"),fileAdvancedPopup);
closePopup = new QMenu(tr("Close file"),
advancedMenuShowing ? fileAdvancedPopup : filePopup);
connect(closePopup, SIGNAL(triggered(QAction*)),
this, SLOT(closeFile(QAction*)));
closePopupAct = fileAdvancedPopup->addMenu(closePopup);
if (advancedMenuShowing)
closePopupAct = fileAdvancedPopup->addMenu(closePopup);
else
closePopupAct = filePopup->addMenu(closePopup);
closePopupAct->setEnabled(false);
// ReOpen pull-right menu.
reopenPopup = new QMenu(tr("ReOpen file"),
advancedMenuShowing ? fileAdvancedPopup : filePopup);
connect(reopenPopup, SIGNAL(triggered(QAction*)),
this, SLOT(reopenFile(QAction*)));
reopenPopupAct = filePopup->addMenu(reopenPopup);
reopenPopupAct->setEnabled(false);
refreshFileListAct = filePopup->addAction(tr("Refresh file list"),
this, SIGNAL(refreshFileList()),
QKeySequence(Qt::CTRL + Qt::Key_R));
......@@ -717,9 +728,18 @@ QvisMainWindow::QvisMainWindow(int orientation, const char *captionString)
// May want to read these from the config file but here are the defaults.
int hgt = qApp->desktop()->height();
QList<int> splitterSizes;
splitterSizes.append(int(hgt * 0.3));
splitterSizes.append(int(hgt * 0.3));
splitterSizes.append(int(hgt * 0.4));
if (advancedMenuShowing)
{
splitterSizes.append(int(hgt * 0.3));
splitterSizes.append(int(hgt * 0.3));
splitterSizes.append(int(hgt * 0.4));
}
else
{
splitterSizes.append(int(hgt * 0.05));
splitterSizes.append(int(hgt * 0.50));
splitterSizes.append(int(hgt * 0.45));
}
splitter->setSizes(splitterSizes);
}
......
......@@ -36,8 +36,8 @@
*
*****************************************************************************/
#ifndef QVIS_NOTEPAD_AREA
#define QVIS_NOTEPAD_AREA
#ifndef QVIS_NOTEPAD_AREA_H
#define QVIS_NOTEPAD_AREA_H
#include <gui_exports.h>
#include <QWidget>
#include <QSizePolicy>
......
......@@ -176,6 +176,10 @@ using std::vector;
// Brad Whitlock, Tue Oct 20 15:43:40 PDT 2009
// I added controls to change the plot list ordering.
//
// Jeremy Meredith, Fri Nov 6 11:39:56 EST 2009
// File panel selected files list now starts out hidden, and the
// source thus starts out shown.
//
// ****************************************************************************
QvisPlotManagerWidget::QvisPlotManagerWidget(QMenuBar *menuBar,QWidget *parent)
......@@ -193,7 +197,7 @@ QvisPlotManagerWidget::QvisPlotManagerWidget(QMenuBar *menuBar,QWidget *parent)
updateVariableMenuEnabledState = false;
maxVarCount = 0;
varMenuFlags = 0;
sourceVisible = false;
sourceVisible = true;
QVBoxLayout *veryTopLayout = new QVBoxLayout(this);
veryTopLayout->setSpacing(5);
......@@ -205,11 +209,13 @@ QvisPlotManagerWidget::QvisPlotManagerWidget(QMenuBar *menuBar,QWidget *parent)
// Create the source combobox.
sourceComboBox = new QComboBox(this);
sourceComboBox->hide();
if (!sourceVisible)
sourceComboBox->hide();
connect(sourceComboBox, SIGNAL(activated(int)),
this, SLOT(sourceChanged(int)));
sourceLabel = new QLabel(tr("Source"), this);
sourceLabel->hide();
if (!sourceVisible)
sourceLabel->hide();
topLayout->addWidget(sourceLabel, 0, 0);
topLayout->addWidget(sourceComboBox, 0, 1, 1, 3);
......
......@@ -79,6 +79,9 @@
// Brad Whitlock, Wed Apr 9 11:54:33 PDT 2008
// QString for caption, shortName.
//
// Jeremy Meredith, Fri Nov 6 11:38:38 EST 2009
// File panel selected files list now starts out hidden.
//
// ****************************************************************************
QvisPreferencesWindow::QvisPreferencesWindow(
......@@ -92,7 +95,7 @@ QvisPreferencesWindow::QvisPreferencesWindow(
{
atts = subj;
timeStateDisplayMode = 0;
showSelFiles = true;
showSelFiles = false;
selectedFilesToggle = 0;
allowFileSelChange = true;
allowFileSelectionChangeToggle = 0;
......@@ -431,6 +434,10 @@ QvisPreferencesWindow::Update(Subject *TheChangedSubject)
//
// Mark C. Miller, Tue Jun 10 22:36:25 PDT 2008
// Added logic for ignoring bad extents from dbs.
//
// Jeremy Meredith, Fri Nov 6 11:39:11 EST 2009
// Removed duplicate code which looked like a copy/paste error.
//
// ****************************************************************************
void
......@@ -560,10 +567,6 @@ QvisPreferencesWindow::UpdateWindow(bool doAll)
selectedFilesToggle->setChecked(showSelFiles);
selectedFilesToggle->blockSignals(false);
selectedFilesToggle->blockSignals(true);
selectedFilesToggle->setChecked(showSelFiles);
selectedFilesToggle->blockSignals(false);
allowFileSelectionChangeToggle->blockSignals(true);
allowFileSelectionChangeToggle->setChecked(allowFileSelChange);
allowFileSelectionChangeToggle->blockSignals(false);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment