Skip to content
Snippets Groups Projects
qcustomcanvas.cpp 1.03 KiB
Newer Older
  • Learn to ignore specific revisions
  • mingf2's avatar
    mingf2 committed
    #include "qcustomcanvas.h"
    #include <QDebug>
    
    QCustomCanvas::QCustomCanvas(QWidget *parent) :
        QMainWindow(parent),
        ui(new Ui::PlotCanvas)
    {
        ui->setupUi(this);
        connect(ui->actionClear, &QAction::triggered, this, &QCustomCanvas::handleClear);
        connect(ui->actionFreeze, &QAction::triggered, this, &QCustomCanvas::handleFreeze);
        connect(ui->actionZoomout, &QAction::triggered, this, &QCustomCanvas::handleZoomout);
        connect(ui->actionScreenShot, &QAction::triggered, this, &QCustomCanvas::handleScreenshot);
        connect(ui->actionSave2Txt, &QAction::triggered, this, &QCustomCanvas::handleSave2Txt);
    }
    
    QCustomCanvas::~QCustomCanvas()
    {
        delete ui;
    }
    
    void QCustomCanvas::handleSave2Txt()
    {
        qDebug() << "save canvas to txt";
    }
    void QCustomCanvas::handleClear()
    {
        qDebug() << "clear canvas";
    }
    void QCustomCanvas::handleZoomout()
    {
        qDebug() << "zoom out";
    }
    void QCustomCanvas::handleFreeze()
    {
        qDebug() << "Freeze canvas";
    }
    void QCustomCanvas::handleScreenshot()
    {
        qDebug() << "save canvas to image";
    }