- enhancement: click the encoding info in the statusbar will show encoding menu

This commit is contained in:
royqh1979@gmail.com 2021-10-15 10:23:46 +08:00
parent 0c6f4a10a4
commit b5523aaeda
10 changed files with 168 additions and 98 deletions

View File

@ -3,6 +3,7 @@ Version 0.6.7
- adjust: the max value of the debug console's vertical scrollbar.
- fix: shfit+click not correctly set selection's end
- fix: ctrl+home/end not correctly set cursor to start/end of the editor
- enhancement: click the encoding info in the statusbar will show encoding menu
Version 0.6.6
- fix: crash when create new file

View File

@ -115,6 +115,7 @@ SOURCES += \
widgets/functiontooltipwidget.cpp \
widgets/headercompletionpopup.cpp \
widgets/issuestable.cpp \
widgets/labelwithmenu.cpp \
widgets/macroinfomodel.cpp \
widgets/newprojectdialog.cpp \
widgets/qconsole.cpp \
@ -226,6 +227,7 @@ HEADERS += \
widgets/functiontooltipwidget.h \
widgets/headercompletionpopup.h \
widgets/issuestable.h \
widgets/labelwithmenu.h \
widgets/macroinfomodel.h \
widgets/newprojectdialog.h \
widgets/qconsole.h \

Binary file not shown.

View File

@ -82,17 +82,17 @@
<context>
<name>BacktraceModel</name>
<message>
<location filename="debugger.cpp" line="1896"/>
<location filename="debugger.cpp" line="1889"/>
<source>Function</source>
<translation></translation>
</message>
<message>
<location filename="debugger.cpp" line="1898"/>
<location filename="debugger.cpp" line="1891"/>
<source>Filename</source>
<translation></translation>
</message>
<message>
<location filename="debugger.cpp" line="1900"/>
<location filename="debugger.cpp" line="1893"/>
<source>Line</source>
<translation></translation>
</message>
@ -100,17 +100,17 @@
<context>
<name>BreakpointModel</name>
<message>
<location filename="debugger.cpp" line="1765"/>
<location filename="debugger.cpp" line="1758"/>
<source>Filename</source>
<translation></translation>
</message>
<message>
<location filename="debugger.cpp" line="1767"/>
<location filename="debugger.cpp" line="1760"/>
<source>Line</source>
<translation></translation>
</message>
<message>
<location filename="debugger.cpp" line="1769"/>
<location filename="debugger.cpp" line="1762"/>
<source>Condition</source>
<translation></translation>
</message>
@ -836,68 +836,68 @@ Are you really want to continue?</source>
<context>
<name>Debugger</name>
<message>
<location filename="debugger.cpp" line="33"/>
<location filename="debugger.cpp" line="34"/>
<source>No compiler set</source>
<translation></translation>
</message>
<message>
<location filename="debugger.cpp" line="34"/>
<location filename="debugger.cpp" line="35"/>
<source>No compiler set is configured.</source>
<translation></translation>
</message>
<message>
<location filename="debugger.cpp" line="34"/>
<location filename="debugger.cpp" line="35"/>
<source>Can&apos;t start debugging.</source>
<translation></translation>
</message>
<message>
<location filename="debugger.cpp" line="43"/>
<location filename="debugger.cpp" line="44"/>
<source>Debugger path error</source>
<translation></translation>
</message>
<message>
<location filename="debugger.cpp" line="44"/>
<location filename="debugger.cpp" line="45"/>
<source>Debugger&apos;s path &quot;%1&quot; contains non-ascii characters.</source>
<translation>&quot;%1&quot;ASCII字符</translation>
</message>
<message>
<location filename="debugger.cpp" line="47"/>
<location filename="debugger.cpp" line="48"/>
<source>This prevents it from executing.</source>
<translation></translation>
</message>
<message>
<location filename="debugger.cpp" line="53"/>
<location filename="debugger.cpp" line="54"/>
<source>Debugger not exists</source>
<translation></translation>
</message>
<message>
<location filename="debugger.cpp" line="54"/>
<location filename="debugger.cpp" line="55"/>
<source>Can&apos;&apos;t find debugger in : &quot;%1&quot;</source>
<translation>&quot;%1&quot;</translation>
</message>
<message>
<location filename="debugger.cpp" line="247"/>
<location filename="debugger.cpp" line="326"/>
<location filename="debugger.cpp" line="248"/>
<location filename="debugger.cpp" line="327"/>
<source>Execute to evaluate</source>
<translation></translation>
</message>
<message>
<location filename="debugger.cpp" line="324"/>
<location filename="debugger.cpp" line="325"/>
<source>Not found in current context</source>
<translation></translation>
</message>
<message>
<location filename="debugger.cpp" line="436"/>
<location filename="debugger.cpp" line="437"/>
<source>Compile</source>
<translation></translation>
</message>
<message>
<location filename="debugger.cpp" line="437"/>
<location filename="debugger.cpp" line="438"/>
<source>Source file is more recent than executable.</source>
<translation></translation>
</message>
<message>
<location filename="debugger.cpp" line="437"/>
<location filename="debugger.cpp" line="438"/>
<source>Recompile?</source>
<translation></translation>
</message>
@ -2686,7 +2686,7 @@ Are you really want to continue?</source>
</message>
<message>
<location filename="mainwindow.ui" line="295"/>
<location filename="mainwindow.cpp" line="2777"/>
<location filename="mainwindow.cpp" line="2787"/>
<source>Issues</source>
<translation></translation>
</message>
@ -2889,8 +2889,8 @@ Are you really want to continue?</source>
<location filename="mainwindow.ui" line="1165"/>
<location filename="mainwindow.cpp" line="1174"/>
<location filename="mainwindow.cpp" line="1185"/>
<location filename="mainwindow.cpp" line="2473"/>
<location filename="mainwindow.cpp" line="2484"/>
<location filename="mainwindow.cpp" line="2483"/>
<location filename="mainwindow.cpp" line="2494"/>
<source>Compile</source>
<translation></translation>
</message>
@ -3334,7 +3334,7 @@ Are you really want to continue?</source>
</message>
<message>
<location filename="mainwindow.ui" line="1656"/>
<location filename="mainwindow.cpp" line="3591"/>
<location filename="mainwindow.cpp" line="3601"/>
<source>Clear all breakpoints</source>
<translation></translation>
</message>
@ -3435,7 +3435,7 @@ Are you really want to continue?</source>
</message>
<message>
<location filename="mainwindow.ui" line="1807"/>
<location filename="mainwindow.cpp" line="4105"/>
<location filename="mainwindow.cpp" line="4115"/>
<source>Rename Symbol</source>
<translation></translation>
</message>
@ -3456,13 +3456,13 @@ Are you really want to continue?</source>
</message>
<message>
<location filename="mainwindow.ui" line="1827"/>
<location filename="mainwindow.cpp" line="4209"/>
<location filename="mainwindow.cpp" line="4219"/>
<source>Export As RTF</source>
<translation>RTF</translation>
</message>
<message>
<location filename="mainwindow.ui" line="1832"/>
<location filename="mainwindow.cpp" line="4231"/>
<location filename="mainwindow.cpp" line="4241"/>
<source>Export As HTML</source>
<translation>HTML</translation>
</message>
@ -3474,10 +3474,10 @@ Are you really want to continue?</source>
<message>
<location filename="mainwindow.ui" line="1840"/>
<source>Ctrl+M</source>
<translation type="unfinished"></translation>
<translation>Ctrl+M</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="1972"/>
<location filename="mainwindow.cpp" line="1977"/>
<source>File Encoding</source>
<translation></translation>
</message>
@ -3522,8 +3522,9 @@ Are you really want to continue?</source>
</message>
<message>
<location filename="mainwindow.cpp" line="688"/>
<source>Line:%1 Col:%2 Selected:%3 Lines:%4 Length:%5</source>
<translation>:%1 :%2 :%3 :%4 :%5</translation>
<source>Line: %1 Col: %2 Selected: %3 Lines: %4 Length: %5</source>
<oldsource>Line:%1 Col:%2 Selected:%3 Lines:%4 Length:%5</oldsource>
<translation type="unfinished">: %1 : %2 :%3 : %4 : %5</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="706"/>
@ -3690,6 +3691,11 @@ Are you really want to continue?</source>
<source>Export</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="122"/>
<source>Insert Snippet</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="1613"/>
<source>Show debug logs in the debug console</source>
@ -3782,141 +3788,141 @@ Are you really want to continue?</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="1938"/>
<location filename="mainwindow.cpp" line="1943"/>
<source>Character sets</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2051"/>
<location filename="mainwindow.cpp" line="2056"/>
<source>%1 files autosaved</source>
<translation>%1</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2393"/>
<location filename="mainwindow.cpp" line="2403"/>
<source>Save project</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2394"/>
<location filename="mainwindow.cpp" line="2404"/>
<source>The project &apos;%1&apos; has modifications.</source>
<translation>&apos;%1&apos;</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2396"/>
<location filename="mainwindow.cpp" line="2406"/>
<source>Do you want to save it?</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="3592"/>
<location filename="mainwindow.cpp" line="3602"/>
<source>Do you really want to clear all breakpoints in this file?</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="3770"/>
<location filename="mainwindow.cpp" line="3780"/>
<source>New project</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="3771"/>
<location filename="mainwindow.cpp" line="3781"/>
<source>Close %1 and start new project?</source>
<translation>&apos;%1&apos;?</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="3783"/>
<location filename="mainwindow.cpp" line="3793"/>
<source>Folder not exist</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="3784"/>
<location filename="mainwindow.cpp" line="3794"/>
<source>Folder &apos;%1&apos; doesn&apos;t exist. Create it now?</source>
<translation>&apos;%1&apos;</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="3791"/>
<location filename="mainwindow.cpp" line="3801"/>
<source>Can&apos;t create folder</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="3792"/>
<location filename="mainwindow.cpp" line="3802"/>
<source>Failed to create folder &apos;%1&apos;.</source>
<translation>&apos;%1&apos;</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="3807"/>
<location filename="mainwindow.cpp" line="3817"/>
<source>Save new project as</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="3809"/>
<location filename="mainwindow.cpp" line="3819"/>
<source>Red panda Dev-C++ project file (*.dev)</source>
<translation>Dev-C++ (*.dev)</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="3820"/>
<location filename="mainwindow.cpp" line="3830"/>
<source>New project fail</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="3821"/>
<location filename="mainwindow.cpp" line="3831"/>
<source>Can&apos;t assign project template</source>
<translation>使</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="3878"/>
<location filename="mainwindow.cpp" line="3888"/>
<source>Add to project</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="4091"/>
<location filename="mainwindow.cpp" line="4101"/>
<source>Rename Error</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="4092"/>
<location filename="mainwindow.cpp" line="4102"/>
<source>Symbol &apos;%1&apos; is defined in system header.</source>
<translation>&apos;%1&apos;</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="4106"/>
<location filename="mainwindow.cpp" line="4116"/>
<source>New Name</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="4154"/>
<location filename="mainwindow.cpp" line="4164"/>
<location filename="mainwindow.cpp" line="4174"/>
<source>Replace Error</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="4155"/>
<location filename="mainwindow.cpp" line="4165"/>
<source>Can&apos;t open file &apos;%1&apos; for replace!</source>
<translation>&apos;%1&apos;</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="4165"/>
<location filename="mainwindow.cpp" line="4175"/>
<source>Contents has changed since last search!</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="4211"/>
<location filename="mainwindow.cpp" line="4221"/>
<source>Rich Text Format Files (*.rtf)</source>
<translation>RTF格式文件 (*.rtf)</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="4233"/>
<location filename="mainwindow.cpp" line="4243"/>
<source>HTML Files (*.html)</source>
<translation>HTML文件 (*.html)</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="757"/>
<location filename="mainwindow.cpp" line="1595"/>
<location filename="mainwindow.cpp" line="1963"/>
<location filename="mainwindow.cpp" line="2480"/>
<location filename="mainwindow.cpp" line="2565"/>
<location filename="mainwindow.cpp" line="2672"/>
<location filename="mainwindow.cpp" line="2684"/>
<location filename="mainwindow.cpp" line="3019"/>
<location filename="mainwindow.cpp" line="3031"/>
<location filename="mainwindow.cpp" line="1968"/>
<location filename="mainwindow.cpp" line="2490"/>
<location filename="mainwindow.cpp" line="2575"/>
<location filename="mainwindow.cpp" line="2682"/>
<location filename="mainwindow.cpp" line="2694"/>
<location filename="mainwindow.cpp" line="3029"/>
<location filename="mainwindow.cpp" line="3041"/>
<source>Error</source>
<translation></translation>
</message>
@ -3926,75 +3932,75 @@ Are you really want to continue?</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2474"/>
<location filename="mainwindow.cpp" line="2484"/>
<source>File &apos;%1&apos; was changed.</source>
<translation>&apos;%1&apos;</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2474"/>
<location filename="mainwindow.cpp" line="2484"/>
<source>Reload its content from disk?</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2485"/>
<location filename="mainwindow.cpp" line="2495"/>
<source>File &apos;%1&apos; was removed.</source>
<translation>&apos;%1&apos;</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2485"/>
<location filename="mainwindow.cpp" line="2495"/>
<source>Keep it open?</source>
<translation>C++</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2561"/>
<location filename="mainwindow.cpp" line="2571"/>
<source>Open</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2851"/>
<location filename="mainwindow.cpp" line="2861"/>
<source>Compile Failed</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2856"/>
<location filename="mainwindow.cpp" line="2866"/>
<source>Run Failed</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="3048"/>
<location filename="mainwindow.cpp" line="3062"/>
<location filename="mainwindow.cpp" line="3058"/>
<location filename="mainwindow.cpp" line="3072"/>
<source>Confirm Convertion</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="3049"/>
<location filename="mainwindow.cpp" line="3063"/>
<location filename="mainwindow.cpp" line="3059"/>
<location filename="mainwindow.cpp" line="3073"/>
<source>The editing file will be saved using %1 encoding. &lt;br /&gt;This operation can&apos;t be reverted. &lt;br /&gt;Are you sure to continue?</source>
<translation>使%1&lt;br /&gt;&lt;br /&gt;</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="3229"/>
<location filename="mainwindow.cpp" line="3239"/>
<source>New Watch Expression</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="3230"/>
<location filename="mainwindow.cpp" line="3240"/>
<source>Enter Watch Expression (it is recommended to use &apos;this-&gt;&apos; for class members):</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="3286"/>
<location filename="mainwindow.cpp" line="3296"/>
<source>Parsing file %1 of %2: &quot;%3&quot;</source>
<translation>%1/%2&quot;%3&quot;</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="3308"/>
<location filename="mainwindow.cpp" line="3314"/>
<location filename="mainwindow.cpp" line="3318"/>
<location filename="mainwindow.cpp" line="3324"/>
<source>Done parsing %1 files in %2 seconds</source>
<translation>%1,%2</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="3311"/>
<location filename="mainwindow.cpp" line="3321"/>
<source>(%1 files per second)</source>
<translation>(%1</translation>
</message>
@ -5400,17 +5406,17 @@ Are you really want to continue?</source>
<context>
<name>RegisterModel</name>
<message>
<location filename="debugger.cpp" line="2202"/>
<location filename="debugger.cpp" line="2195"/>
<source>Register</source>
<translation></translation>
</message>
<message>
<location filename="debugger.cpp" line="2204"/>
<location filename="debugger.cpp" line="2197"/>
<source>Value(Hex)</source>
<translation>(HEX)</translation>
</message>
<message>
<location filename="debugger.cpp" line="2206"/>
<location filename="debugger.cpp" line="2199"/>
<source>Value(Dec)</source>
<translation>(DEC)</translation>
</message>
@ -6238,12 +6244,12 @@ Are you really want to continue?</source>
<context>
<name>WatchModel</name>
<message>
<location filename="debugger.cpp" line="2148"/>
<location filename="debugger.cpp" line="2141"/>
<source>Expression</source>
<translation></translation>
</message>
<message>
<location filename="debugger.cpp" line="2150"/>
<location filename="debugger.cpp" line="2143"/>
<source>Value</source>
<translation></translation>
</message>

View File

@ -57,7 +57,7 @@ MainWindow::MainWindow(QWidget *parent)
ui->setupUi(this);
// status bar
mFileInfoStatus=new QLabel();
mFileEncodingStatus = new QLabel();
mFileEncodingStatus = new LabelWithMenu();
mFileModeStatus = new QLabel();
mFileInfoStatus->setStyleSheet("margin-left:10px; margin-right:10px");
mFileEncodingStatus->setStyleSheet("margin-left:10px; margin-right:10px");
@ -119,7 +119,7 @@ MainWindow::MainWindow(QWidget *parent)
rebuildOpenedFileHisotryMenu();
mMenuInsertCodeSnippet = new QMenu();
mMenuInsertCodeSnippet->setTitle("Insert Snippet");
mMenuInsertCodeSnippet->setTitle(tr("Insert Snippet"));
ui->menuCode->insertMenu(ui->actionReformat_Code,mMenuInsertCodeSnippet);
ui->menuCode->insertSeparator(ui->actionReformat_Code);
connect(mMenuInsertCodeSnippet,&QMenu::aboutToShow,
@ -686,11 +686,11 @@ void MainWindow::updateStatusbarForLineCol()
if (e!=nullptr) {
int col = e->charToColumn(e->caretY(),e->caretX());
QString msg = tr("Line:%1 Col:%2 Selected:%3 Lines:%4 Length:%5")
.arg(e->caretY(),4)
.arg(col,3)
.arg(e->selText().length(),6)
.arg(e->lines()->count(),4)
.arg(e->lines()->getTextLength(),6);
.arg(e->caretY())
.arg(col)
.arg(e->selText().length())
.arg(e->lines()->count())
.arg(e->lines()->getTextLength());
mFileInfoStatus->setText(msg);
} else {
mFileInfoStatus->setText("");
@ -1930,6 +1930,11 @@ void MainWindow::buildContextMenus()
toolButton->setDefaultAction(mClassBrowser_Show_Inherited);
hlayout->addWidget(toolButton);
hlayout->addStretch();
//menu for statusbar
mFileEncodingStatus->setContextMenuPolicy(Qt::CustomContextMenu);
connect(mFileEncodingStatus,&QWidget::customContextMenuRequested,
this, &MainWindow::onFileEncodingContextMenu);
}
void MainWindow::buildEncodingMenu()
@ -2185,6 +2190,11 @@ void MainWindow::onDebugConsoleContextMenu(const QPoint &pos)
menu.exec(ui->debugConsole->mapToGlobal(pos));
}
void MainWindow::onFileEncodingContextMenu(const QPoint &pos)
{
mMenuEncoding->exec(mFileEncodingStatus->mapToGlobal(pos));
}
void MainWindow::onShowInsertCodeSnippetMenu()
{
mMenuInsertCodeSnippet->clear();

View File

@ -15,6 +15,7 @@
#include "codesnippetsmanager.h"
#include "todoparser.h"
#include "toolsmanager.h"
#include "widgets/labelwithmenu.h"
QT_BEGIN_NAMESPACE
@ -199,6 +200,7 @@ private slots:
void onProjectViewContextMenu(const QPoint& pos);
void onClassBrowserContextMenu(const QPoint& pos);
void onDebugConsoleContextMenu(const QPoint& pos);
void onFileEncodingContextMenu(const QPoint& pos);
void onShowInsertCodeSnippetMenu();
@ -405,7 +407,7 @@ private:
Ui::MainWindow *ui;
EditorList *mEditorList;
QLabel *mFileInfoStatus;
QLabel *mFileEncodingStatus;
LabelWithMenu *mFileEncodingStatus;
QLabel *mFileModeStatus;
QMenu *mMenuEncoding;
QMenu *mMenuExport;

View File

@ -283,7 +283,7 @@
<enum>QTabWidget::South</enum>
</property>
<property name="currentIndex">
<number>1</number>
<number>2</number>
</property>
<widget class="QWidget" name="tabIssues">
<attribute name="icon">
@ -388,16 +388,16 @@
</attribute>
<layout class="QHBoxLayout" name="horizontalLayout_4">
<property name="leftMargin">
<number>2</number>
<number>0</number>
</property>
<property name="topMargin">
<number>2</number>
<number>0</number>
</property>
<property name="rightMargin">
<number>2</number>
<number>0</number>
</property>
<property name="bottomMargin">
<number>2</number>
<number>0</number>
</property>
<item>
<widget class="QSplitter" name="splitter">

View File

@ -61,5 +61,19 @@
"description": "",
"prefix": "function()",
"section": -1
},
{
"caption": "Comment Header",
"code": "/**\r\n * @file %REPL_BEGIN%<SOURCENAME>%REPL_END% \r\n * @brief: %INSERT%\r\n * @version: %INSERT% \r\n * @copyright: %INSERT%\r\n * @author: %INSERT%\r\n * @date: <DATETIME>\r\n * \r\n **/",
"description": "",
"prefix": "",
"section": 0
},
{
"caption": "Date/Time",
"code": "<DATETIME>",
"description": "",
"prefix": "",
"section": 0
}
]

View File

@ -0,0 +1,18 @@
#include "labelwithmenu.h"
#include <QApplication>
#include <QContextMenuEvent>
#include <QMouseEvent>
LabelWithMenu::LabelWithMenu(QWidget* parent):QLabel(parent)
{
}
void LabelWithMenu::mousePressEvent(QMouseEvent *event)
{
QContextMenuEvent *e = new QContextMenuEvent(QContextMenuEvent::Reason::Mouse,
event->pos());
QApplication::instance()->postEvent(this,e);
event->accept();
}

View File

@ -0,0 +1,17 @@
#ifndef LABELWITHMENU_H
#define LABELWITHMENU_H
#include <QLabel>
class LabelWithMenu : public QLabel
{
Q_OBJECT
public:
explicit LabelWithMenu(QWidget* parent = nullptr);
// QWidget interface
protected:
void mousePressEvent(QMouseEvent *event) override;
};
#endif // LABELWITHMENU_H