Back to index

unity  6.0.0
FilterAllButton.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: Andrea Azzarone <azzaronea@gmail.com>
00020  *
00021  */
00022 
00023 #ifndef UNITYSHELL_FILTERALLBUTTON_H
00024 #define UNITYSHELL_FILTERALLBUTTON_H
00025 
00026 #include <sigc++/connection.h>
00027 #include <UnityCore/Filter.h>
00028 
00029 #include "FilterBasicButton.h"
00030 
00031 namespace unity
00032 {
00033 namespace dash
00034 {
00035 
00036 class FilterAllButton : public FilterBasicButton
00037 {
00038 public:
00039    FilterAllButton(NUX_FILE_LINE_PROTO);
00040    ~FilterAllButton();
00041 
00042    void SetFilter(Filter::Ptr const& filter);
00043 
00044 private:
00045   void OnFilteringChanged(bool filtering);
00046   void OnStateChanged(nux::View* view);
00047 
00048   Filter::Ptr filter_;
00049   sigc::connection filtering_connection_;
00050 };
00051 
00052 } // namespace dash
00053 } // namespace unity
00054 
00055 #endif // UNITYSHELL_FILTERALLBUTTON_H
00056