📄 mygraphiclist.cpp
字号:
/************************************************************************************************************************************************************** **** equal III the graphic builder **** **** Copyright (C) 2003 Oleksiy Pylypenko **** **** This file may be distributed and/or modified under the terms of the **** GNU General Public License version 2 as published by the Free Software **** Foundation and appearing in the file license included in the **** packaging of this file. **** **** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE **** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. **** **** Contact earthman@inbox.ru if any conditions of this licensing are **** not clear to you. **** **** ********************************************************************************* *****************************************************************************/#include <qlayout.h>#include <qaccel.h>#include "mygraphiclist.h"myMLedit::myMLedit(QWidget *w):QMultiLineEdit(w){}void myMLedit::keyPressEvent(QKeyEvent*e){ if(e->key() == Key_Return || e->key() == Key_Enter || e->key() == Key_Up || e->key() == Key_Down || e->key() == Key_PageUp || e->key() == Key_PageDown) { update(); } QMultiLineEdit::keyPressEvent(e);}void myGraphicList::clear(void){ aneditbox->setText("");}myGraphicList::myGraphicList( QWidget *parent) : QWidget( parent ){ QBoxLayout *topLayout = new QVBoxLayout( this , 10 ); myMLedit *ml = aneditbox = new myMLedit(this);// ml->setText( "This widget will get all the remaining space" ); ml->setFrameStyle( QFrame::Panel | QFrame::Plain ); QFont f("Courier New", 12); ml->setFont( f ); topLayout->addWidget(ml); this->connect(aneditbox,SIGNAL(update()),SIGNAL(update()));// a->connectItem( 1, this, SLOT(update2()) );// ml-> ml->setFocus();}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -