コード例 #1
0
// -----------------------------------------------------------------------------
// Called when the panel is shown or hidden
// -----------------------------------------------------------------------------
void TextureXEditor::onShow(wxShowEvent& e)
{
	if (!e.IsShown())
	{
		showTextureMenu(false);
		return;
	}
	else
		theMainWindow->undoHistoryPanel()->setManager(undo_manager_.get());
	updateMenuStatus();
}
コード例 #2
0
	void MapEditorWindow::showOpenDialog()
	{
		if(checkCurrentMapSaved())
		{
			QString filename = QFileDialog::getOpenFileName(this, tr("Open file"), preferredMapPath, "XML file (*.xml)", nullptr, QFileDialog::DontUseNativeDialog);
			if(!filename.isNull())
			{
				MapHandler *mapHandler = sceneDisplayerWidget->openMap(filename.toUtf8().constData());
				sceneControllerWidget->openMap(mapHandler);

				updateMapFilename(filename);
				updateMenuStatus();
			}
		}
	}
コード例 #3
0
	bool MapEditorWindow::executeCloseAction()
	{
		bool canProceed = false;
		if(checkCurrentMapSaved())
		{
			sceneDisplayerWidget->closeMap();
			sceneControllerWidget->closeMap();

			updateMapFilename("");
			updateMenuStatus();

			canProceed = true;
		}

		return canProceed;
	}
コード例 #4
0
	void MapEditorWindow::showNewDialog()
	{
		if(checkCurrentMapSaved())
		{
			NewDialog newDialog(this);
			newDialog.exec();

			if(newDialog.result()==QDialog::Accepted)
			{
				MapHandler *mapHandler = sceneDisplayerWidget->newMap(newDialog.getFilename(), newDialog.getRelativeWorkingDirectory());
				sceneControllerWidget->newMap(mapHandler, newDialog.getRelativeWorkingDirectory());

				updateMapFilename(QString::fromStdString(newDialog.getFilename()));
				updateMenuStatus();
			}
		}
	}
コード例 #5
0
ファイル: main_window.cpp プロジェクト: newdebug/NewDebug
MainWindow::MainWindow(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::MainWindow),
    m_bEdit(false)
{
    ui->setupUi(this);
    ui->splitter->setStretchFactor(0, 15);
    ui->splitter->setStretchFactor(1, 65);
    ui->splitter->setStretchFactor(2, 20);
    ui->grouplistWidget->setCurrentRow(1);
    ui->findWidget->hide();

    initStatusbar();
    /*connect all signals and slots*/
    setActions();

    updateMenuStatus();
    int r = Global::g_preferences->m_rgbFontColor.at(0).toInt();
    int g = Global::g_preferences->m_rgbFontColor.at(1).toInt();
    int b = Global::g_preferences->m_rgbFontColor.at(2).toInt();
    updateFontColor(r, g, b);
}