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
b45305da
Commit
b45305da
authored
May 03, 2012
by
Claudio Valerio
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
removed unused files
parent
55474fa8
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
2 additions
and
73 deletions
+2
-73
UBTGWidgetTreeDelegate.cpp
src/gui/UBTGWidgetTreeDelegate.cpp
+0
-34
UBTGWidgetTreeDelegate.h
src/gui/UBTGWidgetTreeDelegate.h
+0
-35
gui.pri
src/gui/gui.pri
+2
-4
No files found.
src/gui/UBTGWidgetTreeDelegate.cpp
deleted
100644 → 0
View file @
55474fa8
#include <QApplication>
#include <QStyleOptionButton>
#include <QStyledItemDelegate>
#include <QStyleOptionViewItem>
#include <QPainter>
#include <QModelIndex>
#include "UBTGWidgetTreeDelegate.h"
UBTGWidgetTreeDelegate
::
UBTGWidgetTreeDelegate
(
QObject
*
parent
)
:
QStyledItemDelegate
(
parent
)
{
//NOOP
}
void
UBTGWidgetTreeDelegate
::
paint
(
QPainter
*
painter
,
const
QStyleOptionViewItem
&
option
,
const
QModelIndex
&
index
)
const
{
if
(
index
.
data
(
Qt
::
UserRole
)
!=
eUBTGAddSubItemWidgetType_None
){
painter
->
setBackgroundMode
(
Qt
::
OpaqueMode
);
painter
->
setBackground
(
QBrush
(
QColor
(
Qt
::
red
)));
QStyleOptionButton
styleButton
;
styleButton
.
text
=
"pipo"
;
styleButton
.
rect
=
option
.
rect
;
QApplication
::
style
()
->
drawControl
(
QStyle
::
CE_PushButtonLabel
,
&
styleButton
,
painter
);
}
else
QStyledItemDelegate
::
paint
(
painter
,
option
,
index
);
}
QSize
UBTGWidgetTreeDelegate
::
sizeHint
(
const
QStyleOptionViewItem
&
option
,
const
QModelIndex
&
index
)
const
{
QSize
size
=
QStyledItemDelegate
::
sizeHint
(
option
,
index
);
return
size
;
}
src/gui/UBTGWidgetTreeDelegate.h
deleted
100644 → 0
View file @
55474fa8
#ifndef UBTGWIDGETTREEDELEGATE_H
#define UBTGWIDGETTREEDELEGATE_H
class
QPainter
;
class
QStyleOptionViewItem
;
class
QModelIndex
;
#include <QStyledItemDelegate>
typedef
enum
{
eUBTGAddSubItemWidgetType_None
,
eUBTGAddSubItemWidgetType_Action
,
eUBTGAddSubItemWidgetType_Media
,
eUBTGAddSubItemWidgetType_Url
}
eUBTGAddSubItemWidgetType
;
class
UBTGWidgetTreeDelegate
:
public
QStyledItemDelegate
{
Q_OBJECT
public
:
explicit
UBTGWidgetTreeDelegate
(
QObject
*
parent
=
0
);
virtual
void
paint
(
QPainter
*
painter
,
const
QStyleOptionViewItem
&
option
,
const
QModelIndex
&
index
)
const
;
virtual
QSize
sizeHint
(
const
QStyleOptionViewItem
&
option
,
const
QModelIndex
&
index
)
const
;
signals
:
public
slots
:
};
#endif // UBTGWIDGETTREEDELEGATE_H
src/gui/gui.pri
View file @
b45305da
...
...
@@ -51,8 +51,7 @@ HEADERS += src/gui/UBThumbnailView.h \
src/gui/UBDockTeacherGuideWidget.h \
src/gui/UBTeacherGuideWidget.h \
src/gui/UBTeacherGuideWidgetsTools.h \
src/gui/UBTeacherGuideDelegate.h \
src/gui/UBTGWidgetTreeDelegate.h
src/gui/UBTeacherGuideDelegate.h
SOURCES += src/gui/UBThumbnailView.cpp \
src/gui/UBFloatingPalette.cpp \
...
...
@@ -106,8 +105,7 @@ SOURCES += src/gui/UBThumbnailView.cpp \
src/gui/UBDockTeacherGuideWidget.cpp \
src/gui/UBTeacherGuideWidget.cpp \
src/gui/UBTeacherGuideWidgetsTools.cpp \
src/gui/UBTeacherGuideDelegate.cpp \
src/gui/UBTGWidgetTreeDelegate.cpp
src/gui/UBTeacherGuideDelegate.cpp
win32 {
...
...
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