
| 001 | #ifndef ENCRYPTWINDOW_H |
| 002 | #define ENCRYPTWINDOW_H |
| 003 | |
| 004 | #include <QMainWindow> |
| 005 | |
| 006 | #include "encrypt.h" |
| 007 | |
| 008 | namespace Ui { |
| 009 | class EncryptWindow; |
| 010 | } |
| 011 | |
| 012 | class EncryptWindow : public QMainWindow { |
| 013 | Q_OBJECT |
| 014 | |
| 015 | public: |
| 016 | // 建構函數 |
| 017 | explicit EncryptWindow(QWidget *parent = 0); |
| 018 | // 解構函數 |
| 019 | ~EncryptWindow(); |
| 020 | // QString 與 string 的轉換函數 |
| 021 | QString s2q(const string &); |
| 022 | string q2s(const QString &); |
| 023 | |
| 024 | private slots: |
| 025 | // 跟事件有關的 SLOT 成員函數 |
| 026 | void on_pushButton_new_clicked(); |
| 027 | void on_pushButton_save_clicked(); |
| 028 | void on_pushButton_load_clicked(); |
| 029 | void on_pushButton_encode_clicked(); |
| 030 | void on_pushButton_decode_clicked(); |
| 031 | void on_pushButton_clear_clicked(); |
| 032 | void on_pushButton_copy_clicked(); |
| 033 | void on_lineEdit_input_textChanged(const QString &arg1); |
| 034 | |
| 035 | private: |
| 036 | // 視窗元件 |
| 037 | Ui::EncryptWindow *ui; |
| 038 | // 解碼核心 |
| 039 | Encrypt *e; |
| 040 | // 輸入、輸出的字串 |
| 041 | QString input_text; |
| 042 | QString output_text; |
| 043 | }; |
| 044 | |
| 045 | #endif // ENCRYPTWINDOW_H |
the end
沒有留言:
張貼留言