kdevview.cpp
来自「Linux程序设计权威指南代码.包含所有章节代码」· C++ 代码 · 共 66 行
CPP
66 行
/*************************************************************************** kdevview.cpp - description ------------------- begin : 四 09 21 05:30:27 CST 2000 copyright : (C) 2000 by email : ***************************************************************************//*************************************************************************** * * * 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. * * * ***************************************************************************/// include files for Qt#include <qprinter.h>#include <qpainter.h>// application specific includes#include "kdevview.h"#include "kdevdoc.h"KdevView::KdevView(KdevDoc* pDoc, QWidget *parent, const char* name, int wflags) : QWidget(parent, name, wflags){ doc=pDoc;}KdevView::~KdevView(){}KdevDoc *KdevView::getDocument() const{ return doc;}void KdevView::update(KdevView* pSender){ if(pSender != this) repaint();}void KdevView::print(QPrinter *pPrinter){ if (pPrinter->setup(this)) { QPainter p; p.begin(pPrinter); /////////////////////////////// // TODO: add your printing code here /////////////////////////////// p.end(); }}void KdevView::closeEvent(QCloseEvent*){ // LEAVE THIS EMPTY: THE EVENT FILTER IN THE KdevApp CLASS TAKES CARE FOR CLOSING // QWidget closeEvent must be prevented.}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?