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

📄 mydebug.cpp

📁 將Verilog設計轉成VHDL設計的程式
💻 CPP
字号:
/***************************************************************************                          mydebug.cpp  -  description                             -------------------    begin                : Sun May 28 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 "mydebug.h"#include <qfile.h>#include <qtextstream.h>#include <qstring.h>MyDebug::MyDebug(QWidget *parent, const char *name ) : QWidget(parent,name){	setMinimumSize(280,200);	quit = new QPushButton( "Quit", this, "quit" );	connect( quit, SIGNAL(clicked()), this, SLOT(_quit()) );	debug= new QMultiLineEdit(this,"debug");	debug->setReadOnly(TRUE);		info= new QMultiLineEdit(this,"debug");	info->setReadOnly(TRUE);		init();}MyDebug::~MyDebug(){}void MyDebug::init(){	int w=width();	quit->setGeometry(10,10,70,30);	info->setGeometry(85,5,w-90,40);	debug->setGeometry(5,45,w-10,height()-50);		QString fileName("debug.vl2vhdl");	debug->setAutoUpdate( FALSE );	debug->clear();	QFile f( fileName );	if ( !f.open( IO_ReadOnly ) )		return;	QTextStream t(&f);	while ( !t.eof() ) {		QString s = t.readLine();		debug->append( s );	}	f.close();	debug->setAutoUpdate( TRUE );	debug->repaint();		info->setAutoUpdate( FALSE );	info->clear();	QString s("This window contains informations for debug purposes only\nThis is the output of the bison grammar");	info->append( s );	f.close();	info->setAutoUpdate( TRUE );	info->repaint();	}void MyDebug::resizeEvent( QResizeEvent * ){	int w=width();	quit->setGeometry( 10,10, 70, 30 );	info->setGeometry(85,5,w-90,40);	debug->setGeometry(5,45,w-10,height()-50);}void MyDebug::_quit(){	hide();	delete this;}

⌨️ 快捷键说明

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