📄 pickboardpicks.cpp
字号:
/************************************************************************ Copyright (C) 2000-2005 Trolltech AS. All rights reserved.**** This file is part of the Qtopia Environment.** ** This program is free software; you can redistribute it and/or modify it** under the terms of the GNU General Public License as published by the** Free Software Foundation; either version 2 of the License, or (at your** option) any later version.** ** A copy of the GNU GPL license version 2 is included in this package as ** LICENSE.GPL.**** This program is distributed in the hope that it will be useful, but** WITHOUT ANY WARRANTY; without even the implied warranty of** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ** See the GNU General Public License for more details.**** In addition, as a special exception Trolltech gives permission to link** the code of this program with Qtopia applications copyrighted, developed** and distributed by Trolltech under the terms of the Qtopia Personal Use** License Agreement. You must comply with the GNU General Public License** in all respects for all of the code used other than the applications** licensed under the Qtopia Personal Use License Agreement. If you modify** this file, you may extend this exception to your version of the file,** but you are not obligated to do so. If you do not wish to do so, delete** this exception statement from your version.** ** See http://www.trolltech.com/gpl/ for GPL licensing information.**** Contact info@trolltech.com if any conditions of this licensing are** not clear to you.************************************************************************/#include "pickboardpicks.h"#include "pickboardcfg.h"#include <qtopia/global.h>#include <qpainter.h>#include <qlist.h>#include <qbitmap.h>#include <qlayout.h>#include <qvbox.h>#include <qdialog.h>#include <qscrollview.h>#include <qpopupmenu.h>#include <qhbuttongroup.h>#include <qpushbutton.h>#include <qmessagebox.h>#ifdef QWS#include <qwindowsystem_qws.h>#endifvoid PickboardPicks::doMenu(){ QWidget* cause = (QWidget*)sender(); // evil QPopupMenu popup(this); config()->fillMenu(popup); QPoint pos = cause->mapToGlobal(cause->rect().topRight()); QSize sz = popup.sizeHint(); pos.ry() -= sz.height(); pos.rx() -= sz.width(); popup.move(pos); config()->doMenu(popup.exec());}static const char *BS_xpm[] = {"5 7 2 1","a c #000000",". c None","...aa","..aaa",".aaaa","aaaaa",".aaaa","..aaa","...aa",};static const char *Del_xpm[] = {"14 7 2 1","a c #000000",". c None","aaa..aaaa.a...","a..a.a....a...","a..a.a....a...","a..a.aaa..a...","a..a.a....a...","a..a.a....a...","aaa..aaaa.aaaa"};static const char *Home_xpm[] = {"20 7 2 1","a c #000000",". c None","a..a..aa..a...a.aaaa","a..a.a..a.aa.aa.a...","a..a.a..a.a.a.a.a...","aaaa.a..a.a.a.a.aaa.","a..a.a..a.a...a.a...","a..a.a..a.a...a.a...","a..a..aa..a...a.aaaa"};static const char *PgUp_xpm[] = {"20 7 2 1","a c #000000",". c None","aaa.......a..a......","a..a......a..a......","a..a.aa...a..a.aaa..","aaa.a.....a..a.a..a.","a...a.aa..a..a.aaa..","a...a..a..a..a.a....","a....aaa...aa..a...."};static const char *PgDn_xpm[] = {"20 7 2 1","a c #000000",". c None","aaa.......aaa.......","a..a......a..a......","a..a.aa...a..a.a..a.","aaa.a.....a..a.aa.a.","a...a.aa..a..a.a.aa.","a...a..a..a..a.a..a.","a....aaa..aaa..a..a."};static const char *End_xpm[] = {"14 7 2 1","a c #000000",". c None","aaaa.a..a.aaa.","a....aa.a.a..a","a....a.aa.a..a","aaa..a..a.a..a","a....a..a.a..a","a....a..a.a..a","aaaa.a..a.aaa."};static const char *Enter_xpm[] = {"14 7 2 1","a c #000000",". c None",".............a",".............a","..a..........a",".aa.........a.","aaaaaaaaaaaa..",".aa...........","..a..........."};static const char *Esc_xpm[] = {"14 7 2 1","a c #000000",". c None","aaaa..aa...aa.","a....a..a.a..a","a....a....a...","aaa...aa..a...","a.......a.a...","a....a..a.a..a","aaaa..aa...aa."};static const char *Ins_xpm[] = {"13 7 2 1","a c #000000",". c None","aaa.a..a..aa.",".a..aa.a.a..a",".a..a.aa.a...",".a..a..a..aa.",".a..a..a....a",".a..a..a.a..a","aaa.a..a..aa."};static const char *Up_xpm[] = {"7 7 2 1","a c #000000",". c None","...a...","..aaa..",".a.a.a.","a..a..a","...a...","...a...","...a..."};static const char *Left_xpm[] = {"7 7 2 1","a c #000000",". c None","...a...","..a....",".a.....","aaaaaaa",".a.....","..a....","...a..."};static const char *Down_xpm[] = {"7 7 2 1","a c #000000",". c None","...a...","...a...","...a...","a..a..a",".a.a.a.","..aaa..","...a..."};static const char *Right_xpm[] = {"7 7 2 1","a c #000000",". c None","...a...","....a..",".....a.","aaaaaaa",".....a.","....a..","...a..."};static const char *BackTab_xpm[] = {"8 7 2 1","a c #000000",". c None","a.......","a..a....","a.aa....","aaaaaaaa","a.aa....","a..a....","a......."};static const char *Tab_xpm[] = {"8 7 2 1","a c #000000",". c None",".......a","....a..a","....aa.a","aaaaaaaa","....aa.a","....a..a",".......a"};static const char *Space_xpm[] = {"9 9 2 1","a c #000000",". c None","aaaaaaaaa","a.......a","a.......a","a.......a","a.......a","a.......a","a.......a","a.......a","aaaaaaaaa"};PickboardPicks::PickboardPicks(QWidget* parent, const char* name, WFlags f ) : QFrame(parent,name,f){}void PickboardPicks::initialise(void){ setSizePolicy(QSizePolicy(QSizePolicy::Expanding,QSizePolicy::Fixed)); mode = 0; DictFilterConfig* dc = new DictFilterConfig(this); QStringList sets_a = QStringList::split(' ',tr("ABC DEF GHI JKL MNO PQR STU VWX YZ-'")); QStringList sets = QStringList::split(' ', tr("ABC懒旅呐魄 DEF腥墒
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -