Mercurial > hg > easaier-soundaccess
view widgets/ExpandWidget.h @ 282:d9319859a4cf tip
(none)
author | benoitrigolleau |
---|---|
date | Fri, 31 Oct 2008 11:00:24 +0000 |
parents | 00cf9a7faa4d |
children |
line wrap: on
line source
/* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */ /* Sound Access EASAIER client application. Silogic 2007. Benoit Rigolleau. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. See the file COPYING included with this distribution for more information. */ #ifndef _EXPAND_WIDGET_H #define _EXPAND_WIDGET_H #include <QApplication> #include <QPushButton> #include <QHBoxLayout> #include <QVBoxLayout> #include <QLayout> #include <QSplitter> #include <QWidget> class QPushButton; class QSplitter; class ExpandWidget : public QSplitter{ Q_OBJECT public: enum Location { Location_Top=0, Location_Right=1, Location_Bottom=2, Location_Left=3 }; ExpandWidget(QWidget *parent=0); void setPanes(QWidget *newCenterPane, QWidget *newOtherPane); void setWidgetLocation(ExpandWidget::Location newWidgetLocation); void setPercentage(int a, int b); inline bool isVisible(){return !m_paneClosed;} signals: void paneStateChanged(bool );//emit true if the pane is visible false if not private slots: void changePaneState(); private: void refreshButtonIcone(); QPushButton *m_button; QWidget *m_centerPane; QWidget *m_otherPane; QLayout *m_layout; ExpandWidget::Location m_widgetLocation; bool m_paneClosed; }; #endif