📄 main.cpp
字号:
// FILE: main.cpp// DESCRIPTION: The main() implementation for the hIDE application.// AUTHOR: James Martin (boolean_machine@yahoo.com)#include "mainwidget.h"#include "splash.h"#include <qapplication.h>// Execution entry point...int main(int argc, char *argv[]){ QApplication a(argc, argv); // Main Qt application object. Splash splash(NULL, "splash_wnd"); QApplication::setStyle("platinum"); splash.setCaption("Initializing hIDE..."); splash.setTotalSteps(4); MainWidget mw; // Main window (widget). int prog = 0; splash.setProgress(++prog); a.setMainWidget(&mw); // Make mw the main widget. splash.setProgress(++prog); mw.resize(750, 525); // Set the initial window size. splash.setProgress(++prog); if (argc > 1) // Parse the passed command-line parameters... { if (!strcmp(argv[1], "-p")) // Open project... { if (argc > 2) mw.openProject((QString) argv[2]); } else // Open source file(s)... { for (int i=1; i < argc; i++) mw.fileOpen((QString) argv[i]); } } splash.setProgress(++prog); mw.show(); // Show the main window. //splash.setProgress(++prog); return a.exec(); // Execute the app & return exit code when done.}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -