FougTools  0.7.0dev-046fb6a
Handy tools for C++, Qt and OpenCascade
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
line_numbers_bar.h
Go to the documentation of this file.
1 /****************************************************************************
2 ** FougTools
3 ** Copyright Fougue (30 Mar. 2015)
4 ** contact@fougue.pro
5 **
6 ** This software is a computer program whose purpose is to provide utility
7 ** tools for the C++ language and the Qt toolkit.
8 **
9 ** This software is governed by the CeCILL-C license under French law and
10 ** abiding by the rules of distribution of free software. You can use,
11 ** modify and/ or redistribute the software under the terms of the CeCILL-C
12 ** license as circulated by CEA, CNRS and INRIA at the following URL
13 ** "http://www.cecill.info".
14 ****************************************************************************/
15 
16 #pragma once
17 
18 #include "gui.h"
19 // QtWidgets
20 #include <QWidget>
21 class QTextEdit;
22 
23 namespace qtgui {
24 
25 class QTTOOLS_GUI_EXPORT LineNumbersBar : public QWidget
26 {
27  Q_OBJECT
28 
29 public:
30  LineNumbersBar(QWidget* parent = NULL);
31  ~LineNumbersBar();
32 
33  void setCurrentLine(int lineno);
34  void setStopLine(int lineno);
35  void setBugLine(int lineno);
36  void setTextEdit(QTextEdit* edit);
37 
38 protected:
39  void paintEvent(QPaintEvent* event) Q_DECL_OVERRIDE;
40  bool event(QEvent *event) Q_DECL_OVERRIDE;
41 
42 private:
43  void updateWidget();
44 
45  class Private;
46  Private* const d;
47 };
48 
49 } //namespace qtgui
Definition: abstract_length_editor.cpp:20
Provides numbering of the lines of a QTextEdit as a vertical bar.
Definition: line_numbers_bar.h:25
#define QTTOOLS_GUI_EXPORT
Definition: gui.h:27