Back to index

unity  6.0.0
FilterRatingsWidget.h
Go to the documentation of this file.
00001 // -*- Mode: C++; indent-tabs-mode: nil; tab-width: 2 -*-
00002 /*
00003  * Copyright 2011 Canonical Ltd.
00004  *
00005  * This program is free software: you can redistribute it and/or modify it
00006  * under the terms of the GNU Lesser General Public License version 3, as
00007  * published by the  Free Software Foundation.
00008  *
00009  * This program is distributed in the hope that it will be useful, but
00010  * WITHOUT ANY WARRANTY; without even the implied warranties of
00011  * MERCHANTABILITY, SATISFACTORY QUALITY or FITNESS FOR A PARTICULAR
00012  * PURPOSE.  See the applicable version of the GNU Lesser General Public
00013  * License for more details.
00014  *
00015  * You should have received a copy of both the GNU Lesser General Public
00016  * License version 3 along with this program.  If not, see
00017  * <http://www.gnu.org/licenses/>
00018  *
00019  * Authored by: Gordon Allott <gord.allott@canonical.com>
00020  *
00021  */
00022 
00023 #ifndef UNITYSHELL_FILTERRATINGSWIDGET_H
00024 #define UNITYSHELL_FILTERRATINGSWIDGET_H
00025 
00026 #include <Nux/Nux.h>
00027 #include <Nux/GridHLayout.h>
00028 #include <Nux/HLayout.h>
00029 #include <Nux/VLayout.h>
00030 #include <UnityCore/RatingsFilter.h>
00031 
00032 #include "FilterAllButton.h"
00033 #include "FilterExpanderLabel.h"
00034 
00035 namespace unity
00036 {
00037 namespace dash
00038 {
00039 
00040 class FilterBasicButton;
00041 class FilterRatingsButton;
00042 
00043 class FilterRatingsWidget : public FilterExpanderLabel
00044 {
00045   NUX_DECLARE_OBJECT_TYPE(FilterRatingsWidget, FilterExpanderLabel);
00046 public:
00047   FilterRatingsWidget(NUX_FILE_LINE_PROTO);
00048   virtual ~FilterRatingsWidget();
00049 
00050   void SetFilter(Filter::Ptr const& filter);
00051   std::string GetFilterType();
00052 
00053 private:
00054   FilterAllButton* all_button_;
00055   FilterRatingsButton* ratings_;
00056   RatingsFilter::Ptr filter_;
00057 };
00058 
00059 } // namespace dash
00060 } // namespace unity
00061 
00062 #endif // UNITYSHELL_FILTERRATINGSWIDGET_H