TabEditor-Qt/mainwindow.h

40 lines
858 B
C++

#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include "qprogressdialog.h"
#include <QThread>
#include <QMainWindow>
#include <QTableWidget>
#include <QDragEnterEvent>
#include <QMimeData>
#include <QShortcut>
QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACE
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
MainWindow(QWidget *parent = nullptr);
~MainWindow();
void loadTextFile(const QString& fileName);
void dragEnterEvent(QDragEnterEvent *event);
void dropEvent(QDropEvent *event);
void convertTextToSqlite();
void convertSqliteToText();
private slots:
void onOpenButtonClicked();
void onSaveButtonClicked();
private:
Ui::MainWindow *ui;
QProgressDialog* progressDialog; // 添加进度对话框指针
QMenu* menuFile;
QAction* actionFile;
};
#endif // MAINWINDOW_H