Mercurial > hg > easaier-soundaccess
view widgets/ExpandWidget.h @ 205:00cf9a7faa4d
add menu and shortcut to show/hide both ExpandWidget (layers and filters, search/info tab)
author | lbajardsilogic |
---|---|
date | Wed, 30 Jan 2008 10:20:41 +0000 |
parents | bc5b79e7b1d8 |
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