1 /*************************************************************************** 2 * copyright : (C) 2003-2017 by Pascal Brachet * 3 * http://www.xm1math.net/texmaker/ * 4 * * 5 * This program is free software; you can redistribute it and/or modify * 6 * it under the terms of the GNU General Public License as published by * 7 * the Free Software Foundation; either version 2 of the License, or * 8 * (at your option) any later version. * 9 * * 10 ***************************************************************************/ 11 12 #ifndef SOURCEVIEW_H 13 #define SOURCEVIEW_H 14 15 #include <QWidget> 16 #include <QFont> 17 #include <QColor> 18 #include <QStackedWidget> 19 #include <QToolBar> 20 #include <QLabel> 21 #include <QSplitter> 22 #include "lightlatexeditor.h" 23 #include "lightlinenumberwidget.h" 24 #include "lightfindwidget.h" 25 #include "lightgotolinewidget.h" 26 #include "minisplitter.h" 27 #include "dropshadowlabel.h" 28 29 class SourceView : public QWidget { 30 Q_OBJECT 31 public: 32 SourceView(QWidget *parent, QFont & efont,bool line, QList<QColor> edcolors, QList<QColor> hicolors); 33 ~SourceView(); 34 LightLatexEditor *editor; 35 QToolBar *centralToolBar; 36 void changeSettings(QFont & new_font,bool line); 37 private: 38 MiniSplitter *splitter; 39 LightLineNumberWidget* m_lineNumberWidget; 40 void setLineNumberWidgetVisible( bool ); 41 QStackedWidget *Stack; 42 DropShadowLabel* titleLabel; 43 LightFindWidget *findwidget; 44 LightGotoLineWidget *gotolinewidget; 45 QString lastdocument; 46 private slots: 47 void fileOpen(); 48 void showFind(); 49 void showGoto(); 50 void checkDiff(); 51 signals: 52 void showDiff(); 53 }; 54 55 #endif 56