1 /******************************************************************* 2 3 Part of the Fritzing project - http://fritzing.org 4 Copyright (c) 2007-2014 Fachhochschule Potsdam - http://fh-potsdam.de 5 6 Fritzing is free software: you can redistribute it and/or modify 7 it under the terms of the GNU General Public License as published by 8 the Free Software Foundation, either version 3 of the License, or 9 (at your option) any later version. 10 11 Fritzing is distributed in the hope that it will be useful, 12 but WITHOUT ANY WARRANTY; without even the implied warranty of 13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 GNU General Public License for more details. 15 16 You should have received a copy of the GNU General Public License 17 along with Fritzing. If not, see <http://www.gnu.org/licenses/>. 18 19 ******************************************************************** 20 21 $Revision: 6904 $: 22 $Author: irascibl@gmail.com $: 23 $Date: 2013-02-26 16:26:03 +0100 (Di, 26. Feb 2013) $ 24 25 ********************************************************************/ 26 27 28 29 #ifndef SKETCHAREAWIDGET_H_ 30 #define SKETCHAREAWIDGET_H_ 31 32 #include <QFrame> 33 #include <QHBoxLayout> 34 #include <QStatusBar> 35 #include <QMainWindow> 36 37 class SketchAreaWidget : public QFrame { 38 Q_OBJECT 39 public: 40 SketchAreaWidget(QWidget *contentView, QMainWindow *parent); 41 SketchAreaWidget(QWidget *contentView, QMainWindow *parent, bool hasToolBar, bool hasStatusBar); 42 virtual ~SketchAreaWidget(); 43 44 QWidget* contentView(); 45 46 void setToolbarWidgets(QList<QWidget*> buttons); 47 void addStatusBar(QStatusBar *); 48 static QWidget *separator(QWidget* parent); 49 class ExpandingLabel * routingStatusLabel(); 50 void setRoutingStatusLabel(ExpandingLabel *); 51 QFrame * toolbar(); 52 53 protected: 54 void init(QWidget *contentView, QMainWindow *parent, bool hasToolBar, bool hasStatusBar); 55 void createLayout(); 56 57 public: 58 static const QString RoutingStateLabelName; 59 60 protected: 61 QWidget *m_contentView; 62 63 QFrame *m_toolbar; 64 QHBoxLayout *m_leftButtonsContainer; 65 QVBoxLayout *m_middleButtonsContainer; 66 QHBoxLayout *m_rightButtonsContainer; 67 QFrame *m_statusBarArea; 68 class ExpandingLabel * m_routingStatusLabel; 69 70 }; 71 72 #endif /* SKETCHAREAWIDGET_H_ */ 73