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