?? c.ui.h~
字號:
/****************************************************************************** ui.h extension file, included from the uic-generated form implementation.**** If you wish to add, delete or rename functions or slots use** Qt Designer which will update this file, preserving your code. Create an** init() function in place of a constructor, and a destroy() function in** place of a destructor.*****************************************************************************/QString s;int n=0;int tem[30];void Form1::toHex(){count(16);}void Form1::toBinary(){count(2);}void Form1::toOctal(){count(8);}void Form1::count(int a){ int b; int i=0; s=lENum->text(); if(s!="") { n=atoi(s); b=n; while(b>0) { tem[i]=b%a; b=b/a; i++; } if(i>0) { i--; for(;i>=0;i--) { switch( tem[i] ) { case 15 : s=s+"F"; break; case 14 : s=s+"E"; break; case 13 : s=s+"D"; break; case 12 : s=s+"C"; break; case 11 : s=s+"B"; break; case 10 : s=s+"A"; break; case 9: s=s+"9"; break; case 8: s=s+"8"; break; case 7: s=s+"7"; break; case 6: s=s+"6"; break; case 5: s=s+"5"; break; case 4: s=s+"4"; break; case 3: s=s+"3"; break; case 2: s=s+"2"; break; case 1: s=s+"1"; break; case 0: s=s+"0"; break; // default : // s=s+gcvt(tem[i]); } } } else { tem[i]=0; s="0"; } lEResult->setText(tr(s)); }}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -