Commit eaff36a9 authored by Ivan Ilyin's avatar Ivan Ilyin

Merge branch 'FeatureWidget'

parents 2b678dd9 c6e8b92d
......@@ -4,7 +4,8 @@ QWidget#UBLibPathViewer,
QWidget#UBLibNavigatorWidget,
QWidget#UBLibItemProperties,
QWidget#UBDownloadWidget,
QWidget#UBTeacherGuideWidget
QWidget#UBTeacherGuideWidget,
QWidget#UBFeatureProperties
{
background: #EEEEEE;
border-radius: 10px;
......@@ -25,6 +26,13 @@ QWidget#UBLibWebView
border: 2px solid #999999;
}
QListView
{
background: #EEEEEE;
border-radius : 10px;
border: 2px solid #999999;
}
QWebView#SearchEngineView
{
background:white;
......
......@@ -138,6 +138,7 @@ void UBBoardPaletteManager::setupDockPaletteWidgets()
mpDownloadWidget = new UBDockDownloadWidget();
mpTeacherGuideWidget = new UBDockTeacherGuideWidget();
mpFeaturesWidget = new UBFeaturesWidget();
// Add the dock palettes
mLeftPalette = new UBLeftPalette(mContainer);
......@@ -153,6 +154,10 @@ void UBBoardPaletteManager::setupDockPaletteWidgets()
mRightPalette = new UBRightPalette(mContainer);
// RIGHT palette widgets
mRightPalette->registerWidget(mpFeaturesWidget);
mRightPalette->addTab(mpFeaturesWidget);
mRightPalette->registerWidget(mpLibWidget);
mRightPalette->addTab(mpLibWidget);
// The cache widget will be visible only if a cache is put on the page
......
......@@ -27,6 +27,7 @@
#include "gui/UBCachePropertiesWidget.h"
#include "gui/UBDockDownloadWidget.h"
#include "core/UBApplicationController.h"
#include "gui/UBFeaturesWidget.h"
class UBStylusPalette;
......@@ -129,6 +130,8 @@ class UBBoardPaletteManager : public QObject
/** The cache properties widget */
UBCachePropertiesWidget* mpCachePropWidget;
UBFeaturesWidget *mpFeaturesWidget;
/** The download widget */
UBDockDownloadWidget* mpDownloadWidget;
// HACK: here we duplicate the lib widget for the desktop mode
......
......@@ -16,6 +16,7 @@
#include <QtGui>
#include <QtXml>
#include <QListView>
#include "UBDrawingController.h"
......@@ -843,17 +844,17 @@ void UBBoardView::dropEvent (QDropEvent *event)
QGraphicsItem* graphicsItemAtPos = itemAt(event->pos().x(),event->pos().y());
UBGraphicsWidgetItem* graphicsWidget = dynamic_cast<UBGraphicsWidgetItem*>(graphicsItemAtPos);
qDebug() << event->source();
if (graphicsWidget && graphicsWidget->acceptDrops()) {
graphicsWidget->processDropEvent(event);
event->acceptProposedAction();
}
else if (!event->source()
} else if (!event->source()
|| dynamic_cast<UBThumbnailWidget *>(event->source())
|| dynamic_cast<QWebView*>(event->source())
|| dynamic_cast<UBTGMediaWidget*>(event->source())) {
|| dynamic_cast<UBTGMediaWidget*>(event->source())
|| dynamic_cast<QListView *>(event->source()) ) {
mController->processMimeData (event->mimeData (), mapToScene (event->pos ()));
event->acceptProposedAction();
}
......
This diff is collapsed.
#ifndef UBFEATURESCONTROLLER_H
#define UBFEATURESCONTROLLER_H
#include <QMetaType>
#include <QObject>
#include <QWidget>
#include <QVector>
#include <QString>
#include <QPixmap>
//#include "UBDockPaletteWidget.h"
enum UBFeatureElementType
{
FEATURE_CATEGORY,
FEATURE_VIRTUALFOLDER,
FEATURE_FOLDER,
FEATURE_INTERACTIVE,
FEATURE_INTERNAL,
FEATURE_ITEM,
FEATURE_TRASH,
FEATURE_FAVORITE
};
class UBFeature
{
public:
UBFeature() {;}
//UBFeature(const UBFeature &f);
UBFeature(const QString &url, const QPixmap &icon, const QString &name, const QString &realPath, UBFeatureElementType type = FEATURE_CATEGORY);
virtual ~UBFeature() {;}
QString getName() const { return mName; }
QPixmap getThumbnail() const {return mThumbnail;}
QString getUrl() const { return virtualPath; }
//QString getPath() const { return mPath; };
QString getFullPath() const { return mPath; }
UBFeatureElementType getType() const { return elementType; }
bool isFolder() const;
private:
QString virtualPath;
QPixmap mThumbnail;
QString mName;
QString mPath;
UBFeatureElementType elementType;
};
Q_DECLARE_METATYPE( UBFeature )
class UBFeaturesController : public QObject
{
Q_OBJECT
public:
UBFeaturesController(QWidget *parentWidget);
virtual ~UBFeaturesController();
QList <UBFeature>* getFeatures()const { return featuresList; }
const QString& getRootPath()const { return rootPath; }
void addItemToPage(const UBFeature &item);
const UBFeature& getCurrentElement()const { return currentElement; }
void setCurrentElement( const UBFeature &elem ) { currentElement = elem; }
const UBFeature & getTrashElement () const { return trashElement; }
UBFeature moveItemToFolder( const QUrl &url, const UBFeature &destination );
UBFeature copyItemToFolder( const QUrl &url, const UBFeature &destination );
void deleteItem( const QUrl &url );
bool isTrash( const QUrl &url );
UBFeature newFolder( const QString &name );
UBFeature addToFavorite( const QUrl &path );
void removeFromFavorite( const QUrl &path );
static QString fileNameFromUrl( const QUrl &url );
static QPixmap thumbnailForFile( const QString &path );
private:
void initDirectoryTree();
void fileSystemScan(const QString &currPath, const QString & currVirtualPath);
static QPixmap createThumbnail(const QString &path);
//void addImageToCurrentPage( const QString &path );
void loadFavoriteList();
void saveFavoriteList();
static UBFeatureElementType fileTypeFromUrl( const QString &path );
QList <UBFeature> *featuresList;
UBFeature *rootElement;
QString mUserAudioDirectoryPath;
QString mUserVideoDirectoryPath;
QString mUserPicturesDirectoryPath;
QString mUserInteractiveDirectoryPath;
QString mUserAnimationDirectoryPath;
QString libraryPath;
QString mLibAudioDirectoryPath;
QString mLibVideoDirectoryPath;
QString mLibPicturesDirectoryPath;
QString mLibInteractiveDirectoryPath;
QString mLibAnimationDirectoryPath;
QString mLibApplicationsDirectoryPath;
QString mLibShapesDirectoryPath;
QString trashDirectoryPath;
QString rootPath;
QString audiosPath;
QString moviesPath;
QString picturesPath;
QString appPath;
QString flashPath;
QString shapesPath;
QString interactPath;
QString trashPath;
QString favoritePath;
int mLastItemOffsetIndex;
UBFeature currentElement;
UBFeature trashElement;
UBFeature favoriteElement;
QSet <QString> *favoriteSet;
};
#endif
......@@ -3,13 +3,15 @@ HEADERS += src/board/UBBoardController.h \
src/board/UBBoardPaletteManager.h \
src/board/UBBoardView.h \
src/board/UBLibraryController.h \
src/board/UBDrawingController.h
src/board/UBDrawingController.h \
src/board/UBFeaturesController.h
SOURCES += src/board/UBBoardController.cpp \
src/board/UBBoardPaletteManager.cpp \
src/board/UBBoardView.cpp \
src/board/UBLibraryController.cpp \
src/board/UBDrawingController.cpp
src/board/UBDrawingController.cpp \
src/board/UBFeaturesController.cpp
......
#include "UBFeaturesActionBar.h"
UBFeaturesActionBar::UBFeaturesActionBar( UBFeaturesController *controller, QWidget* parent, const char* name ) : QWidget (parent)
, featuresController(controller)
, mButtonGroup(NULL)
, mSearchBar(NULL)
, mLayout(NULL)
, mpFavoriteAction(NULL)
, mpSocialAction(NULL)
, mpDeleteAction(NULL)
, mpSearchAction(NULL)
, mpCloseAction(NULL)
, mpRemoveFavorite(NULL)
, mpNewFolderAction(NULL)
, mpFavoriteBtn(NULL)
, mpSocialBtn(NULL)
, mpDeleteBtn(NULL)
, mpCloseBtn(NULL)
, mpRemoveFavoriteBtn(NULL)
, mpNewFolderBtn(NULL)
{
setObjectName(name);
setStyleSheet(QString("background: #EEEEEE; border-radius : 10px; border : 2px solid #999999;"));
setAcceptDrops(true);
mButtonGroup = new QButtonGroup(this);
mSearchBar = new QLineEdit(this);
mSearchBar->setStyleSheet(QString("background-color:white; border-radius : 10px; padding : 2px;"));
//connect(mSearchBar, SIGNAL(returnPressed()), this, SLOT(onActionSearch()));
mLayout = new QHBoxLayout();
setLayout(mLayout);
setMaximumHeight(ACTIONBAR_HEIGHT);
// Create the actions
mpFavoriteAction = new QAction(QIcon(":/images/libpalette/miniFavorite.png"), tr("Add to favorites"), this);
mpSocialAction = new QAction(QIcon(":/images/libpalette/social.png"), tr("Share"), this);
mpSearchAction = new QAction(QIcon(":/images/libpalette/miniSearch.png"), tr("Search"), this);
mpDeleteAction = new QAction(QIcon(":/images/libpalette/miniTrash.png"), tr("Delete"), this);
mpCloseAction = new QAction(QIcon(":/images/close.svg"), tr("Back to folder"), this);
mpRemoveFavorite = new QAction(QIcon(":/images/libpalette/trash_favorite.svg"), tr("Remove from favorites"), this);
mpNewFolderAction = new QAction(QIcon(":/images/libpalette/miniNewFolder.png"), tr("Create new folder"), this);
// Create the buttons
mpFavoriteBtn = new UBActionButton(this, mpFavoriteAction);
mpSocialBtn = new UBActionButton(this, mpSocialAction);
//mpSearchBtn = new UBActionButton(this, mpSearchAction);
mpDeleteBtn = new UBActionButton(this, mpDeleteAction);
mpCloseBtn = new UBActionButton(this, mpCloseAction);
mpRemoveFavoriteBtn = new UBActionButton(this, mpRemoveFavorite);
mpNewFolderBtn = new UBActionButton(this, mpNewFolderAction);
// Initialize the buttons
//mpSearchBtn->setEnabled(false);
mpNewFolderBtn->setEnabled(false);
// Add the buttons to the button group
mButtonGroup->addButton(mpFavoriteBtn);
mButtonGroup->addButton(mpSocialBtn);
//mButtonGroup->addButton(mpSearchBtn);
mButtonGroup->addButton(mpDeleteBtn);
mButtonGroup->addButton(mpCloseBtn);
mButtonGroup->addButton(mpRemoveFavoriteBtn);
mButtonGroup->addButton(mpNewFolderBtn);
// Connect signals & slots
/*connect(mpFavoriteAction,SIGNAL(triggered()), this, SLOT(onActionFavorite()));
connect(mpSocialAction,SIGNAL(triggered()), this, SLOT(onActionSocial()));
connect(mpSearchAction,SIGNAL(triggered()), this, SLOT(onActionSearch()));
connect(mpDeleteAction,SIGNAL(triggered()), this, SLOT(onActionTrash()));
connect(mpCloseAction, SIGNAL(triggered()), this, SLOT(onActionClose()));
connect(mpRemoveFavorite, SIGNAL(triggered()), this, SLOT(onActionRemoveFavorite()));
connect(mSearchBar, SIGNAL(textChanged(QString)), this, SLOT(onSearchTextChanged(QString)));
connect(mpNewFolderAction, SIGNAL(triggered()), this, SLOT(onActionNewFolder()));*/
connect(mSearchBar, SIGNAL(textChanged(QString)), this, SLOT(onSearchTextChanged(QString)));
connect(mpNewFolderAction, SIGNAL(triggered()), this, SLOT(onActionNewFolder()));
// Build the default toolbar
mLayout->addWidget(mpFavoriteBtn);
mLayout->addWidget(mpSocialBtn);
mLayout->addWidget(mpNewFolderBtn);
mLayout->addWidget(mSearchBar);
//mLayout->addWidget(mpSearchBtn);
mLayout->addWidget(mpDeleteBtn);
mLayout->addWidget(mpCloseBtn);
mLayout->addWidget(mpRemoveFavoriteBtn);
setCurrentState( IN_ROOT );
mpDeleteBtn->setAcceptDrops(true);
setAcceptDrops( true );
}
void UBFeaturesActionBar::setCurrentState( UBFeaturesActionBarState state )
{
currentState = state;
setButtons();
}
void UBFeaturesActionBar::setButtons()
{
switch( currentState )
{
case IN_FOLDER:
mpFavoriteBtn->show();
mpSocialBtn->hide();
mSearchBar->show();
mpDeleteBtn->show();
mpCloseBtn->hide();
mpRemoveFavoriteBtn->hide();
mpNewFolderBtn->show();
mpNewFolderBtn->setEnabled(true);
mpDeleteBtn->setEnabled(true);
break;
case IN_ROOT:
mpFavoriteBtn->show();
mpSocialBtn->hide();
mSearchBar->show();
mpDeleteBtn->show();
mpCloseBtn->hide();
mpRemoveFavoriteBtn->hide();
mpNewFolderBtn->show();
mpNewFolderBtn->setEnabled(false);
mpDeleteBtn->setEnabled(false);
break;
case IN_PROPERTIES:
mpFavoriteBtn->show();
mpSocialBtn->hide();
mSearchBar->show();
//mpSearchBtn->show();
mpDeleteBtn->hide();
mpCloseBtn->hide();
mpRemoveFavoriteBtn->hide();
mpNewFolderBtn->hide();
break;
case IN_FAVORITE:
mpFavoriteBtn->hide();
mpSocialBtn->hide();
mSearchBar->show();
//mpSearchBtn->show();
mpDeleteBtn->hide();
mpCloseBtn->hide();
mpRemoveFavoriteBtn->show();
mpNewFolderBtn->hide();
break;
default:
break;
}
}
void UBFeaturesActionBar::onSearchTextChanged(QString txt)
{
Q_UNUSED(txt)
emit searchElement(mSearchBar->text());
}
void UBFeaturesActionBar::onActionNewFolder()
{
emit newFolderToCreate();
}
/*
void UBFeaturesActionBar::dragMoveEvent(QDragMoveEvent *event)
{
event->acceptProposedAction();
}
*/
void UBFeaturesActionBar::dragEnterEvent( QDragEnterEvent *event )
{
if (event->mimeData()->hasFormat("text/uri-list"))
event->acceptProposedAction();
}
void UBFeaturesActionBar::dropEvent( QDropEvent *event )
{
QWidget *dest = childAt( event->pos() );
if ( dest == mpDeleteBtn )
{
event->setDropAction( Qt::MoveAction );
event->accept();
emit deleteElements( *event->mimeData() );
}
else if ( dest == mpFavoriteBtn )
{
event->setDropAction( Qt::CopyAction );
event->accept();
emit addToFavorite( *event->mimeData() );
}
else if ( dest == mpRemoveFavoriteBtn )
{
event->setDropAction( Qt::MoveAction );
event->accept();
emit removeFromFavorite( *event->mimeData() );
}
}
UBFeaturesActionBar::~UBFeaturesActionBar()
{
}
#ifndef UBFEATURESACTIONBAR_H
#define UBFEATURESACTIONBAR_H
#include <QWidget>
#include <QToolButton>
#include <QDropEvent>
#include "UBLibActionBar.h"
#include "board/UBFeaturesController.h"
enum UBFeaturesActionBarState
{
IN_ROOT,
IN_FOLDER,
IN_PROPERTIES,
IN_FAVORITE
};
class UBFeaturesActionBar : public QWidget
{
Q_OBJECT
public:
UBFeaturesActionBar(UBFeaturesController *controller, QWidget* parent=0, const char* name="UBFeaturesActionBar");
~UBFeaturesActionBar();
void setCurrentState( UBFeaturesActionBarState state );
signals:
void searchElement(const QString &text);
void newFolderToCreate();
void deleteElements( const QMimeData &data );
void addToFavorite( const QMimeData &data );
void removeFromFavorite( const QMimeData &data );
private slots:
void onSearchTextChanged(QString txt);
void onActionNewFolder();
protected:
//void dragMoveEvent(QDragMoveEvent *event);
void dragEnterEvent( QDragEnterEvent *event );
void dropEvent( QDropEvent *event );
private:
void setButtons();
UBFeaturesController *featuresController;
UBFeaturesActionBarState currentState;
eButtonSet mCrntButtonSet;
eButtonSet mPreviousButtonSet;
QButtonGroup* mButtonGroup;
QLineEdit* mSearchBar;
QHBoxLayout* mLayout;
QAction* mpFavoriteAction;
QAction* mpSocialAction;
QAction* mpDeleteAction;
QAction* mpSearchAction;
QAction* mpCloseAction;
QAction* mpRemoveFavorite;
QAction* mpNewFolderAction;
UBActionButton* mpFavoriteBtn;
UBActionButton* mpSocialBtn;
UBActionButton* mpDeleteBtn;
//UBActionButton* mpSearchBtn;
UBActionButton* mpCloseBtn;
UBActionButton* mpRemoveFavoriteBtn;
UBActionButton* mpNewFolderBtn;
};
#endif
\ No newline at end of file
This diff is collapsed.
#ifndef UBFEATURESWIDGET_H
#define UBFEATURESWIDGET_H
#include <QWidget>
#include <QListView>
#include <QGraphicsView>
#include <QAbstractListModel>
#include <QPixmap>
#include <QVBoxLayout>
#include <QSlider>
#include <QUrl>
#include <QStyledItemDelegate>
#include <QLocale>
#include <QGraphicsLinearLayout>
#include <QStackedWidget>
#include <QDropEvent>
#include "UBDockPaletteWidget.h"
//#include "UBLibActionBar.h"
#include "board/UBFeaturesController.h"
#include "UBFeaturesActionBar.h"
#define THUMBNAIL_WIDTH 400
#define ID_LISTVIEW 0
#define ID_PROPERTIES 1
class UBListModel;
class UBFeaturesModel;
class UBFeaturesItemDelegate;
class UBFeaturesPathItemDelegate;
class UBFeaturesProxyModel;
class UBFeaturesSearchProxyModel;
class UBFeaturesPathProxyModel;
class UBFeaturesPathViewer;
class UBFeatureProperties;
class UBFeatureItemButton;
class UBFeaturesListView;
class UBFeaturesWidget : public UBDockPaletteWidget
{
Q_OBJECT
public:
UBFeaturesWidget(QWidget* parent=0, const char* name="UBFeaturesWidget");
virtual ~UBFeaturesWidget();
bool visibleInMode(eUBDockPaletteWidgetMode mode)
{
return mode == eUBDockPaletteWidget_BOARD
|| mode == eUBDockPaletteWidget_DESKTOP;
}
UBFeaturesController * getFeaturesController()const { return controller; };
static const int minThumbnailSize = 20;
static const int maxThumbnailSize = 100;
static const int defaultThumbnailSize = 40;
private:
void switchToListView();
void switchToProperties();
UBFeaturesController *controller;
UBFeaturesItemDelegate *itemDelegate;
UBFeaturesPathItemDelegate *pathItemDelegate;
UBFeaturesModel *featuresModel;
UBFeaturesProxyModel *featuresProxyModel;
UBFeaturesSearchProxyModel *featuresSearchModel;
UBFeaturesPathProxyModel *featuresPathModel;
UBFeaturesListView *featuresListView;
UBFeaturesListView *pathListView;
QSlider *thumbSlider;
QVBoxLayout *layout;
//UBFeaturesPathViewer *pathViewer;
QGraphicsScene *pathScene;
UBFeaturesActionBar *mActionBar;
UBFeatureProperties *featureProperties;
QStackedWidget *stackedWidget;
int currentStackedWidget;
QModelIndex trashIndex;
private slots:
void currentSelected( const QModelIndex & );
//void currentPathChanged(const QString &);
void currentPathChanged( const QModelIndex & );
void searchStarted( const QString & );
void createNewFolder();
void deleteElements( const QMimeData & );
void addToFavorite( const QMimeData & );
void removeFromFavorite( const QMimeData & );
void thumbnailSizeChanged( int );
protected:
bool eventFilter(QObject *target, QEvent *event);
};
class UBFeaturesListView : public QListView
{
Q_OBJECT
public:
UBFeaturesListView( QWidget* parent=0, const char* name="UBFeaturesListView" );
virtual ~UBFeaturesListView() {;}
protected:
virtual void dragEnterEvent( QDragEnterEvent *event );
virtual void dropEvent( QDropEvent *event );
};
class UBFeatureProperties : public QWidget
{
Q_OBJECT
public:
UBFeatureProperties(QWidget* parent=0, const char* name="UBFeatureProperties");
~UBFeatureProperties();
void showElement(const UBFeature &elem);
protected:
//void resizeEvent(QResizeEvent *event);
//void showEvent(QShowEvent *event);
private slots:
void onAddToPage();
//void onAddToLib();
//void onSetAsBackground();
//void onBack();
private:
QVBoxLayout* mpLayout;
QHBoxLayout* mpButtonLayout;
UBFeatureItemButton* mpAddPageButton;
UBFeatureItemButton* mpAddToLibButton;
UBFeatureItemButton* mpSetAsBackgroundButton;
QLabel* mpObjInfoLabel;
//QTreeWidget* mpObjInfos;
QLabel* mpThumbnail;
QPixmap* mpOrigPixmap;
int maxThumbHeight;
UBFeature *mpElement;
//QTreeWidgetItem* mpItem;
};
class UBFeatureItemButton : public QPushButton
{
public:
UBFeatureItemButton(QWidget* parent=0, const char* name="UBFeatureItemButton");
~UBFeatureItemButton();
};
class UBFeaturesModel : public QAbstractListModel
{
Q_OBJECT
public:
UBFeaturesModel( QObject *parent = 0 ) : QAbstractListModel(parent) {;}
virtual ~UBFeaturesModel(){;}
void addItem( const UBFeature &item );
void deleteFavoriteItem( const QString &path );
QVariant data( const QModelIndex &index, int role = Qt::DisplayRole ) const;
QMimeData *mimeData( const QModelIndexList &indexes ) const;
QStringList mimeTypes() const;
int rowCount( const QModelIndex &parent ) const;
Qt::ItemFlags flags( const QModelIndex &index ) const;
bool dropMimeData(const QMimeData *mimeData, Qt::DropAction action, int row, int column, const QModelIndex &parent);
bool removeRows(int row, int count, const QModelIndex &parent = QModelIndex());
bool removeRow(int row, const QModelIndex &parent = QModelIndex());
Qt::DropActions supportedDropActions() const { return Qt::MoveAction | Qt::CopyAction; }
void setFeaturesList( QList <UBFeature> *flist ) { featuresList = flist; }
private:
QList <UBFeature> *featuresList;
};
class UBFeaturesProxyModel : public QSortFilterProxyModel
{
Q_OBJECT
public:
UBFeaturesProxyModel(QObject *parent = 0) : QSortFilterProxyModel(parent) {;}
virtual ~UBFeaturesProxyModel() {}
protected:
virtual bool filterAcceptsRow ( int sourceRow, const QModelIndex & sourceParent ) const;
};
class UBFeaturesSearchProxyModel : public QSortFilterProxyModel
{
Q_OBJECT
public:
UBFeaturesSearchProxyModel(QObject *parent = 0) : QSortFilterProxyModel(parent) {;}
virtual ~UBFeaturesSearchProxyModel() {}
protected:
virtual bool filterAcceptsRow ( int sourceRow, const QModelIndex & sourceParent ) const;
};
class UBFeaturesPathProxyModel : public QSortFilterProxyModel
{
Q_OBJECT
public:
UBFeaturesPathProxyModel(QObject *parent = 0) : QSortFilterProxyModel(parent) {;}
virtual ~UBFeaturesPathProxyModel() {}
void setPath( const QString &p ) { path = p; }
protected:
virtual bool filterAcceptsRow ( int sourceRow, const QModelIndex & sourceParent ) const;
private:
QString path;
};
class UBFeaturesItemDelegate : public QStyledItemDelegate
{
Q_OBJECT
public:
UBFeaturesItemDelegate(QWidget *parent = 0, const QListView *lw = 0) : QStyledItemDelegate(parent) { listView = lw; }
~UBFeaturesItemDelegate() {}
//UBFeaturesItemDelegate(const QListView *lw = 0) { listView = lw; };
//void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const;
//QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const;
virtual QString displayText ( const QVariant & value, const QLocale & locale ) const;
private:
const QListView *listView;
};
class UBFeaturesPathItemDelegate : public QStyledItemDelegate
{
Q_OBJECT
public:
UBFeaturesPathItemDelegate(QWidget *parent = 0);
~UBFeaturesPathItemDelegate();
virtual QString displayText ( const QVariant & value, const QLocale & locale ) const;
void paint( QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const;
private:
QPixmap *arrowPixmap;
};
#endif // UBFEATURESWIDGET_H
......@@ -29,6 +29,7 @@
#include <QVBoxLayout>
#include "UBThumbnailWidget.h"
#include "board/UBLibraryController.h"
class UBLibraryController;
class UBChainedLibElement;
......
......@@ -46,6 +46,8 @@ HEADERS += src/gui/UBThumbnailView.h \
src/gui/UBLibWebView.h \
src/gui/UBDownloadWidget.h \
src/gui/UBDockDownloadWidget.h \
src/gui/UBFeaturesWidget.h \
src/gui/UBFeaturesActionBar.h \
src/gui/UBDockTeacherGuideWidget.h \
src/gui/UBTeacherGuideWidget.h \
src/gui/UBTeacherGuideWidgetsTools.h \
......@@ -99,6 +101,8 @@ SOURCES += src/gui/UBThumbnailView.cpp \
src/gui/UBLibWebView.cpp \
src/gui/UBDownloadWidget.cpp \
src/gui/UBDockDownloadWidget.cpp \
src/gui/UBFeaturesWidget.cpp \
src/gui/UBFeaturesActionBar.cpp \
src/gui/UBDockTeacherGuideWidget.cpp \
src/gui/UBTeacherGuideWidget.cpp \
src/gui/UBTeacherGuideWidgetsTools.cpp \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment