Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OpenBoard
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lifo
Nicolas Ollinger
OpenBoard
Commits
0bed9fad
Commit
0bed9fad
authored
Apr 27, 2012
by
Anna Udovichenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added slider size and position updating
parent
254d1acc
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
2 deletions
+22
-2
UBFeaturesWidget.cpp
src/gui/UBFeaturesWidget.cpp
+20
-2
UBFeaturesWidget.h
src/gui/UBFeaturesWidget.h
+2
-0
No files found.
src/gui/UBFeaturesWidget.cpp
View file @
0bed9fad
...
...
@@ -70,6 +70,7 @@ UBFeaturesWidget::UBFeaturesWidget(QWidget *parent, const char *name):UBDockPale
pathListView
->
setSelectionMode
(
QAbstractItemView
::
NoSelection
);
pathListView
->
setVerticalScrollBarPolicy
(
Qt
::
ScrollBarAlwaysOff
);
pathListView
->
setHorizontalScrollBarPolicy
(
Qt
::
ScrollBarAlwaysOn
);
//pathListView->setResizeMode( QListView::Adjust );
//pathListView->setMovement( QListView::Static );
pathListView
->
setDragDropMode
(
QAbstractItemView
::
DragDrop
);
...
...
@@ -89,11 +90,16 @@ UBFeaturesWidget::UBFeaturesWidget(QWidget *parent, const char *name):UBDockPale
currentStackedWidget
=
ID_LISTVIEW
;
mActionBar
=
new
UBFeaturesActionBar
(
controller
,
this
);
thumbSlider
=
new
QSlider
(
Qt
::
Horizontal
,
this
);
thumbSlider
=
new
QSlider
(
Qt
::
Horizontal
,
featuresListView
);
thumbSlider
->
setMinimum
(
minThumbnailSize
);
thumbSlider
->
setMaximum
(
maxThumbnailSize
);
thumbSlider
->
setValue
(
defaultThumbnailSize
);
layout
->
addWidget
(
thumbSlider
);
//qDebug() << "init" << featuresListView->height();
thumbSlider
->
move
(
0
,
featuresListView
->
height
()
);
thumbSlider
->
resize
(
thumbSlider
->
width
(),
thumbSlider
->
height
()
+
4
);
thumbSlider
->
show
();
featuresListView
->
installEventFilter
(
this
);
//layout->addWidget( thumbSlider );
layout
->
addWidget
(
mActionBar
);
/*connect(featuresListView->selectionModel(), SIGNAL(currentChanged ( const QModelIndex &, const QModelIndex & )),
...
...
@@ -110,6 +116,18 @@ UBFeaturesWidget::UBFeaturesWidget(QWidget *parent, const char *name):UBDockPale
connect
(
thumbSlider
,
SIGNAL
(
sliderMoved
(
int
)
),
this
,
SLOT
(
thumbnailSizeChanged
(
int
)
)
);
}
bool
UBFeaturesWidget
::
eventFilter
(
QObject
*
target
,
QEvent
*
event
)
{
if
(
target
==
featuresListView
&&
event
->
type
()
==
QEvent
::
Resize
)
{
thumbSlider
->
move
(
10
,
featuresListView
->
height
()
-
thumbSlider
->
height
()
-
10
);
thumbSlider
->
resize
(
featuresListView
->
width
()
-
20
,
thumbSlider
->
height
()
);
//qDebug() << featuresListView->height();
//return true;
}
return
UBDockPaletteWidget
::
eventFilter
(
target
,
event
);
}
void
UBFeaturesWidget
::
searchStarted
(
const
QString
&
pattern
)
{
if
(
pattern
.
isEmpty
()
)
...
...
src/gui/UBFeaturesWidget.h
View file @
0bed9fad
...
...
@@ -92,6 +92,8 @@ private slots:
void
addToFavorite
(
const
QMimeData
&
);
void
removeFromFavorite
(
const
QMimeData
&
);
void
thumbnailSizeChanged
(
int
);
protected
:
bool
eventFilter
(
QObject
*
target
,
QEvent
*
event
);
};
class
UBFeaturesListView
:
public
QListView
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment