main.cpp

来自「Linux/Windows 环境下跨平台程序」· C++ 代码 · 共 50 行

CPP
50
字号
/* Copyright (C) 2004 Per Johansson		This file is part of netGo.    netGo 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.    netGo 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.    You should have received a copy of the GNU General Public License    along with netGo; if not, write to the Free Software    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA*/#include <qapplication.h>#include "netgodialog.h"#include "setup.h"#include "settings.h"int main(int argc, char **argv){	// Create a QApplication-object.	QApplication app(argc, argv);				// Check if we need to run the setup.	if (!Settings::fetchSettings()) {		Setup *netGoSetup = new Setup();		netGoSetup->exec();	}		// Check if the user wants to execute a profile from the commandline.	if (app.argc() == 2)		// Create an netGoDialog object (without GUI).		netGoDialog *cmdline = new netGoDialog(app.argv()[1]);	else {		// Create a netGoDialog object (with GUI).		netGoDialog *netGo = new netGoDialog(0, "netGo");		app.setMainWidget(netGo); // Set netGo as the mainwidget.		netGo->show(); // Make the GUI visible.	}			return app.exec(); // Pass the control of the application to Qt.}

⌨️ 快捷键说明

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