Start to support high DPI screen (> 192dpi).
* New: In Hurricane, in Graphics, add a new static method ::isHighDpi() which returns true if the DPI is greater than 192. A "normal" screen is typically 96dpi, we sets the trigger at twice that value. Then in all the widgets with size settings, we uses that method to select the more appropriate size.
This commit is contained in:
parent
6ecdaf2539
commit
445104eaf7
|
@ -52,10 +52,12 @@ namespace CRL {
|
||||||
_view->setSelectionBehavior ( QAbstractItemView::SelectRows );
|
_view->setSelectionBehavior ( QAbstractItemView::SelectRows );
|
||||||
_view->setSortingEnabled ( true );
|
_view->setSortingEnabled ( true );
|
||||||
_view->setModel ( _baseModel );
|
_view->setModel ( _baseModel );
|
||||||
_view->resizeColumnToContents ( 0 );
|
//_view->resizeColumnToContents ( 1 );
|
||||||
|
|
||||||
QHeaderView* horizontalHeader = _view->horizontalHeader();
|
QHeaderView* horizontalHeader = _view->horizontalHeader();
|
||||||
horizontalHeader->setStretchLastSection( true );
|
horizontalHeader->setResizeMode ( 0, QHeaderView::Stretch );
|
||||||
|
horizontalHeader->setResizeMode ( 1, QHeaderView::ResizeToContents );
|
||||||
|
//horizontalHeader->setStretchLastSection( false );
|
||||||
|
|
||||||
QHeaderView* verticalHeader = _view->verticalHeader();
|
QHeaderView* verticalHeader = _view->verticalHeader();
|
||||||
verticalHeader->setVisible( false );
|
verticalHeader->setVisible( false );
|
||||||
|
|
|
@ -55,6 +55,9 @@ namespace CRL {
|
||||||
splitter->addWidget( _librariesWidget );
|
splitter->addWidget( _librariesWidget );
|
||||||
splitter->addWidget( _cellsWidget );
|
splitter->addWidget( _cellsWidget );
|
||||||
splitter->addWidget( _viewsWidget );
|
splitter->addWidget( _viewsWidget );
|
||||||
|
splitter->setStretchFactor( 0, 1 );
|
||||||
|
splitter->setStretchFactor( 1, 2 );
|
||||||
|
splitter->setStretchFactor( 2, 0 );
|
||||||
|
|
||||||
QFrame* separator = new QFrame ();
|
QFrame* separator = new QFrame ();
|
||||||
separator->setFrameShape ( QFrame::HLine );
|
separator->setFrameShape ( QFrame::HLine );
|
||||||
|
@ -97,7 +100,7 @@ namespace CRL {
|
||||||
|
|
||||||
_librariesWidget->initSelection();
|
_librariesWidget->initSelection();
|
||||||
|
|
||||||
resize( 750, 550 );
|
resize( Graphics::toHighDpi(750), Graphics::toHighDpi(550) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
|
|
||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//
|
//
|
||||||
// Copyright (c) BULL S.A. 2000-2010, All Rights Reserved
|
// Copyright (c) BULL S.A. 2000-2015, All Rights Reserved
|
||||||
//
|
//
|
||||||
// This file is part of Hurricane.
|
// This file is part of Hurricane.
|
||||||
//
|
//
|
||||||
|
@ -19,12 +18,7 @@
|
||||||
// License along with Hurricane. If not, see
|
// License along with Hurricane. If not, see
|
||||||
// <http://www.gnu.org/licenses/>.
|
// <http://www.gnu.org/licenses/>.
|
||||||
//
|
//
|
||||||
// ===================================================================
|
// +-----------------------------------------------------------------+
|
||||||
//
|
|
||||||
// $Id$
|
|
||||||
//
|
|
||||||
// x-----------------------------------------------------------------x
|
|
||||||
// | |
|
|
||||||
// | H U R R I C A N E |
|
// | H U R R I C A N E |
|
||||||
// | V L S I B a c k e n d D a t a - B a s e |
|
// | V L S I B a c k e n d D a t a - B a s e |
|
||||||
// | |
|
// | |
|
||||||
|
@ -32,16 +26,13 @@
|
||||||
// | E-mail : Jean-Paul.Chaput@lip6.fr |
|
// | E-mail : Jean-Paul.Chaput@lip6.fr |
|
||||||
// | =============================================================== |
|
// | =============================================================== |
|
||||||
// | C++ Header : "./hurricane/Torus.h" |
|
// | C++ Header : "./hurricane/Torus.h" |
|
||||||
// | *************************************************************** |
|
// +-----------------------------------------------------------------+
|
||||||
// | U p d a t e s |
|
|
||||||
// | |
|
|
||||||
// x-----------------------------------------------------------------x
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef __HURRICANE_TORUS__
|
#ifndef HURRICANE_TORUS_H
|
||||||
#define __HURRICANE_TORUS__
|
#define HURRICANE_TORUS_H
|
||||||
|
|
||||||
#include "hurricane/Box.h"
|
#include "hurricane/Box.h"
|
||||||
|
|
||||||
|
|
||||||
namespace Hurricane {
|
namespace Hurricane {
|
||||||
|
@ -78,4 +69,4 @@ namespace Hurricane {
|
||||||
|
|
||||||
INSPECTOR_PV_SUPPORT(Hurricane::Torus);
|
INSPECTOR_PV_SUPPORT(Hurricane::Torus);
|
||||||
|
|
||||||
#endif // __HURRICANE_TORUS__
|
#endif // HURRICANE_TORUS_H
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//
|
//
|
||||||
// This file is part of the Coriolis Software.
|
// This file is part of the Coriolis Software.
|
||||||
// Copyright (c) UPMC/LIP6 2008-2015, All Rights Reserved
|
// Copyright (c) UPMC 2008-2015, All Rights Reserved
|
||||||
//
|
//
|
||||||
// +-----------------------------------------------------------------+
|
// +-----------------------------------------------------------------+
|
||||||
// | C O R I O L I S |
|
// | C O R I O L I S |
|
||||||
|
@ -1041,7 +1041,7 @@ namespace Hurricane {
|
||||||
// Class : "Hurricane::CellWidget".
|
// Class : "Hurricane::CellWidget".
|
||||||
|
|
||||||
|
|
||||||
const int CellWidget::_initialSide = 400;
|
int CellWidget::_initialSide = 400;
|
||||||
|
|
||||||
|
|
||||||
CellWidget::CellWidget ( QWidget* parent )
|
CellWidget::CellWidget ( QWidget* parent )
|
||||||
|
@ -1085,6 +1085,9 @@ namespace Hurricane {
|
||||||
|
|
||||||
QFont font = Graphics::getNormalFont();
|
QFont font = Graphics::getNormalFont();
|
||||||
_textFontHeight = QFontMetrics(font).ascent();
|
_textFontHeight = QFontMetrics(font).ascent();
|
||||||
|
|
||||||
|
_initialSide = Graphics::toHighDpi( _initialSide );
|
||||||
|
if (Graphics::isHighDpi()) resize( _initialSide, _initialSide );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//
|
//
|
||||||
// This file is part of the Coriolis Software.
|
// This file is part of the Coriolis Software.
|
||||||
// Copyright (c) UPMC/LIP6 2008-2015, All Rights Reserved
|
// Copyright (c) UPMC 2008-2015, All Rights Reserved
|
||||||
//
|
//
|
||||||
// +-----------------------------------------------------------------+
|
// +-----------------------------------------------------------------+
|
||||||
// | C O R I O L I S |
|
// | C O R I O L I S |
|
||||||
|
@ -511,7 +511,7 @@ namespace Hurricane {
|
||||||
connect ( _tabSelection->getSelection(), SIGNAL(inspect(Occurrence&))
|
connect ( _tabSelection->getSelection(), SIGNAL(inspect(Occurrence&))
|
||||||
, _tabInspector , SLOT (setSelectionOccurrence(Occurrence&)) );
|
, _tabInspector , SLOT (setSelectionOccurrence(Occurrence&)) );
|
||||||
|
|
||||||
resize ( 600, 560 );
|
resize ( Graphics::toHighDpi(600), Graphics::toHighDpi(500) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,15 +1,9 @@
|
||||||
|
|
||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//
|
//
|
||||||
// This file is part of the Coriolis Software.
|
// This file is part of the Coriolis Software.
|
||||||
// Copyright (c) UPMC/LIP6 2008-2010, All Rights Reserved
|
// Copyright (c) UPMC 2008-2015, All Rights Reserved
|
||||||
//
|
//
|
||||||
// ===================================================================
|
// +-----------------------------------------------------------------+
|
||||||
//
|
|
||||||
// $Id$
|
|
||||||
//
|
|
||||||
// x-----------------------------------------------------------------x
|
|
||||||
// | |
|
|
||||||
// | H U R R I C A N E |
|
// | H U R R I C A N E |
|
||||||
// | V L S I B a c k e n d D a t a - B a s e |
|
// | V L S I B a c k e n d D a t a - B a s e |
|
||||||
// | |
|
// | |
|
||||||
|
@ -17,24 +11,20 @@
|
||||||
// | E-mail : Jean-Paul.Chaput@asim.lip6.fr |
|
// | E-mail : Jean-Paul.Chaput@asim.lip6.fr |
|
||||||
// | =============================================================== |
|
// | =============================================================== |
|
||||||
// | C++ Module : "./DisplayFilterWidget.cpp" |
|
// | C++ Module : "./DisplayFilterWidget.cpp" |
|
||||||
// | *************************************************************** |
|
// +-----------------------------------------------------------------+
|
||||||
// | U p d a t e s |
|
|
||||||
// | |
|
|
||||||
// x-----------------------------------------------------------------x
|
|
||||||
|
|
||||||
|
|
||||||
#include <QLabel>
|
#include <QLabel>
|
||||||
#include <QCheckBox>
|
#include <QCheckBox>
|
||||||
#include <QSpinBox>
|
#include <QSpinBox>
|
||||||
#include <QGroupBox>
|
#include <QGroupBox>
|
||||||
#include <QButtonGroup>
|
#include <QButtonGroup>
|
||||||
#include <QRadioButton>
|
#include <QRadioButton>
|
||||||
#include <QGridLayout>
|
#include <QGridLayout>
|
||||||
#include <QVBoxLayout>
|
#include <QVBoxLayout>
|
||||||
|
#include "hurricane/viewer/Graphics.h"
|
||||||
#include "hurricane/viewer/Graphics.h"
|
#include "hurricane/viewer/CellWidget.h"
|
||||||
#include "hurricane/viewer/CellWidget.h"
|
#include "hurricane/viewer/DisplayFilterWidget.h"
|
||||||
#include "hurricane/viewer/DisplayFilterWidget.h"
|
|
||||||
|
|
||||||
|
|
||||||
namespace Hurricane {
|
namespace Hurricane {
|
||||||
|
@ -114,6 +104,7 @@ namespace Hurricane {
|
||||||
gLayout->addWidget ( _doComponents, 5, 0, 1, 2 );
|
gLayout->addWidget ( _doComponents, 5, 0, 1, 2 );
|
||||||
connect ( _doComponents, SIGNAL(stateChanged(int)), this, SLOT(setDoComponents(int)) );
|
connect ( _doComponents, SIGNAL(stateChanged(int)), this, SLOT(setDoComponents(int)) );
|
||||||
|
|
||||||
|
if (Graphics::isHighDpi()) gLayout->setContentsMargins( 30, 30, 30, 30 );
|
||||||
groupBox->setLayout ( gLayout );
|
groupBox->setLayout ( gLayout );
|
||||||
wLayout->addWidget ( groupBox );
|
wLayout->addWidget ( groupBox );
|
||||||
|
|
||||||
|
@ -141,6 +132,7 @@ namespace Hurricane {
|
||||||
group->addButton ( _steiner );
|
group->addButton ( _steiner );
|
||||||
hLayout->addWidget ( _steiner );
|
hLayout->addWidget ( _steiner );
|
||||||
|
|
||||||
|
if (Graphics::isHighDpi()) hLayout->setContentsMargins( 30, 30, 30, 30 );
|
||||||
groupBox->setLayout ( hLayout );
|
groupBox->setLayout ( hLayout );
|
||||||
wLayout->addWidget ( groupBox );
|
wLayout->addWidget ( groupBox );
|
||||||
|
|
||||||
|
@ -174,6 +166,7 @@ namespace Hurricane {
|
||||||
group->addButton ( _microMode );
|
group->addButton ( _microMode );
|
||||||
hLayout->addWidget ( _microMode );
|
hLayout->addWidget ( _microMode );
|
||||||
|
|
||||||
|
if (Graphics::isHighDpi()) hLayout->setContentsMargins( 30, 30, 30, 30 );
|
||||||
groupBox->setLayout ( hLayout );
|
groupBox->setLayout ( hLayout );
|
||||||
wLayout->addWidget ( groupBox );
|
wLayout->addWidget ( groupBox );
|
||||||
wLayout->addStretch ();
|
wLayout->addStretch ();
|
||||||
|
|
|
@ -102,7 +102,7 @@ namespace Hurricane {
|
||||||
setWindowTitle( tr("<An Exception was Caught>") );
|
setWindowTitle( tr("<An Exception was Caught>") );
|
||||||
setToolTip ( tr("Ben mon cochon, t'es dans le bouillon") );
|
setToolTip ( tr("Ben mon cochon, t'es dans le bouillon") );
|
||||||
|
|
||||||
_header->setMinimumWidth ( 200 );
|
_header->setMinimumWidth ( Graphics::isHighDpi() ? 400 : 200 );
|
||||||
_header->setTextFormat ( Qt::RichText );
|
_header->setTextFormat ( Qt::RichText );
|
||||||
_header->setText ( "<b>[ERROR]</b>" );
|
_header->setText ( "<b>[ERROR]</b>" );
|
||||||
|
|
||||||
|
@ -112,7 +112,7 @@ namespace Hurricane {
|
||||||
_trace->setTextInteractionFlags ( Qt::TextBrowserInteraction );
|
_trace->setTextInteractionFlags ( Qt::TextBrowserInteraction );
|
||||||
_trace->setAcceptRichText ( true );
|
_trace->setAcceptRichText ( true );
|
||||||
_trace->setHtml ( "<b>No program trace sets yet.</b>" );
|
_trace->setHtml ( "<b>No program trace sets yet.</b>" );
|
||||||
_trace->setMinimumSize ( QSize(800,500) );
|
_trace->setMinimumSize ( QSize( Graphics::isHighDpi() ? 1800 : 800, 500) );
|
||||||
_trace->setLineWrapMode ( QTextEdit::NoWrap );
|
_trace->setLineWrapMode ( QTextEdit::NoWrap );
|
||||||
//_trace->setSizePolicy ( QSizePolicy::Ignored, QSizePolicy::Ignored );
|
//_trace->setSizePolicy ( QSizePolicy::Ignored, QSizePolicy::Ignored );
|
||||||
_trace->hide ();
|
_trace->hide ();
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//
|
//
|
||||||
// This file is part of the Coriolis Software.
|
// This file is part of the Coriolis Software.
|
||||||
// Copyright (c) UPMC/LIP6 2008-2015, All Rights Reserved
|
// Copyright (c) UPMC 2008-2015, All Rights Reserved
|
||||||
//
|
//
|
||||||
// +-----------------------------------------------------------------+
|
// +-----------------------------------------------------------------+
|
||||||
// | H U R R I C A N E |
|
// | H U R R I C A N E |
|
||||||
|
@ -19,6 +19,7 @@
|
||||||
#include <QBrush>
|
#include <QBrush>
|
||||||
#include <QPen>
|
#include <QPen>
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
|
#include <QDesktopWidget>
|
||||||
#include "hurricane/Name.h"
|
#include "hurricane/Name.h"
|
||||||
#include "hurricane/Exception.h"
|
#include "hurricane/Exception.h"
|
||||||
#include "hurricane/Warning.h"
|
#include "hurricane/Warning.h"
|
||||||
|
@ -40,6 +41,7 @@ namespace Hurricane {
|
||||||
, _rainbowColorScale ()
|
, _rainbowColorScale ()
|
||||||
, _temperatureColorScale()
|
, _temperatureColorScale()
|
||||||
, _qtEnabled (false)
|
, _qtEnabled (false)
|
||||||
|
, _highDpi (false)
|
||||||
{
|
{
|
||||||
_htmlTranslator.addTranslation ( "<br>" , "<br>" );
|
_htmlTranslator.addTranslation ( "<br>" , "<br>" );
|
||||||
_htmlTranslator.addTranslation ( "<em>" , "<em>" );
|
_htmlTranslator.addTranslation ( "<em>" , "<em>" );
|
||||||
|
@ -123,6 +125,8 @@ namespace Hurricane {
|
||||||
_rainbowColorScale.qtAllocate();
|
_rainbowColorScale.qtAllocate();
|
||||||
_temperatureColorScale.qtAllocate();
|
_temperatureColorScale.qtAllocate();
|
||||||
|
|
||||||
|
_highDpi = (qApp->desktop()->logicalDpiX() > 192);
|
||||||
|
|
||||||
Breakpoint::setStopCb ( Graphics::breakpointStopCb );
|
Breakpoint::setStopCb ( Graphics::breakpointStopCb );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -196,15 +200,15 @@ namespace Hurricane {
|
||||||
|
|
||||||
|
|
||||||
bool Graphics::isEnabled ()
|
bool Graphics::isEnabled ()
|
||||||
{
|
{ return getGraphics()->_qtEnabled; }
|
||||||
return getGraphics()->_qtEnabled;
|
|
||||||
}
|
|
||||||
|
bool Graphics::isHighDpi ()
|
||||||
|
{ return getGraphics()->_highDpi; }
|
||||||
|
|
||||||
|
|
||||||
void Graphics::enable ()
|
void Graphics::enable ()
|
||||||
{
|
{ return getGraphics()->_enable(); }
|
||||||
return getGraphics()->_enable();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void Graphics::addStyle ( DisplayStyle* displayStyle )
|
void Graphics::addStyle ( DisplayStyle* displayStyle )
|
||||||
|
@ -325,6 +329,15 @@ namespace Hurricane {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int Graphics::toHighDpi ( int value )
|
||||||
|
{
|
||||||
|
if (isHighDpi()) {
|
||||||
|
// For now, for high DPI, multiplies by 2.5.
|
||||||
|
value = value*2 + value/2;
|
||||||
|
}
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
bool Graphics::breakpointStopCb ( const string& message )
|
bool Graphics::breakpointStopCb ( const string& message )
|
||||||
{
|
{
|
||||||
static BreakpointWidget* bpw = NULL;
|
static BreakpointWidget* bpw = NULL;
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
|
|
||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//
|
//
|
||||||
// This file is part of the Coriolis Software.
|
// This file is part of the Coriolis Software.
|
||||||
// Copyright (c) UPMC/LIP6 2008-2012, All Rights Reserved
|
// Copyright (c) UPMC 2008-2015, All Rights Reserved
|
||||||
//
|
//
|
||||||
// +-----------------------------------------------------------------+
|
// +-----------------------------------------------------------------+
|
||||||
// | H U R R I C A N E |
|
// | H U R R I C A N E |
|
||||||
|
@ -15,16 +14,15 @@
|
||||||
// +-----------------------------------------------------------------+
|
// +-----------------------------------------------------------------+
|
||||||
|
|
||||||
|
|
||||||
#include <QLabel>
|
#include <QLabel>
|
||||||
#include <QRadioButton>
|
#include <QRadioButton>
|
||||||
#include <QButtonGroup>
|
#include <QButtonGroup>
|
||||||
#include <QGroupBox>
|
#include <QGroupBox>
|
||||||
#include <QVBoxLayout>
|
#include <QVBoxLayout>
|
||||||
#include <QGridLayout>
|
#include <QGridLayout>
|
||||||
|
#include "hurricane/viewer/Graphics.h"
|
||||||
#include "hurricane/viewer/Graphics.h"
|
#include "hurricane/viewer/DisplayStyle.h"
|
||||||
#include "hurricane/viewer/DisplayStyle.h"
|
#include "hurricane/viewer/GraphicsWidget.h"
|
||||||
#include "hurricane/viewer/GraphicsWidget.h"
|
|
||||||
|
|
||||||
|
|
||||||
namespace Hurricane {
|
namespace Hurricane {
|
||||||
|
@ -65,6 +63,7 @@ namespace Hurricane {
|
||||||
gLayout->addWidget ( label , istyle-hideFallback, 1 );
|
gLayout->addWidget ( label , istyle-hideFallback, 1 );
|
||||||
group->addButton ( button, istyle );
|
group->addButton ( button, istyle );
|
||||||
}
|
}
|
||||||
|
if (Graphics::isHighDpi()) gLayout->setContentsMargins( 30, 30, 30, 30 );
|
||||||
|
|
||||||
groupBox->setLayout ( gLayout );
|
groupBox->setLayout ( gLayout );
|
||||||
wLayout->addWidget ( groupBox );
|
wLayout->addWidget ( groupBox );
|
||||||
|
|
|
@ -1,15 +1,9 @@
|
||||||
|
|
||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//
|
//
|
||||||
// This file is part of the Coriolis Software.
|
// This file is part of the Coriolis Software.
|
||||||
// Copyright (c) UPMC/LIP6 2008-2008, All Rights Reserved
|
// Copyright (c) UPMC 2008-2015, All Rights Reserved
|
||||||
//
|
//
|
||||||
// ===================================================================
|
// +-----------------------------------------------------------------+
|
||||||
//
|
|
||||||
// $Id$
|
|
||||||
//
|
|
||||||
// x-----------------------------------------------------------------x
|
|
||||||
// | |
|
|
||||||
// | H U R R I C A N E |
|
// | H U R R I C A N E |
|
||||||
// | V L S I B a c k e n d D a t a - B a s e |
|
// | V L S I B a c k e n d D a t a - B a s e |
|
||||||
// | |
|
// | |
|
||||||
|
@ -17,17 +11,13 @@
|
||||||
// | E-mail : Jean-Paul.Chaput@asim.lip6.fr |
|
// | E-mail : Jean-Paul.Chaput@asim.lip6.fr |
|
||||||
// | =============================================================== |
|
// | =============================================================== |
|
||||||
// | C++ Module : "./PaletteExtensionGoItem.cpp" |
|
// | C++ Module : "./PaletteExtensionGoItem.cpp" |
|
||||||
// | *************************************************************** |
|
// +-----------------------------------------------------------------+
|
||||||
// | U p d a t e s |
|
|
||||||
// | |
|
|
||||||
// x-----------------------------------------------------------------x
|
|
||||||
|
|
||||||
|
|
||||||
#include <QCheckBox>
|
#include <QCheckBox>
|
||||||
#include <QHBoxLayout>
|
#include <QHBoxLayout>
|
||||||
|
#include "hurricane/viewer/Graphics.h"
|
||||||
#include "hurricane/viewer/Graphics.h"
|
#include "hurricane/viewer/PaletteExtensionGoItem.h"
|
||||||
#include "hurricane/viewer/PaletteExtensionGoItem.h"
|
|
||||||
|
|
||||||
|
|
||||||
namespace Hurricane {
|
namespace Hurricane {
|
||||||
|
@ -35,9 +25,9 @@ namespace Hurricane {
|
||||||
|
|
||||||
PaletteExtensionGoItem::PaletteExtensionGoItem ( const Name& name )
|
PaletteExtensionGoItem::PaletteExtensionGoItem ( const Name& name )
|
||||||
: PaletteItem()
|
: PaletteItem()
|
||||||
, _visible(NULL)
|
, _visible (NULL)
|
||||||
, _selectable(NULL)
|
, _selectable(NULL)
|
||||||
, _name(name)
|
, _name (name)
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
|
|
||||||
|
@ -52,25 +42,27 @@ namespace Hurricane {
|
||||||
void PaletteExtensionGoItem::_postCreate ()
|
void PaletteExtensionGoItem::_postCreate ()
|
||||||
{
|
{
|
||||||
QHBoxLayout* layout = new QHBoxLayout ();
|
QHBoxLayout* layout = new QHBoxLayout ();
|
||||||
layout->setContentsMargins ( 0, 0, 0, 0 );
|
layout->setContentsMargins( 0, 0, 0, 0 );
|
||||||
|
|
||||||
_visible = new QCheckBox ( this );
|
_visible = new QCheckBox ( this );
|
||||||
_visible->setChecked ( false );
|
_visible->setChecked( false );
|
||||||
_visible->setText ( getString(getName()).c_str() );
|
_visible->setText ( getString(getName()).c_str() );
|
||||||
_visible->setFont ( Graphics::getFixedFont() );
|
_visible->setFont ( Graphics::getFixedFont() );
|
||||||
|
|
||||||
_selectable = new QCheckBox ( this );
|
_selectable = new QCheckBox( this );
|
||||||
_selectable->setFixedWidth ( 23 );
|
if (not Graphics::isHighDpi())
|
||||||
_selectable->setChecked ( true );
|
_selectable->setFixedWidth( 23 );
|
||||||
_selectable->setStyleSheet ( "QCheckBox { background-color: red;"
|
_selectable->setChecked ( true );
|
||||||
" padding: 2px 3px 2px 3px }" );
|
_selectable->setStyleSheet( "QCheckBox { background-color: red;"
|
||||||
|
" padding: 2px 2px 6px 6px }" );
|
||||||
|
|
||||||
layout->addWidget ( _selectable );
|
layout->addWidget ( _selectable );
|
||||||
layout->addWidget ( _visible );
|
layout->addWidget ( _visible );
|
||||||
setLayout ( layout );
|
layout->addStretch( 1 );
|
||||||
|
setLayout( layout );
|
||||||
|
|
||||||
connect ( _visible , SIGNAL(clicked()), this, SIGNAL(visibleToggled ()) );
|
connect( _visible , SIGNAL(clicked()), this, SIGNAL(visibleToggled ()) );
|
||||||
connect ( _selectable, SIGNAL(clicked()), this, SIGNAL(selectableToggled()) );
|
connect( _selectable, SIGNAL(clicked()), this, SIGNAL(selectableToggled()) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -26,29 +26,43 @@ namespace Hurricane {
|
||||||
// Class : "Hurricane::DrawingStyleSample".
|
// Class : "Hurricane::DrawingStyleSample".
|
||||||
|
|
||||||
|
|
||||||
|
int DrawingStyleSample::_side = 20;
|
||||||
|
int DrawingStyleSample::_border = 2;
|
||||||
|
|
||||||
|
|
||||||
DrawingStyleSample::DrawingStyleSample ( PaletteItem* entry )
|
DrawingStyleSample::DrawingStyleSample ( PaletteItem* entry )
|
||||||
: QWidget()
|
: QWidget()
|
||||||
, _sample(QSize(20,20))
|
, _sample(NULL)
|
||||||
, _entry(entry)
|
, _entry(entry)
|
||||||
{
|
{
|
||||||
setAttribute ( Qt::WA_StaticContents );
|
if (Graphics::isHighDpi()) {
|
||||||
setSizePolicy ( QSizePolicy::Fixed, QSizePolicy::Fixed );
|
_side = 40;
|
||||||
setFixedSize ( 20, 20 );
|
_border = 4;
|
||||||
|
}
|
||||||
|
_sample = new QPixmap( _side, _side );
|
||||||
|
|
||||||
redraw ();
|
setAttribute ( Qt::WA_StaticContents );
|
||||||
|
setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed );
|
||||||
|
setFixedSize ( _side, _side );
|
||||||
|
|
||||||
|
redraw();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
DrawingStyleSample::~DrawingStyleSample ()
|
||||||
|
{ delete _sample; }
|
||||||
|
|
||||||
|
|
||||||
void DrawingStyleSample::redraw ()
|
void DrawingStyleSample::redraw ()
|
||||||
{
|
{
|
||||||
QPainter painter ( &_sample );
|
QPainter painter ( _sample );
|
||||||
|
|
||||||
painter.setPen ( Qt::NoPen );
|
painter.setPen ( Qt::NoPen );
|
||||||
painter.setBackground ( Graphics::getBrush("background") );
|
painter.setBackground( Graphics::getBrush("background") );
|
||||||
painter.eraseRect ( 0, 0, 20, 20 );
|
painter.eraseRect ( 0, 0, _side, _side );
|
||||||
painter.setPen ( Graphics::getPen (_entry->getName()) );
|
painter.setPen ( Graphics::getPen (_entry->getName()) );
|
||||||
painter.setBrush ( Graphics::getBrush(_entry->getName()) );
|
painter.setBrush ( Graphics::getBrush(_entry->getName()) );
|
||||||
painter.drawRect ( 2, 2, 16, 16 );
|
painter.drawRect ( _border, _border, _side-2*_border, _side-2*_border );
|
||||||
|
|
||||||
update ();
|
update ();
|
||||||
}
|
}
|
||||||
|
@ -56,8 +70,8 @@ namespace Hurricane {
|
||||||
|
|
||||||
void DrawingStyleSample::paintEvent ( QPaintEvent* )
|
void DrawingStyleSample::paintEvent ( QPaintEvent* )
|
||||||
{
|
{
|
||||||
QPainter painter ( this );
|
QPainter painter( this );
|
||||||
painter.drawPixmap ( 0, 0, _sample );
|
painter.drawPixmap( 0, 0, *_sample );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -76,7 +90,7 @@ namespace Hurricane {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void PaletteItem::setItemSelectable ( bool )
|
void PaletteItem::setItemSelectable ( bool )
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -48,10 +48,11 @@ namespace Hurricane {
|
||||||
_visible->setText ( label.str().c_str() );
|
_visible->setText ( label.str().c_str() );
|
||||||
_visible->setFont ( Graphics::getFixedFont() );
|
_visible->setFont ( Graphics::getFixedFont() );
|
||||||
|
|
||||||
_selectable->setFixedWidth ( 23 );
|
if (not Graphics::isHighDpi())
|
||||||
|
_selectable->setFixedWidth ( 23 );
|
||||||
_selectable->setChecked ( true );
|
_selectable->setChecked ( true );
|
||||||
_selectable->setStyleSheet ( "QCheckBox { background-color: red;"
|
_selectable->setStyleSheet ( "QCheckBox { background-color: red;"
|
||||||
" padding: 2px 3px 2px 3px; }" );
|
" padding: 2px 2px 6px 6px; }" );
|
||||||
//_selectable->setStyleSheet ( "QCheckBox::indicator {"
|
//_selectable->setStyleSheet ( "QCheckBox::indicator {"
|
||||||
// " border: 2px solid red;"
|
// " border: 2px solid red;"
|
||||||
// "}"
|
// "}"
|
||||||
|
|
|
@ -1,38 +1,28 @@
|
||||||
|
|
||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//
|
//
|
||||||
// This file is part of the Coriolis Software.
|
// This file is part of the Coriolis Software.
|
||||||
// Copyright (c) UPMC/LIP6 2008-2009, All Rights Reserved
|
// Copyright (c) UPMC 2008-2015, All Rights Reserved
|
||||||
//
|
//
|
||||||
// ===================================================================
|
// +-----------------------------------------------------------------+
|
||||||
//
|
|
||||||
// $Id$
|
|
||||||
//
|
|
||||||
// x-----------------------------------------------------------------x
|
|
||||||
// | |
|
|
||||||
// | H U R R I C A N E |
|
// | H U R R I C A N E |
|
||||||
// | |
|
// | |
|
||||||
// | Author : Jean-Paul CHAPUT |
|
// | Author : Jean-Paul CHAPUT |
|
||||||
// | E-mail : Jean-Paul.Chaput@asim.lip6.fr |
|
// | E-mail : Jean-Paul.Chaput@asim.lip6.fr |
|
||||||
// | =============================================================== |
|
// | =============================================================== |
|
||||||
// | C++ Module : "./SelectionPopup.cpp" |
|
// | C++ Module : "./SelectionPopup.cpp" |
|
||||||
// | *************************************************************** |
|
// +-----------------------------------------------------------------+
|
||||||
// | U p d a t e s |
|
|
||||||
// | |
|
|
||||||
// x-----------------------------------------------------------------x
|
|
||||||
|
|
||||||
|
|
||||||
#include <QFontMetrics>
|
#include <QFontMetrics>
|
||||||
#include <QLabel>
|
#include <QLabel>
|
||||||
#include <QHeaderView>
|
#include <QHeaderView>
|
||||||
#include <QKeyEvent>
|
#include <QKeyEvent>
|
||||||
#include <QGroupBox>
|
#include <QGroupBox>
|
||||||
#include <QVBoxLayout>
|
#include <QVBoxLayout>
|
||||||
|
#include "hurricane/Commons.h"
|
||||||
#include "hurricane/Commons.h"
|
#include "hurricane/viewer/Graphics.h"
|
||||||
#include "hurricane/viewer/Graphics.h"
|
#include "hurricane/viewer/SelectionPopupModel.h"
|
||||||
#include "hurricane/viewer/SelectionPopupModel.h"
|
#include "hurricane/viewer/SelectionPopup.h"
|
||||||
#include "hurricane/viewer/SelectionPopup.h"
|
|
||||||
|
|
||||||
|
|
||||||
namespace Hurricane {
|
namespace Hurricane {
|
||||||
|
@ -47,40 +37,41 @@ namespace Hurricane {
|
||||||
, _model(NULL)
|
, _model(NULL)
|
||||||
, _view(NULL)
|
, _view(NULL)
|
||||||
, _rowHeight(20)
|
, _rowHeight(20)
|
||||||
|
, _charWidth(15)
|
||||||
{
|
{
|
||||||
setAttribute ( Qt::WA_DeleteOnClose );
|
setAttribute ( Qt::WA_DeleteOnClose );
|
||||||
setAttribute ( Qt::WA_QuitOnClose, false );
|
setAttribute ( Qt::WA_QuitOnClose, false );
|
||||||
//setWindowFlags ( Qt::Popup );
|
//setWindowFlags ( Qt::Popup );
|
||||||
setWindowFlags ( Qt::FramelessWindowHint );
|
setWindowFlags ( Qt::FramelessWindowHint );
|
||||||
setWindowOpacity ( 0.7 );
|
setWindowOpacity( 0.9 );
|
||||||
|
|
||||||
_rowHeight = QFontMetrics(Graphics::getFixedFont()).height() + 4;
|
_rowHeight = QFontMetrics(Graphics::getFixedFont()).height() + 4;
|
||||||
|
_charWidth = QFontMetrics(Graphics::getFixedFont()).averageCharWidth() + 1;
|
||||||
_model = new SelectionPopupModel ( this );
|
_model = new SelectionPopupModel ( this );
|
||||||
|
|
||||||
_view = new QTableView ( this );
|
_view = new QTableView ( this );
|
||||||
_view->setShowGrid ( false );
|
_view->setShowGrid( false );
|
||||||
_view->setAlternatingRowColors ( true );
|
_view->setAlternatingRowColors( true );
|
||||||
_view->setSelectionBehavior ( QAbstractItemView::SelectRows );
|
_view->setSelectionBehavior( QAbstractItemView::SelectRows );
|
||||||
_view->setModel ( _model );
|
_view->setModel( _model );
|
||||||
_view->horizontalHeader()->setStretchLastSection ( true );
|
_view->horizontalHeader()->setStretchLastSection( true );
|
||||||
_view->setWordWrap ( false );
|
_view->setWordWrap( false );
|
||||||
//_view->setTextElideMode ( Qt::ElideRight );
|
//_view->setTextElideMode ( Qt::ElideRight );
|
||||||
//_view->setFixedSize ( QSize(300,100) );
|
//_view->setFixedSize ( QSize(300,100) );
|
||||||
//_view->setIconSize ( QSize(600,40) );
|
//_view->setIconSize ( QSize(600,40) );
|
||||||
//_view->setStyleSheet ( "QTableView { background-color: #555555; }" );
|
//_view->setStyleSheet ( "QTableView { background-color: #555555; }" );
|
||||||
|
|
||||||
QHeaderView* horizontalHeader = _view->horizontalHeader ();
|
QHeaderView* horizontalHeader = _view->horizontalHeader();
|
||||||
horizontalHeader->setStretchLastSection ( true );
|
horizontalHeader->setStretchLastSection( true );
|
||||||
horizontalHeader->setMinimumSectionSize ( 200 );
|
horizontalHeader->setMinimumSectionSize( (Graphics::isHighDpi()) ? 1500 : 200 );
|
||||||
horizontalHeader->setVisible ( false );
|
horizontalHeader->setVisible( false );
|
||||||
|
|
||||||
QHeaderView* verticalHeader = _view->verticalHeader ();
|
QHeaderView* verticalHeader = _view->verticalHeader ();
|
||||||
verticalHeader->setVisible ( false );
|
verticalHeader->setVisible( false );
|
||||||
|
|
||||||
connect ( _model, SIGNAL(layoutChanged()), this, SLOT(forceRowHeight()) );
|
connect( _model, SIGNAL(layoutChanged()), this, SLOT(forceRowHeight()) );
|
||||||
|
|
||||||
resize ( 600, 10 );
|
resize( Graphics::isHighDpi() ? 1500 : 600, 10 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -147,11 +138,12 @@ namespace Hurricane {
|
||||||
|
|
||||||
// This seems a very bad way to set the size of the popup window
|
// This seems a very bad way to set the size of the popup window
|
||||||
// and underlying QTableView (top-down instead of bottom-up).
|
// and underlying QTableView (top-down instead of bottom-up).
|
||||||
int rows = _model->rowCount();
|
int pixelHeight = _model->rowCount() * _rowHeight + 4;
|
||||||
QSize windowSize = QSize ( 600, _rowHeight*rows + 4 );
|
int pixelWidth = _model->charWidth() * _charWidth;
|
||||||
|
QSize windowSize = QSize( pixelWidth, pixelHeight );
|
||||||
|
|
||||||
resize ( windowSize );
|
resize( windowSize );
|
||||||
_view->resize ( windowSize );
|
_view->resize( windowSize );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,15 +1,9 @@
|
||||||
|
|
||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//
|
//
|
||||||
// This file is part of the Coriolis Software.
|
// This file is part of the Coriolis Software.
|
||||||
// Copyright (c) UPMC/LIP6 2008-2008, All Rights Reserved
|
// Copyright (c) UPMC 2008-2015, All Rights Reserved
|
||||||
//
|
//
|
||||||
// ===================================================================
|
// +-----------------------------------------------------------------+
|
||||||
//
|
|
||||||
// $Id$
|
|
||||||
//
|
|
||||||
// x-----------------------------------------------------------------x
|
|
||||||
// | |
|
|
||||||
// | H U R R I C A N E |
|
// | H U R R I C A N E |
|
||||||
// | V L S I B a c k e n d D a t a - B a s e |
|
// | V L S I B a c k e n d D a t a - B a s e |
|
||||||
// | |
|
// | |
|
||||||
|
@ -17,20 +11,16 @@
|
||||||
// | E-mail : Jean-Paul.Chaput@asim.lip6.fr |
|
// | E-mail : Jean-Paul.Chaput@asim.lip6.fr |
|
||||||
// | =============================================================== |
|
// | =============================================================== |
|
||||||
// | C++ Module : "./SelectionPopupModel.cpp" |
|
// | C++ Module : "./SelectionPopupModel.cpp" |
|
||||||
// | *************************************************************** |
|
// +-----------------------------------------------------------------+
|
||||||
// | U p d a t e s |
|
|
||||||
// | |
|
|
||||||
// x-----------------------------------------------------------------x
|
|
||||||
|
|
||||||
|
|
||||||
#include <QFont>
|
#include <QFont>
|
||||||
|
#include "hurricane/Path.h"
|
||||||
#include "hurricane/Path.h"
|
#include "hurricane/Entity.h"
|
||||||
#include "hurricane/Entity.h"
|
#include "hurricane/Occurrence.h"
|
||||||
#include "hurricane/Occurrence.h"
|
#include "hurricane/viewer/Graphics.h"
|
||||||
#include "hurricane/viewer/Graphics.h"
|
#include "hurricane/viewer/Selector.h"
|
||||||
#include "hurricane/viewer/Selector.h"
|
#include "hurricane/viewer/SelectionPopupModel.h"
|
||||||
#include "hurricane/viewer/SelectionPopupModel.h"
|
|
||||||
|
|
||||||
|
|
||||||
namespace Hurricane {
|
namespace Hurricane {
|
||||||
|
@ -61,6 +51,7 @@ namespace Hurricane {
|
||||||
: QAbstractTableModel(parent)
|
: QAbstractTableModel(parent)
|
||||||
, _filter (new Occurrence_AcceptAll())
|
, _filter (new Occurrence_AcceptAll())
|
||||||
, _occurrences (NULL)
|
, _occurrences (NULL)
|
||||||
|
, _charWidth (50)
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
|
|
||||||
|
@ -80,13 +71,21 @@ namespace Hurricane {
|
||||||
{ return _filter; }
|
{ return _filter; }
|
||||||
|
|
||||||
|
|
||||||
|
int SelectionPopupModel::charWidth () const
|
||||||
|
{ return _charWidth; }
|
||||||
|
|
||||||
|
|
||||||
void SelectionPopupModel::loadOccurrences ( Occurrences occurrences, bool showChange )
|
void SelectionPopupModel::loadOccurrences ( Occurrences occurrences, bool showChange )
|
||||||
{
|
{
|
||||||
if ( !_occurrences ) _occurrences = new vector<Occurrence> ();
|
_charWidth = 50;
|
||||||
|
if (not _occurrences) _occurrences = new vector<Occurrence> ();
|
||||||
forEach ( Occurrence, ioccurrence, occurrences.getSubSet(getFilter()) ) {
|
forEach ( Occurrence, ioccurrence, occurrences.getSubSet(getFilter()) ) {
|
||||||
_occurrences->push_back ( *ioccurrence );
|
_occurrences->push_back( *ioccurrence );
|
||||||
|
string name = getString( (*ioccurrence).getPath().getName() ) + "::"
|
||||||
|
+ getString( (*ioccurrence).getEntity() );
|
||||||
|
_charWidth = std::max( _charWidth, (int)name.size() );
|
||||||
}
|
}
|
||||||
if ( showChange ) emit layoutChanged ();
|
if (showChange) emit layoutChanged ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -618,7 +618,7 @@ namespace Hurricane {
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// Internal: Attributes.
|
// Internal: Attributes.
|
||||||
static const int _initialSide;
|
static int _initialSide;
|
||||||
vector<Qt::CursorShape> _cursors;
|
vector<Qt::CursorShape> _cursors;
|
||||||
// MapView* _mapView;
|
// MapView* _mapView;
|
||||||
Technology* _technology;
|
Technology* _technology;
|
||||||
|
|
|
@ -1,15 +1,9 @@
|
||||||
|
|
||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//
|
//
|
||||||
// This file is part of the Coriolis Software.
|
// This file is part of the Coriolis Software.
|
||||||
// Copyright (c) UPMC/LIP6 2008-2010, All Rights Reserved
|
// Copyright (c) UPMC 2008-2015, All Rights Reserved
|
||||||
//
|
//
|
||||||
// ===================================================================
|
// +-----------------------------------------------------------------+
|
||||||
//
|
|
||||||
// $Id$
|
|
||||||
//
|
|
||||||
// x-----------------------------------------------------------------x
|
|
||||||
// | |
|
|
||||||
// | H U R R I C A N E |
|
// | H U R R I C A N E |
|
||||||
// | V L S I B a c k e n d D a t a - B a s e |
|
// | V L S I B a c k e n d D a t a - B a s e |
|
||||||
// | |
|
// | |
|
||||||
|
@ -17,14 +11,11 @@
|
||||||
// | E-mail : Jean-Paul.Chaput@asim.lip6.fr |
|
// | E-mail : Jean-Paul.Chaput@asim.lip6.fr |
|
||||||
// | =============================================================== |
|
// | =============================================================== |
|
||||||
// | C++ Header : "./DisplayFilterWidget.h" |
|
// | C++ Header : "./DisplayFilterWidget.h" |
|
||||||
// | *************************************************************** |
|
// +-----------------------------------------------------------------+
|
||||||
// | U p d a t e s |
|
|
||||||
// | |
|
|
||||||
// x-----------------------------------------------------------------x
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef __HURRICANE_DISPLAY_FILTER_WIDGET__
|
#ifndef HURRICANE_DISPLAY_FILTER_WIDGET_H
|
||||||
#define __HURRICANE_DISPLAY_FILTER_WIDGET__
|
#define HURRICANE_DISPLAY_FILTER_WIDGET_H
|
||||||
|
|
||||||
|
|
||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
|
@ -84,7 +75,6 @@ namespace Hurricane {
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
} // End of Hurricane namespace.
|
} // Hurricane namespace.
|
||||||
|
|
||||||
|
#endif // HURRICANE_DISPLAY_FILTER_WIDGET_H
|
||||||
#endif
|
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//
|
//
|
||||||
// This file is part of the Coriolis Software.
|
// This file is part of the Coriolis Software.
|
||||||
|
@ -44,6 +43,7 @@ namespace Hurricane {
|
||||||
// Accessors.
|
// Accessors.
|
||||||
static Graphics* getGraphics ();
|
static Graphics* getGraphics ();
|
||||||
static bool isEnabled ();
|
static bool isEnabled ();
|
||||||
|
static bool isHighDpi ();
|
||||||
static const QFont getFixedFont ( int weight=QFont::Normal, bool italic=false, bool underline=false, int scale=0 );
|
static const QFont getFixedFont ( int weight=QFont::Normal, bool italic=false, bool underline=false, int scale=0 );
|
||||||
static const QFont getNormalFont ( bool bold=false, bool italic=false, bool underline=false );
|
static const QFont getNormalFont ( bool bold=false, bool italic=false, bool underline=false );
|
||||||
static const Name& getGroup ( const Name& key );
|
static const Name& getGroup ( const Name& key );
|
||||||
|
@ -57,6 +57,7 @@ namespace Hurricane {
|
||||||
static QColor darken ( const QColor& );
|
static QColor darken ( const QColor& );
|
||||||
static const TextTranslator& getHtmlTranslator();
|
static const TextTranslator& getHtmlTranslator();
|
||||||
static string toHtml ( const string& );
|
static string toHtml ( const string& );
|
||||||
|
static int toHighDpi ( int );
|
||||||
static bool breakpointStopCb ( const string& message );
|
static bool breakpointStopCb ( const string& message );
|
||||||
|
|
||||||
// Modifiers.
|
// Modifiers.
|
||||||
|
@ -78,6 +79,7 @@ namespace Hurricane {
|
||||||
RainbowColorScale _rainbowColorScale;
|
RainbowColorScale _rainbowColorScale;
|
||||||
TemperatureColorScale _temperatureColorScale;
|
TemperatureColorScale _temperatureColorScale;
|
||||||
bool _qtEnabled;
|
bool _qtEnabled;
|
||||||
|
bool _highDpi;
|
||||||
|
|
||||||
// Internals - Constructors & Destructors.
|
// Internals - Constructors & Destructors.
|
||||||
Graphics ();
|
Graphics ();
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
|
|
||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//
|
//
|
||||||
// This file is part of the Coriolis Software.
|
// This file is part of the Coriolis Software.
|
||||||
// Copyright (c) UPMC/LIP6 2008-2012, All Rights Reserved
|
// Copyright (c) UPMC 2008-2015, All Rights Reserved
|
||||||
//
|
//
|
||||||
// +-----------------------------------------------------------------+
|
// +-----------------------------------------------------------------+
|
||||||
// | H U R R I C A N E |
|
// | H U R R I C A N E |
|
||||||
|
@ -15,8 +14,8 @@
|
||||||
// +-----------------------------------------------------------------+
|
// +-----------------------------------------------------------------+
|
||||||
|
|
||||||
|
|
||||||
#ifndef __HURRICANE_GRAPHICS_WIDGET__
|
#ifndef HURRICANE_GRAPHICS_WIDGET_H
|
||||||
#define __HURRICANE_GRAPHICS_WIDGET__
|
#define HURRICANE_GRAPHICS_WIDGET_H
|
||||||
|
|
||||||
|
|
||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
|
|
|
@ -1,15 +1,9 @@
|
||||||
|
|
||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//
|
//
|
||||||
// This file is part of the Coriolis Software.
|
// This file is part of the Coriolis Software.
|
||||||
// Copyright (c) UPMC/LIP6 2008-2008, All Rights Reserved
|
// Copyright (c) UPMC 2008-2015, All Rights Reserved
|
||||||
//
|
//
|
||||||
// ===================================================================
|
// +-----------------------------------------------------------------+
|
||||||
//
|
|
||||||
// $Id$
|
|
||||||
//
|
|
||||||
// x-----------------------------------------------------------------x
|
|
||||||
// | |
|
|
||||||
// | H U R R I C A N E |
|
// | H U R R I C A N E |
|
||||||
// | V L S I B a c k e n d D a t a - B a s e |
|
// | V L S I B a c k e n d D a t a - B a s e |
|
||||||
// | |
|
// | |
|
||||||
|
@ -17,14 +11,11 @@
|
||||||
// | E-mail : Jean-Paul.Chaput@asim.lip6.fr |
|
// | E-mail : Jean-Paul.Chaput@asim.lip6.fr |
|
||||||
// | =============================================================== |
|
// | =============================================================== |
|
||||||
// | C++ Header : "./PaletteExtensionGoItem.h" |
|
// | C++ Header : "./PaletteExtensionGoItem.h" |
|
||||||
// | *************************************************************** |
|
// +-----------------------------------------------------------------+
|
||||||
// | U p d a t e s |
|
|
||||||
// | |
|
|
||||||
// x-----------------------------------------------------------------x
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef __HURRICANE_PALETTE_EXTENSION_GO_ITEM__
|
#ifndef HURRICANE_PALETTE_EXTENSION_GO_ITEM_H
|
||||||
#define __HURRICANE_PALETTE_EXTENSION_GO_ITEM__
|
#define HURRICANE_PALETTE_EXTENSION_GO_ITEM_H
|
||||||
|
|
||||||
|
|
||||||
class QCheckBox;
|
class QCheckBox;
|
||||||
|
@ -61,7 +52,6 @@ namespace Hurricane {
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
} // End of Hurricane namespace.
|
} // Hurricane namespace.
|
||||||
|
|
||||||
|
#endif // HURRICANE_PALETTE_EXTENSION_GO_ITEM_H
|
||||||
#endif // __LAYER_PALETTE_ENTRY__
|
|
||||||
|
|
|
@ -1,35 +1,25 @@
|
||||||
|
|
||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//
|
//
|
||||||
// This file is part of the Coriolis Software.
|
// This file is part of the Coriolis Software.
|
||||||
// Copyright (c) UPMC/LIP6 2008-2009, All Rights Reserved
|
// Copyright (c) UPMC 2008-2015, All Rights Reserved
|
||||||
//
|
//
|
||||||
// ===================================================================
|
// +-----------------------------------------------------------------+
|
||||||
//
|
|
||||||
// $Id$
|
|
||||||
//
|
|
||||||
// x-----------------------------------------------------------------x
|
|
||||||
// | |
|
|
||||||
// | H U R R I C A N E |
|
// | H U R R I C A N E |
|
||||||
// | V L S I B a c k e n d D a t a - B a s e |
|
// | V L S I B a c k e n d D a t a - B a s e |
|
||||||
// | |
|
// | |
|
||||||
// | Author : Jean-Paul CHAPUT |
|
// | Author : Jean-Paul CHAPUT |
|
||||||
// | E-mail : Jean-Paul.Chaput@asim.lip6.fr |
|
// | E-mail : Jean-Paul.Chaput@asim.lip6.fr |
|
||||||
// | =============================================================== |
|
// | =============================================================== |
|
||||||
// | C++ Header : "./PaletteItem.h" |
|
// | C++ Header : "./hurricane/viewer/PaletteItem.h" |
|
||||||
// | *************************************************************** |
|
// +-----------------------------------------------------------------+
|
||||||
// | U p d a t e s |
|
|
||||||
// | |
|
|
||||||
// x-----------------------------------------------------------------x
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef __HURRICANE_PALETTE_ITEM__
|
#ifndef HURRICANE_PALETTE_ITEM_H
|
||||||
#define __HURRICANE_PALETTE_ITEM__
|
#define HURRICANE_PALETTE_ITEM_H
|
||||||
|
|
||||||
#include <QPixmap>
|
#include <QPixmap>
|
||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
#include <QFont>
|
#include <QFont>
|
||||||
|
|
||||||
class QPaintEvent;
|
class QPaintEvent;
|
||||||
class QCheckBox;
|
class QCheckBox;
|
||||||
|
|
||||||
|
@ -38,7 +28,6 @@ class QCheckBox;
|
||||||
|
|
||||||
namespace Hurricane {
|
namespace Hurricane {
|
||||||
|
|
||||||
|
|
||||||
class Name;
|
class Name;
|
||||||
class PaletteItem;
|
class PaletteItem;
|
||||||
|
|
||||||
|
@ -51,13 +40,17 @@ namespace Hurricane {
|
||||||
Q_OBJECT;
|
Q_OBJECT;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
DrawingStyleSample ( PaletteItem* );
|
DrawingStyleSample ( PaletteItem* );
|
||||||
|
~DrawingStyleSample ();
|
||||||
protected:
|
protected:
|
||||||
QPixmap _sample;
|
QPixmap* _sample;
|
||||||
PaletteItem* _entry;
|
PaletteItem* _entry;
|
||||||
|
private:
|
||||||
|
static int _side;
|
||||||
|
static int _border;
|
||||||
public slots:
|
public slots:
|
||||||
void redraw ();
|
void redraw ();
|
||||||
void paintEvent ( QPaintEvent* );
|
void paintEvent ( QPaintEvent* );
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -86,7 +79,6 @@ namespace Hurricane {
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
} // End of Hurricane namespace.
|
} // Hurricane namespace.
|
||||||
|
|
||||||
|
#endif // HURRICANE_PALETTE_ITEM_H
|
||||||
# endif // __HURRICANE_PALETTE_ITEM__
|
|
||||||
|
|
|
@ -1,38 +1,27 @@
|
||||||
|
|
||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//
|
//
|
||||||
// This file is part of the Coriolis Software.
|
// This file is part of the Coriolis Software.
|
||||||
// Copyright (c) UPMC/LIP6 2008-2009, All Rights Reserved
|
// Copyright (c) UPMC 2008-2015, All Rights Reserved
|
||||||
//
|
//
|
||||||
// ===================================================================
|
// +-----------------------------------------------------------------+
|
||||||
//
|
|
||||||
// $Id$
|
|
||||||
//
|
|
||||||
// x-----------------------------------------------------------------x
|
|
||||||
// | |
|
|
||||||
// | H U R R I C A N E |
|
// | H U R R I C A N E |
|
||||||
// | V L S I B a c k e n d D a t a - B a s e |
|
// | V L S I B a c k e n d D a t a - B a s e |
|
||||||
// | |
|
// | |
|
||||||
// | Author : Jean-Paul CHAPUT |
|
// | Author : Jean-Paul CHAPUT |
|
||||||
// | E-mail : Jean-Paul.Chaput@asim.lip6.fr |
|
// | E-mail : Jean-Paul.Chaput@asim.lip6.fr |
|
||||||
// | =============================================================== |
|
// | =============================================================== |
|
||||||
// | C++ Header : "./SelectionPopup.h" |
|
// | C++ Header : "./hurricane/viewer/SelectionPopup.h" |
|
||||||
// | *************************************************************** |
|
// +-----------------------------------------------------------------+
|
||||||
// | U p d a t e s |
|
|
||||||
// | |
|
|
||||||
// x-----------------------------------------------------------------x
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef __HURRICANE_SELECTION_POPUP_WIDGET_H__
|
#ifndef HURRICANE_SELECTION_POPUP_WIDGET_H
|
||||||
#define __HURRICANE_SELECTION_POPUP_WIDGET_H__
|
#define HURRICANE_SELECTION_POPUP_WIDGET_H
|
||||||
|
|
||||||
|
#include <QWidget>
|
||||||
#include <QWidget>
|
#include <QTableView>
|
||||||
#include <QTableView>
|
#include "hurricane/Commons.h"
|
||||||
|
#include "hurricane/Occurrence.h"
|
||||||
#include "hurricane/Commons.h"
|
#include "hurricane/Occurrences.h"
|
||||||
#include "hurricane/Occurrence.h"
|
|
||||||
#include "hurricane/Occurrences.h"
|
|
||||||
|
|
||||||
|
|
||||||
class QModelIndex;
|
class QModelIndex;
|
||||||
|
@ -75,10 +64,10 @@ namespace Hurricane {
|
||||||
SelectionPopupModel* _model;
|
SelectionPopupModel* _model;
|
||||||
QTableView* _view;
|
QTableView* _view;
|
||||||
int _rowHeight;
|
int _rowHeight;
|
||||||
|
int _charWidth;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
} // End of Hurricane namespace.
|
} // Hurricane namespace.
|
||||||
|
|
||||||
|
#endif // HURRICANE_SELECTION_POPUP_WIDGET_H
|
||||||
#endif // __HURRICANE_SELECTION_POPUP_WIDGET_H__
|
|
||||||
|
|
|
@ -1,47 +1,35 @@
|
||||||
|
|
||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//
|
//
|
||||||
// This file is part of the Coriolis Software.
|
// This file is part of the Coriolis Software.
|
||||||
// Copyright (c) UPMC/LIP6 2008-2009, All Rights Reserved
|
// Copyright (c) UPMC 2008-2015, All Rights Reserved
|
||||||
//
|
//
|
||||||
// ===================================================================
|
// +-----------------------------------------------------------------+
|
||||||
//
|
|
||||||
// $Id$
|
|
||||||
//
|
|
||||||
// x-----------------------------------------------------------------x
|
|
||||||
// | |
|
|
||||||
// | H U R R I C A N E |
|
// | H U R R I C A N E |
|
||||||
// | V L S I B a c k e n d D a t a - B a s e |
|
// | V L S I B a c k e n d D a t a - B a s e |
|
||||||
// | |
|
// | |
|
||||||
// | Author : Jean-Paul CHAPUT |
|
// | Author : Jean-Paul CHAPUT |
|
||||||
// | E-mail : Jean-Paul.Chaput@asim.lip6.fr |
|
// | E-mail : Jean-Paul.Chaput@asim.lip6.fr |
|
||||||
// | =============================================================== |
|
// | =============================================================== |
|
||||||
// | C++ Header : "./SelectionPopupModel.h" |
|
// | C++ Header : "./hurricane/viewer/SelectionPopupModel.h" |
|
||||||
// | *************************************************************** |
|
// +-----------------------------------------------------------------+
|
||||||
// | U p d a t e s |
|
|
||||||
// | |
|
|
||||||
// x-----------------------------------------------------------------x
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef __HURRICANE_SELECTION_POPUP_MODEL_H__
|
#ifndef HURRICANE_SELECTION_POPUP_MODEL_H
|
||||||
#define __HURRICANE_SELECTION_POPUP_MODEL_H__
|
#define HURRICANE_SELECTION_POPUP_MODEL_H
|
||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <set>
|
#include <set>
|
||||||
|
#include <QFont>
|
||||||
#include <QFont>
|
#include <QApplication>
|
||||||
#include <QApplication>
|
#include <QAbstractTableModel>
|
||||||
#include <QAbstractTableModel>
|
#include "hurricane/Commons.h"
|
||||||
|
#include "hurricane/Occurrence.h"
|
||||||
#include "hurricane/Commons.h"
|
#include "hurricane/Occurrences.h"
|
||||||
#include "hurricane/Occurrence.h"
|
#include "hurricane/viewer/Graphics.h"
|
||||||
#include "hurricane/Occurrences.h"
|
|
||||||
#include "hurricane/viewer/Graphics.h"
|
|
||||||
|
|
||||||
|
|
||||||
namespace Hurricane {
|
namespace Hurricane {
|
||||||
|
|
||||||
|
|
||||||
class Selector;
|
class Selector;
|
||||||
|
|
||||||
|
|
||||||
|
@ -57,6 +45,7 @@ namespace Hurricane {
|
||||||
void loadOccurrences ( Occurrences, bool showChange=false );
|
void loadOccurrences ( Occurrences, bool showChange=false );
|
||||||
void clear ();
|
void clear ();
|
||||||
void updateLayout ();
|
void updateLayout ();
|
||||||
|
int charWidth () const;
|
||||||
int rowCount ( const QModelIndex& parent=QModelIndex() ) const;
|
int rowCount ( const QModelIndex& parent=QModelIndex() ) const;
|
||||||
int columnCount ( const QModelIndex& parent=QModelIndex() ) const;
|
int columnCount ( const QModelIndex& parent=QModelIndex() ) const;
|
||||||
QVariant data ( const QModelIndex& index, int role=Qt::DisplayRole ) const;
|
QVariant data ( const QModelIndex& index, int role=Qt::DisplayRole ) const;
|
||||||
|
@ -66,6 +55,7 @@ namespace Hurricane {
|
||||||
private:
|
private:
|
||||||
OccurrenceFilter _filter;
|
OccurrenceFilter _filter;
|
||||||
vector<Occurrence>* _occurrences;
|
vector<Occurrence>* _occurrences;
|
||||||
|
int _charWidth;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue