Commit 0a31030e authored by whitlocb's avatar whitlocb

I made the notepad take up all of the Main window for short displays (<1024...

I made the notepad take up all of the Main window for short displays (<1024 pixels) and I made the Main window controls post into the area as a tab. This enables window posting to work on short displays. We used to disable the notepad entirely on such short displays. I've received some vocal complaints about this recently so I decided to change what we did. The Main window gets assembled normally if the number of vertical pixels is >= 1024.


git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@7922 18c085ea-50e0-402c-830e-de6fd14e8384
parent 2c008ccd
......@@ -475,6 +475,7 @@ HDRMOC = \
QvisPointControl.h \
QvisPlotManagerWidget.h \
QvisPluginWindow.h \
QvisPostableMainWindow.h \
QvisPostableWindow.h \
QvisPostableWindowObserver.h \
QvisPostableWindowSimpleObserver.h \
......
This diff is collapsed.
......@@ -50,6 +50,7 @@ class QComboBox;
class QCheckBox;
class QSplitter;
class QTimer;
class QVBoxLayout;
class QvisFilePanel;
class QvisNotepadArea;
class QvisPlotManagerWidget;
......@@ -351,6 +352,7 @@ private slots:
void lockView();
void unlockEverything();
private:
void CreateMainContents(QWidget *parent, QSplitter *splitter, QVBoxLayout *L);
void CreateGlobalArea(QWidget *par);
void UpdateFileMenuPopup(QMenu *, QAction *);
void UpdateGlobalArea(bool doAll);
......
/*****************************************************************************
*
* Copyright (c) 2000 - 2008, Lawrence Livermore National Security, LLC
* Produced at the Lawrence Livermore National Laboratory
* LLNL-CODE-400142
* All rights reserved.
*
* This file is part of VisIt. For details, see https://visit.llnl.gov/. The
* full copyright notice is contained in the file COPYRIGHT located at the root
* of the VisIt distribution or at http://www.llnl.gov/visit/copyright.html.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* - Redistributions of source code must retain the above copyright notice,
* this list of conditions and the disclaimer below.
* - Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the disclaimer (as noted below) in the
* documentation and/or other materials provided with the distribution.
* - Neither the name of the LLNS/LLNL nor the names of its contributors may
* be used to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL LAWRENCE LIVERMORE NATIONAL SECURITY,
* LLC, THE U.S. DEPARTMENT OF ENERGY OR CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*
*****************************************************************************/
#include <QvisPostableMainWindow.h>
#include <qpushbutton.h>
#include <qlayout.h>
#include <qlabel.h>
// ****************************************************************************
// Method: QvisPostableMainWindow::QvisPostableMainWindow
//
// Purpose:
// Constructor.
//
// Arguments:
// captionString : The window caption.
// shortName : The window name that appears in the notepad title.
// n : The notepad.
//
// Programmer: Brad Whitlock
// Creation: Fri Jul 24 09:39:38 PDT 2009
//
// Modifications:
//
// ****************************************************************************
QvisPostableMainWindow::QvisPostableMainWindow(const QString &captionString,
const QString &shortName, QvisNotepadArea *n) : QvisPostableWindow(captionString, shortName, n)
{
contentsWidget = 0;
contentsLayout = 0;
addLayoutStretch = false;
CreateEntireWindow();
dismissButton->setEnabled(false);
isCreated = true;
}
// ****************************************************************************
// Method: QvisPostableMainWindow::~QvisPostableMainWindow
//
// Purpose:
// Destructor
//
// Programmer: Brad Whitlock
// Creation: Fri Jul 24 09:40:24 PDT 2009
//
// Modifications:
//
// ****************************************************************************
QvisPostableMainWindow::~QvisPostableMainWindow()
{
}
// ****************************************************************************
// Method: QvisPostableMainWindow::CreateWindowContents
//
// Purpose:
// Creates a widget that we'll use for the parent of the main window stuff.
//
// Programmer: Brad Whitlock
// Creation: Fri Jul 24 09:40:38 PDT 2009
//
// Modifications:
//
// ****************************************************************************
void
QvisPostableMainWindow::CreateWindowContents()
{
topLayout->setMargin(0);
contentsWidget = new QWidget(central);
topLayout->addWidget(contentsWidget);
contentsLayout = new QVBoxLayout(contentsWidget);
contentsLayout->setMargin(0);
}
void
QvisPostableMainWindow::CreateNode(DataNode *)
{
}
void
QvisPostableMainWindow::SetFromNode(DataNode *, const int *borders)
{
}
// ****************************************************************************
// Method: QvisPostableMainWindow::ContentsWidget
//
// Purpose:
// Return the contents widget.
//
// Programmer: Brad Whitlock
// Creation: Fri Jul 24 09:41:03 PDT 2009
//
// Modifications:
//
// ****************************************************************************
QWidget *
QvisPostableMainWindow::ContentsWidget()
{
return contentsWidget;
}
// ****************************************************************************
// Method: QvisPostableMainWindow::ContentsLayout
//
// Purpose:
// Return the contents layout.
//
// Programmer: Brad Whitlock
// Creation: Fri Jul 24 09:41:46 PDT 2009
//
// Modifications:
//
// ****************************************************************************
QVBoxLayout *
QvisPostableMainWindow::ContentsLayout()
{
return contentsLayout;
}
/*****************************************************************************
*
* Copyright (c) 2000 - 2008, Lawrence Livermore National Security, LLC
* Produced at the Lawrence Livermore National Laboratory
* LLNL-CODE-400142
* All rights reserved.
*
* This file is part of VisIt. For details, see https://visit.llnl.gov/. The
* full copyright notice is contained in the file COPYRIGHT located at the root
* of the VisIt distribution or at http://www.llnl.gov/visit/copyright.html.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* - Redistributions of source code must retain the above copyright notice,
* this list of conditions and the disclaimer below.
* - Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the disclaimer (as noted below) in the
* documentation and/or other materials provided with the distribution.
* - Neither the name of the LLNS/LLNL nor the names of its contributors may
* be used to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL LAWRENCE LIVERMORE NATIONAL SECURITY,
* LLC, THE U.S. DEPARTMENT OF ENERGY OR CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*
*****************************************************************************/
#ifndef QVIS_POSTABLE_MAIN_WINDOW_H
#define QVIS_POSTABLE_MAIN_WINDOW_H
#include <QvisPostableWindow.h>
// ****************************************************************************
// Class: QvisPostableMainWindow
//
// Purpose:
// This is a small window that we post the Main window's controls into when
// we run on small screens.
//
// Notes:
//
// Programmer: Brad Whitlock
// Creation: Thu Jul 23 17:03:01 PDT 2009
//
// Modifications:
//
// ****************************************************************************
class QvisPostableMainWindow : public QvisPostableWindow
{
public:
QvisPostableMainWindow(const QString &captionString = QString::null,
const QString &shortName = QString::null,
QvisNotepadArea *n = 0);
virtual ~QvisPostableMainWindow();
virtual void CreateWindowContents();
virtual void CreateNode(DataNode *);
virtual void SetFromNode(DataNode *, const int *borders);
QWidget *ContentsWidget();
QVBoxLayout *ContentsLayout();
private:
QWidget *contentsWidget;
QVBoxLayout *contentsLayout;
};
#endif
......@@ -87,6 +87,10 @@ QvisPostableWindow::QvisPostableWindow(const QString &captionString,
isCreated = false;
isPosted = false;
central = 0;
topLayout = 0;
postButton = 0;
dismissButton = 0;
notepad = n;
addLayoutStretch = true;
}
......@@ -302,6 +306,48 @@ QvisPostableWindow::SetPostEnabled(bool v)
postEnabled = v;
}
// ****************************************************************************
// Method: QvisPostableWindow::SetDismissEnabled
//
// Purpose:
// Sets whether window dismissing is enabled.
//
// Arguments:
// v : True if enabled; false otherwise.
//
// Programmer: Brad Whitlock
// Creation: Thu Jul 23 14:58:23 PDT 2009
//
// Modifications:
//
// ****************************************************************************
void
QvisPostableWindow::SetDismissEnabled(bool v)
{
if(dismissButton != 0)
dismissButton->setEnabled(v);
}
// ****************************************************************************
// Method: QvisPostableWindow::SetAddStretch
//
// Purpose:
// Sets whether to add stretch to the layout.
//
// Programmer: Brad Whitlock
// Creation: Thu Jul 23 16:13:12 PDT 2009
//
// Modifications:
//
// ****************************************************************************
void
QvisPostableWindow::SetAddStretch(bool v)
{
addLayoutStretch = v;
}
// ****************************************************************************
// Method: QvisPostableWindow::show
//
......@@ -652,6 +698,9 @@ QvisPostableWindow::GetShortCaption()
// Brad Whitlock, Fri May 30 10:01:20 PDT 2008
// Qt 4.
//
// Brad Whitlock, Thu Jul 23 16:13:47 PDT 2009
// I made adding stretch optional.
//
// ****************************************************************************
void
......
......@@ -84,6 +84,9 @@ class QVBoxLayout;
// Brad Whitlock, Fri May 30 09:59:10 PDT 2008
// Qt 4.
//
// Brad Whitlock, Thu Jul 23 16:14:30 PDT 2009
// I added SetAddStretch and SetDismissEnabled.
//
// ****************************************************************************
class GUI_API QvisPostableWindow : public QvisWindowBase
......@@ -104,13 +107,14 @@ public:
virtual void SetFromNode(DataNode *, const int *borders);
static void SetPostEnabled(bool);
void SetDismissEnabled(bool);
void SetAddStretch(bool);
protected:
virtual void UpdateWindow(bool doAll);
public slots:
virtual void raise();
virtual void show();
virtual void hide();
protected slots:
virtual void post();
virtual void unpost();
protected:
......
......@@ -246,7 +246,7 @@ SplashScreen::SplashScreen(bool cyclePictures)
lrLayout->addLayout(rLayout );
QString C("(c) 2000-2008 LLNS. ");
QString C("(c) 2000-2009 LLNS. ");
C += tr("All Rights Reserved");
C += ".";
lLayout->addWidget(new QLabel(C, this));
......@@ -272,7 +272,7 @@ SplashScreen::SplashScreen(bool cyclePictures)
<< tr("October")
<< tr("November")
<< tr("December");
int currentMonth = 4;
int currentMonth = 7;
lLayout->addWidget(new QLabel(versionText, this));
lLayout->addWidget(new QLabel(months[currentMonth-1] + " 2009", this));
......
......@@ -56,6 +56,7 @@ enhancements and bug-fixes that were added to this release.</p>
<li>You can now execute Ultra (curve plotting software) commands from within VisIt. This is accomplished from the CLI by using the new 'LoadUltra()' command, which will replace VisIt's command prompt with an Ultra prompt, allowing only Ultra commands to be entered. 'end' or 'quit' must be entered to return to VisIt's cli prompt. Use 'help' at the Ultra prompt for information about currently supported commands.</li>
<li>The Spreadsheet plot was enhanced so it is now possible to extract rows or columns of data and create Curve plots of the data vs. the X or Y mesh coordinates. This allows plotting of curves from what is essentially a "logical lineout".</li>
<li>An option to replace only selected plots was added. It is available from the right click popup menu in the File Panel.</li>
<li>VisIt's Main window has been reorganized when running on computers with displays whose vertical resolutions is less than 1024 pixels. When running on such a display, the entire Main window is now a notepad area and the usual Main window contents are posted as a tab into the notepad. This permits other VisIt postable windows to be posted instead of preventing postable windows from posting.</li>
</ul>
<a name="Advanced_Features"></a>
......
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