rochus-keller / guitools Goto Github PK
View Code? Open in Web Editor NEWSome reusable C++ GUI classes, Qt based
License: GNU General Public License v2.0
Some reusable C++ GUI classes, Qt based
License: GNU General Public License v2.0
When compiling EBNFStudio on Ubuntu 18.04 I fixed a few warnings see bellow:
--------------------------------- AutoMenu.cpp ---------------------------------
index acd549e..eec2f3f 100644
@@ -66,7 +66,7 @@ AutoMenu::AutoMenu(QWidget *parent, bool context)
d_noPopup = p->d_noPopup;
if( context )
{
- registerPopup();
+ registerPopup();
d_noPopup = false;
}
}
@@ -77,11 +77,11 @@ AutoMenu::AutoMenu(const QString& title, QWidget *parent, bool addMenuBar)
connect( this, SIGNAL( aboutToShow() ), this, SLOT( onShow() ) );
if( AutoMenu* p = dynamic_cast<AutoMenu*>( parent ) )
d_noPopup = p->d_noPopup;
- if( addMenuBar )
- {
- if( QMainWindow* w = dynamic_cast<QMainWindow*>( parent ) )
+ if( addMenuBar )
+ {
+ if( QMainWindow* w = dynamic_cast<QMainWindow*>( parent ) )
{
- w->menuBar()->addMenu( this );
+ w->menuBar()->addMenu( this );
d_noPopup = true;
}
}
-------------------------------- CodeEditor.cpp --------------------------------
index f4540d2..564a3d7 100644
@@ -188,9 +188,10 @@ private:
};
CodeEditor::CodeEditor(QWidget *parent) :
- QPlainTextEdit(parent), d_showNumbers(true),
- d_undoAvail(false),d_redoAvail(false),d_copyAvail(false),d_curPos(-1),
- d_pushBackLock(false), d_noEditLock(false), d_linkLineNr(0), d_linkColNr(0),d_paintIndents(true)
+ QPlainTextEdit(parent), d_curPos(-1),d_linkLineNr(0), d_linkColNr(0),
+ d_pushBackLock(false),d_undoAvail(false),d_redoAvail(false),
+ d_copyAvail(false), d_showNumbers(true), d_noEditLock(false),
+ d_paintIndents(true)
{
d_charPerTab = s_charPerTab;
d_typingLatencyMs = s_typingLatencyMs;
@@ -1100,24 +1101,22 @@ void CodeEditor::removeBreakPoint(quint32 l)
bool CodeEditor::toggleBreakPoint(quint32* out)
{
int line = -1;
+ bool ret = false;
getCursorPosition(&line);
if( line == -1 )
line = 0;
if( d_breakPoints.contains(line) )
{
d_breakPoints.remove(line);
- d_numberArea->update();
- if(out)
- *out = line;
- return false;
}else if( line >= 0 )
{
d_breakPoints.insert( line );
- d_numberArea->update();
- if(out)
- *out = line;
- return true;
+ ret = true;
}
+ d_numberArea->update();
+ if(out)
+ *out = line;
+ return ret;
}
void CodeEditor::clearBreakPoints()
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.