Exemple #1
0
GLShaderDev::GLShaderDev(const QStringList& args)
:   _editor(new CodeEditor(this)),
    _output(new BuildOutput(this)),
    _glInfoDialog(nullptr),
    _newFileDialog(new NewFileDialog(this))
{
    resize(1000, 800); // FIXME set sizeHint instead of hardcoding it
    setWindowIcon(QIcon(":/glsd-icon.png"));
    setCentralWidget(_editor);

    initializeContext();
    initializeActions();
    initializeDockWidgets();

    loadSettings();
    updateTitleBar();

    for (int i = 0; i < args.size(); ++i)
        openFile(args.at(i));
}
Exemple #2
0
Window::Window(QWidget *p, Qt::WindowFlags f)
        : QMainWindow(p, f),
          preferencesDialog(nullptr),
          findDialog(nullptr),
          replaceDialog(nullptr),
          goToDialog(nullptr),
          aboutDialog(nullptr),
          mainMenu(nullptr),
          buffers(nullptr),
          browserWidget(nullptr)
{
	// Set some of our window's properties.

	setWindowIcon(QIcon(":/icons/qompose.png"));

	// Initialize our window.

	buffers = new BufferWidget(this);
	buffers->doNew();
	setCentralWidget(buffers);

	initializeDialogs();
	initializeMenus();
	initializeDockWidgets();

	QObject::connect(buffers, &BufferWidget::pathChanged, this,
	                 &Window::doUpdateWindowTitle);

	// Apply any existing settings values to our UI.

	applyExistingSettings();

	// Update our window title initially.

	doUpdateWindowTitle();
}