⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pinyinframe.h.rej

📁 对MurphyPinyin的改进版
💻 REJ
字号:
****************** 23,28 ****  #include <qwindowsystem_qws.h>
  #include "PinyinEngine.h"
  
  class QPinyinFrame : public QFrame, public QWSServer::KeyboardFilter
  {
  	Q_OBJECT
--- 23,29 ----  #include <qwindowsystem_qws.h>
  #include "PinyinEngine.h"
  
+ class QTimer;
  class QPinyinFrame : public QFrame, public QWSServer::KeyboardFilter
  {
  	Q_OBJECT
****************** 43,65 ****  	bool GetKey(int,int);
  	virtual void show();
  	virtual void hide();
  
  	void paintEvent(QPaintEvent * e); 
  	void SendKey ( int  , int c = 0);
- 
- 	void mouseReleaseEvent(QMouseEvent*);
- 	void keyPressEvent(QKeyEvent*);
  
  signals:
  	void key( ushort, ushort, ushort, bool, bool );
  
  private:
  	PinyinEngine m_engine;
  	bool m_bEnglishMode;
  	bool m_bMakingPhrase;
  	QRect m_indicator_rect/*for English or Chinese mode*/;
  	QRect m_about_rect;/*the about text rect*/
- 	QRect m_leftbtn_rect,m_rightbtn_rect;
  
  	typedef struct ime_info_struc{
  		String       pinyin;
--- 44,84 ----  	bool GetKey(int,int);
  	virtual void show();
  	virtual void hide();
+ 	//virtual void sizeHint(); 
  
  	void paintEvent(QPaintEvent * e); 
+ 	void drawKeyboard( QPainter &p, int key);
  	void SendKey ( int  , int c = 0);
+ 	void clearHighlight();
+ 	void mouseReleaseEvent(QMouseEvent*e);
+ 	void mousePressEvent(QMouseEvent*e);
+ 	void keyPressEvent(QKeyEvent*e);
+ 	void resizeEvent(QResizeEvent*e);
+ 	void timerEvent(QTimerEvent *e);
  
  signals:
  	void key( ushort, ushort, ushort, bool, bool );
  
+ private slots:
+ 	void repeat();
  private:
  	PinyinEngine m_engine;
  	bool m_bEnglishMode;
  	bool m_bMakingPhrase;
+ 	QRect screen_rect;
  	QRect m_indicator_rect/*for English or Chinese mode*/;
  	QRect m_about_rect;/*the about text rect*/
+ 	QRect m_leftbtn_rect,m_rightbtn_rect,m_cand_rect,m_kbd_rect;
+ 	QRect m_kbdbtn_rect;
+ 	bool m_bShowKeyboard;
+ 	short cand_width;
+ 	//soft keyboard related
+     	short keyHeight,PickHeight, xoffs, 
+ 	defaultKeyWidth,pressedKey,
+ 	shift,ctrl,alt,lock,
+ 	useLargeKeys,useOptiKeys,modifiers,pressed;
+ 	int pressTid,qkeycode,unicode;
+ 	QTimer *repeatTimer;
  
  	typedef struct ime_info_struc{
  		String       pinyin;
****************** 102,108 ****  		m_ime_info.candidates_count=m_engine.search(m_ime_info.pinyin.c_str());
  		m_ime_info.first_visible=0;
  #ifdef X86
- 		printf("%s,%d matched\n",m_ime_info.pinyin.c_str(),m_ime_info.candidates_count);
  #endif
  	}
  	int init_gui_dimention();
--- 121,127 ----  		m_ime_info.candidates_count=m_engine.search(m_ime_info.pinyin.c_str());
  		m_ime_info.first_visible=0;
  #ifdef X86
+ 		//printf("%s,%d matched\n",m_ime_info.pinyin.c_str(),m_ime_info.candidates_count);
  #endif
  	}
  	int init_gui_dimention();

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -