TheChess
|
00001 /* 00002 * thechess, chess game web application written in C++ and based on Wt 00003 * Copyright (C) 2010 Boris Nagaev 00004 * 00005 * thechess is licensed under the GNU GPL Version 2. 00006 * Other versions of the GPL do not apply. 00007 * See the LICENSE file for terms of use. 00008 */ 00009 00010 #ifndef THECHESS_WIDGETS_COMPETITION_LIST_WIDGET_HPP_ 00011 #define THECHESS_WIDGETS_COMPETITION_LIST_WIDGET_HPP_ 00012 00013 #include <boost/tuple/tuple.hpp> 00014 00015 #include <Wt/WContainerWidget> 00016 #include <Wt/WCheckBox> 00017 #include <Wt/Dbo/Query> 00018 namespace dbo = Wt::Dbo; 00019 00020 #include "model/Competition.hpp" 00021 00022 namespace thechess { 00023 namespace widgets { 00024 00025 class CompetitionListModel; 00026 class CompetitionListView; 00027 00028 class CompetitionListWidget : public Wt::WContainerWidget { 00029 public: 00030 typedef boost::tuple<model::CompetitionPtr, Wt::WString, int> Result; 00031 typedef dbo::Query<Result> Q; 00032 00033 CompetitionListWidget(Wt::WContainerWidget* parent=0); 00034 00035 private: 00036 CompetitionListModel* model_; 00037 Wt::WCheckBox* only_my_; 00038 00039 Q query_(); 00040 void apply_(); 00041 void manager_(); 00042 }; 00043 00044 } 00045 } 00046 00047 #endif