Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
J
jami-client-windows
Manage
Activity
Members
Plan
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Analyze
Contributor analytics
Repository analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
savoirfairelinux
jami-client-windows
Commits
e41bb586
Commit
e41bb586
authored
Mar 4, 2016
by
Nicolas Jager
Committed by
Edric Milaret
Mar 11, 2016
Browse files
Options
Downloads
Patches
Plain Diff
fix: Video button appearing on many row
Change-Id: I1de8f75a1c71faaa82799d173aeb2705b37839eb Tuleap: #441
parent
6cdeba95
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
callwidget.cpp
+0
-4
0 additions, 4 deletions
callwidget.cpp
combar.cpp
+0
-1
0 additions, 1 deletion
combar.cpp
smartlist.cpp
+24
-29
24 additions, 29 deletions
smartlist.cpp
smartlist.h
+1
-1
1 addition, 1 deletion
smartlist.h
with
25 additions
and
35 deletions
callwidget.cpp
+
0
−
4
View file @
e41bb586
...
@@ -499,9 +499,6 @@ CallWidget::on_cancelButton_clicked()
...
@@ -499,9 +499,6 @@ CallWidget::on_cancelButton_clicked()
void
void
CallWidget
::
on_smartList_doubleClicked
(
const
QModelIndex
&
index
)
CallWidget
::
on_smartList_doubleClicked
(
const
QModelIndex
&
index
)
{
{
ui
->
smartList
->
reset
();
ui
->
smartList
->
setCurrentIndex
(
index
);
auto
realIndex
=
RecentModel
::
instance
().
peopleProxy
()
->
mapToSource
(
index
);
auto
realIndex
=
RecentModel
::
instance
().
peopleProxy
()
->
mapToSource
(
index
);
if
(
RecentModel
::
instance
().
hasActiveCall
(
realIndex
))
if
(
RecentModel
::
instance
().
hasActiveCall
(
realIndex
))
return
;
return
;
...
@@ -562,7 +559,6 @@ CallWidget::placeCall()
...
@@ -562,7 +559,6 @@ CallWidget::placeCall()
void
void
CallWidget
::
settingsButtonClicked
()
CallWidget
::
settingsButtonClicked
()
{
{
ui
->
smartList
->
reset
();
emit
NavigationRequested
(
ScreenEnum
::
ConfScreen
);
emit
NavigationRequested
(
ScreenEnum
::
ConfScreen
);
}
}
...
...
This diff is collapsed.
Click to expand it.
combar.cpp
+
0
−
1
View file @
e41bb586
...
@@ -20,7 +20,6 @@
...
@@ -20,7 +20,6 @@
#include
"combar.h"
#include
"combar.h"
ComBar
::
ComBar
(
QWidget
*
parent
)
:
ComBar
::
ComBar
(
QWidget
*
parent
)
:
QWidget
(
parent
),
QWidget
(
parent
),
ui
(
new
Ui
::
ComBar
)
ui
(
new
Ui
::
ComBar
)
...
...
This diff is collapsed.
Click to expand it.
smartlist.cpp
+
24
−
29
View file @
e41bb586
...
@@ -28,18 +28,21 @@
...
@@ -28,18 +28,21 @@
SmartList
::
SmartList
(
QWidget
*
parent
)
:
SmartList
::
SmartList
(
QWidget
*
parent
)
:
QTreeView
(
parent
)
QTreeView
(
parent
)
{
{
verticalScrollBar
()
->
hide
();
verticalScrollBar
()
->
hide
();
connect
(
this
,
&
QAbstractItemView
::
entered
,
[
this
](
const
QModelIndex
&
index
)
{
connect
(
this
,
&
QAbstractItemView
::
entered
,
[
this
](
const
QModelIndex
&
index
)
{
removeCombar
();
auto
widget
=
indexWidget
(
index
);
if
(
auto
widget
=
indexWidget
(
index
))
{
if
(
!
widget
)
{
widget
->
setVisible
(
true
);
}
else
{
ComBar
*
bar
=
new
ComBar
();
ComBar
*
bar
=
new
ComBar
();
setIndexWidget
(
index
,
bar
);
setIndexWidget
(
index
,
bar
);
connect
(
bar
,
&
ComBar
::
btnVideoClicked
,
this
,
[
=
](){
emit
btnVideoClicked
();
});
connect
(
bar
,
&
ComBar
::
btnVideoClicked
,
this
,
[
=
](){
emit
btnVideoClicked
();
});
}
}
else
if
(
index
.
isValid
())
indexWidget
(
index
)
->
setVisible
(
true
);
if
(
hoveredRow_
.
isValid
()
and
indexWidget
(
hoveredRow_
))
indexWidget
(
hoveredRow_
)
->
setVisible
(
false
);
hoveredRow_
=
index
;
hoveredRow_
=
index
;
});
});
...
@@ -48,7 +51,7 @@ SmartList::SmartList(QWidget *parent) :
...
@@ -48,7 +51,7 @@ SmartList::SmartList(QWidget *parent) :
SmartList
::~
SmartList
()
SmartList
::~
SmartList
()
{
{
reset
();
}
}
void
void
...
@@ -63,16 +66,14 @@ SmartList::leaveEvent(QEvent* event)
...
@@ -63,16 +66,14 @@ SmartList::leaveEvent(QEvent* event)
{
{
Q_UNUSED
(
event
);
Q_UNUSED
(
event
);
hoveredRow_
=
QModelIndex
();
verticalScrollBar
()
->
hide
();
verticalScrollBar
()
->
hide
();
removeCombar
();
}
}
void
void
SmartList
::
setSmartListItemDelegate
(
SmartListDelegate
*
delegate
)
SmartList
::
setSmartListItemDelegate
(
SmartListDelegate
*
delegate
)
{
{
if
(
delegate
)
if
(
delegate
)
{
{
setItemDelegate
(
delegate
);
setItemDelegate
(
delegate
);
smartListDelegate_
=
delegate
;
smartListDelegate_
=
delegate
;
}
}
...
@@ -83,27 +84,21 @@ SmartList::eventFilter(QObject* watched, QEvent* event)
...
@@ -83,27 +84,21 @@ SmartList::eventFilter(QObject* watched, QEvent* event)
{
{
if
(
qobject_cast
<
QScrollBar
*>
(
watched
)
&&
event
->
type
()
==
QEvent
::
Enter
)
{
if
(
qobject_cast
<
QScrollBar
*>
(
watched
)
&&
event
->
type
()
==
QEvent
::
Enter
)
{
removeCombar
();
hoveredRow_
=
QModelIndex
();
return
true
;
return
true
;
}
}
return
QObject
::
eventFilter
(
watched
,
event
);
return
QObject
::
eventFilter
(
watched
,
event
);
}
}
void
SmartList
::
removeCombar
()
{
if
(
not
hoveredRow_
.
isValid
())
return
;
if
(
auto
widget
=
indexWidget
(
hoveredRow_
))
{
widget
->
setVisible
(
false
);
}
}
void
void
SmartList
::
resizeEvent
(
QResizeEvent
*
event
)
SmartList
::
drawRow
(
QPainter
*
painter
,
const
QStyleOptionViewItem
&
option
,
const
QModelIndex
&
index
)
const
{
{
reset
();
if
(
index
==
hoveredRow_
&&
indexWidget
(
hoveredRow_
))
QTreeView
::
resizeEvent
(
event
);
indexWidget
(
index
)
->
setVisible
(
true
);
else
if
(
indexWidget
(
index
))
indexWidget
(
index
)
->
setVisible
(
false
);
QTreeView
::
drawRow
(
painter
,
option
,
index
);
}
}
This diff is collapsed.
Click to expand it.
smartlist.h
+
1
−
1
View file @
e41bb586
...
@@ -34,7 +34,7 @@ protected:
...
@@ -34,7 +34,7 @@ protected:
void
enterEvent
(
QEvent
*
event
);
void
enterEvent
(
QEvent
*
event
);
void
leaveEvent
(
QEvent
*
event
);
void
leaveEvent
(
QEvent
*
event
);
bool
eventFilter
(
QObject
*
watched
,
QEvent
*
event
);
bool
eventFilter
(
QObject
*
watched
,
QEvent
*
event
);
void
resizeEvent
(
QResizeEvent
*
event
)
;
void
drawRow
(
QPainter
*
painter
,
const
QStyleOptionViewItem
&
option
,
const
QModelIndex
&
index
)
const
;
private:
private:
SmartListDelegate
*
smartListDelegate_
;
SmartListDelegate
*
smartListDelegate_
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment