defuze.me  Client
librarywidget.hpp
00001 /**************************************************************************
00002 ** defuze.me Epitech Innovative Project
00003 **
00004 ** Copyright 2010-2011
00005 **   Athena Calmettes - Jocelyn De La Rosa - Francois Gaillard
00006 **   Adrien Jarthon - Alexandre Moore - Luc Peres - Arnaud Sellier
00007 **
00008 ** All rights reserved.
00009 **************************************************************************/
00010 
00011 #ifndef LIBRARYWIDGET_HPP
00012 #define LIBRARYWIDGET_HPP
00013 
00014 #include "guicore.hpp"
00015 #include "ui_librarywidget.h"
00016 
00017 namespace Library
00018 {
00019 
00020 class LibraryPlugin;
00021 
00022 class LibraryWidget : public Gui::ModuleWidget, private Ui::LibraryWidget
00023 {
00024     Q_OBJECT
00025 
00026 public:
00027     explicit LibraryWidget(LibraryPlugin *library, QWidget *parent = 0);
00028     QTreeView *getTreeViewWidget() const;
00029     QToolButton *getUpdateSourcesButton() const;
00030     QToolButton *getAddSourceButton() const;
00031     QProgressBar *getUpdateProgressBar() const;
00032     void updatingSources();
00033     void endUpdatingSources();
00034 
00035 
00036 protected:
00037     void changeEvent(QEvent *e);
00038 
00039 private slots:
00040 
00041     void toogleItem(const QModelIndex &index);
00042     void on_updateSourcesButton_clicked();
00043     void on_addSourceButton_clicked();
00044     void on_treeView_doubleClicked(const QModelIndex &index);
00045     void on_sortComboBox_currentIndexChanged(int index);
00046     void on_searchLineEdit_textChanged(const QString &arg1);
00047 
00048 private:
00049     LibraryPlugin *library;
00050 
00051 };
00052 
00053 }
00054 #endif // LIBRARYWIDGET_HPP