1 /** @file documentpopupwidget.h 2 * 3 * @authors Copyright (c) 2014-2017 Jaakko Keränen <jaakko.keranen@iki.fi> 4 * 5 * @par License 6 * LGPL: http://www.gnu.org/licenses/lgpl.html 7 * 8 * <small>This program is free software; you can redistribute it and/or modify 9 * it under the terms of the GNU Lesser General Public License as published by 10 * the Free Software Foundation; either version 3 of the License, or (at your 11 * option) any later version. This program is distributed in the hope that it 12 * will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty 13 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser 14 * General Public License for more details. You should have received a copy of 15 * the GNU Lesser General Public License along with this program; if not, see: 16 * http://www.gnu.org/licenses</small> 17 */ 18 19 #ifndef LIBAPPFW_DOCUMENTPOPUPWIDGET_H 20 #define LIBAPPFW_DOCUMENTPOPUPWIDGET_H 21 22 #include "../DocumentWidget" 23 #include "../ButtonWidget" 24 #include "../PopupWidget" 25 26 namespace de { 27 28 /** 29 * Utility widget that has a document inside a popup. 30 * 31 * @ingroup guiWidgets 32 */ 33 class LIBAPPFW_PUBLIC DocumentPopupWidget : public PopupWidget 34 { 35 Q_OBJECT 36 37 public: 38 DocumentPopupWidget(String const &name = String()); 39 DocumentPopupWidget(ButtonWidget *actionButton, String const &name = String()); 40 41 void setPreferredHeight(Rule const &preferredHeight); 42 void setPreferredHeight(Rule const &preferredHeight, Rule const &maxHeight); 43 44 DocumentWidget &document(); 45 DocumentWidget const &document() const; 46 47 ButtonWidget *button(); 48 49 private: 50 DENG2_PRIVATE(d) 51 }; 52 53 } // namespace de 54 55 #endif // LIBAPPFW_DOCUMENTPOPUPWIDGET_H 56