You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

64 lines
1.3 KiB
C

1 year ago
#ifndef KEYBOARD_ABC_H
#define KEYBOARD_ABC_H
#include <QDialog>
#include <QButtonGroup>
#include <QList>
#include <QLineEdit>
#include <QWidget>
#include <QCloseEvent>
namespace Ui {
class KeyBoard_ABC;
}
class KeyBoard_ABC : public QDialog
{
Q_OBJECT
public:
explicit KeyBoard_ABC(QWidget *parent = 0, QLineEdit *LineEdit = 0);
~KeyBoard_ABC();
QString outputStr;
void closeEvent(QCloseEvent *e);
protected:
QString findChinese(QString PinYin);
void setHanziBt();
private slots:
void on_caps_Bt_clicked();
void slot_numClicked(QAbstractButton *bt);
void slot_carClicked(QAbstractButton *bt);
void slot_hanziBtClicked(QAbstractButton *bt);
void on_delBt_clicked();
void on_nextBt_clicked();
void on_prevBt_clicked();
void on_closeBt_clicked();
private:
Ui::KeyBoard_ABC *ui;
bool isCap; // 大小写控制
QButtonGroup *carGroup = nullptr;
QList<QAbstractButton *> carList;
QList<QAbstractButton *> zhList;
QStringList zikuList; // 字库一行一行分割
int pageAll; // 总页数
int curPage; // 当前页
QStringList pageList; // 查找出的字符串10个10个分割
QLineEdit *lineEdit;
QButtonGroup *numGroup = nullptr;
QButtonGroup *hanziGroup = nullptr;
void callKeyBoard_ABC();
};
#endif // KEYBOARD_H