62 lines
1.8 KiB
C++
62 lines
1.8 KiB
C++
#ifndef CTAIHISTORYTOOLS_H
|
|
#define CTAIHISTORYTOOLS_H
|
|
|
|
#include <QWidget>
|
|
#include <QHBoxLayout>
|
|
#include <QPushButton>
|
|
#include <QComboBox>
|
|
#include <QLabel>
|
|
#include <QMenu>
|
|
#include <QAction>
|
|
#include "sui_base.h"
|
|
class ctaiHistoryTools : public QWidget
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
ctaiHistoryTools();
|
|
~ctaiHistoryTools();
|
|
void initLayout();
|
|
void initConnect();
|
|
void setFoldIco(QIcon ico);
|
|
private:
|
|
QHBoxLayout *header_opts_Layout = {};
|
|
QPushButton *m_msg_copy = {};
|
|
QPushButton *m_msg_save = {};
|
|
QPushButton *m_msg_menu = {};
|
|
QPushButton *m_msg_fold = {};
|
|
//显示模式
|
|
QLabel *m_msg_display_label = {};
|
|
QComboBox *m_msg_display_combobox = {};
|
|
//字体大小
|
|
QLabel *m_msg_display_font_size_label = {};
|
|
QComboBox *m_msg_display_font_size_combobox = {};
|
|
//字体
|
|
QLabel *m_msg_display_font_label = {};
|
|
QComboBox *m_msg_display_font_combobox = {};
|
|
// save保存菜单
|
|
QMenu *m_msg_save_menu = {};
|
|
QAction *m_msg_save_text = {};
|
|
QAction *m_msg_save_html = {};
|
|
QAction *m_msg_save_markdown = {};
|
|
QAction *m_msg_save_pdf = {};
|
|
QSpacerItem *sparcer_item = new QSpacerItem(0, 0, QSizePolicy::Expanding, QSizePolicy::Fixed);
|
|
QStringList ds_mode_str={"原始文本","LaTeX Markdown"};
|
|
QStringList ds_font_size_str={"4","6","8","10","12","14","16","18","20"};
|
|
|
|
private:
|
|
void initDisplayMode();
|
|
signals:
|
|
void on_signals_copy();
|
|
void on_signals_fold();
|
|
void on_signals_display_mode(QString);
|
|
void on_signals_display_font_size(QString);
|
|
void on_signals_display_font(QString);
|
|
void on_signals_save_text();
|
|
void on_signals_save_html();
|
|
void on_signals_save_markdown();
|
|
void on_signals_save_pdf();
|
|
public slots:
|
|
void on_save_menu_slots();
|
|
void on_opts_menu_slots();
|
|
};
|
|
#endif |