mirror of
https://github.com/sqlitebrowser/sqlitebrowser.git
synced 2026-01-20 02:50:46 -06:00
A new command is added for commenting or uncommenting SQL code (depending
of the state of the first line of the block).
It is bound to "Ctrl+/" as used by many IDEs ("Ctrl+-" is more standard as
Zoom out). Unusual Scintilla binding for "Ctrl+/" is removed for avoiding
interference.
If there is no selection, the current line is un/commented.
See issue #1614
32 lines
495 B
C++
32 lines
495 B
C++
#ifndef SQLTEXTEDIT_H
|
|
#define SQLTEXTEDIT_H
|
|
|
|
#include "ExtendedScintilla.h"
|
|
|
|
class FindReplaceDialog;
|
|
class SqlUiLexer;
|
|
|
|
/**
|
|
* @brief The SqlTextEdit class
|
|
* This class is based on the QScintilla widget
|
|
*/
|
|
class SqlTextEdit : public ExtendedScintilla
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit SqlTextEdit(QWidget *parent = nullptr);
|
|
~SqlTextEdit() override;
|
|
|
|
static SqlUiLexer* sqlLexer;
|
|
|
|
public slots:
|
|
void reloadSettings();
|
|
|
|
private slots:
|
|
void toggleBlockComment();
|
|
|
|
};
|
|
|
|
#endif
|