Exemplo n.º 1
0
FIFOPlayerWindow::FIFOPlayerWindow(QWidget* parent) : QDialog(parent)
{
  setWindowTitle(tr("FIFO Player"));

  CreateWidgets();
  ConnectWidgets();

  UpdateInfo();

  UpdateControls();

  FifoPlayer::GetInstance().SetFileLoadedCallback(
      [this] { QueueOnObject(this, &FIFOPlayerWindow::OnFIFOLoaded); });
  FifoPlayer::GetInstance().SetFrameWrittenCallback([this] {
    QueueOnObject(this, [this] {
      UpdateInfo();
      UpdateControls();
    });
  });

  connect(&Settings::Instance(), &Settings::EmulationStateChanged, this, [this](Core::State state) {
    if (state == Core::State::Running)
      OnEmulationStarted();
    else if (state == Core::State::Uninitialized)
      OnEmulationStopped();
  });
}
Exemplo n.º 2
0
//-----------------------------------------------------------------------------
//!
//-----------------------------------------------------------------------------
tWorkProfileSelectDialog::tWorkProfileSelectDialog( tPilotController& pilotDevice, QWidget* pParent )
: tDialog( tDialog::Partial, pParent, DarkenOff )
, m_pGridLayout()
, m_WorkProfileWidgets()
, m_pAddButton(0)
, m_PilotDevice(pilotDevice)
{
    SetCustomPos( tMedusaUiEnvironment::ModeAreaPos() );
    SetAlignment( AlignCustom );
    setFixedSize( tMedusaUiEnvironment::ModeAreaSize() );

    QString titleStr = tr( "Work" );
    setWindowTitle( titleStr );

    m_pGridLayout = new QGridLayout();
    m_pGridLayout->setContentsMargins( 4, 4, 4, 4 );
    m_pGridLayout->setSpacing( 4 );

    CreateWidgets();
    setLayout( m_pGridLayout );

    Connect( m_PilotDevice.GetMedusaInterface(),
             SIGNAL( WorkProfileSettingsChanged(unsigned char) ),
             this,
             SLOT( OnWorkProfileSettingsChanged() ) );

    Connect( tApOperation::Instance(), SIGNAL( ApModeChanged(tPilotCommandInterface::tPilotMode) ), this, SLOT( OnApModeChanged(tPilotCommandInterface::tPilotMode) ) );
    OnApModeChanged( tApOperation::Instance()->GetApMode() ); // Init text
}
Exemplo n.º 3
0
MD5Dialog::MD5Dialog(QWidget* parent) : QDialog(parent)
{
  CreateWidgets();
  ConnectWidgets();
  setWindowTitle(tr("MD5 Checksum"));
  setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
}
Exemplo n.º 4
0
RepCompetitionBased::RepCompetitionBased(QWidget *aParent, BaseReport *report, const QString &title):
    Report(aParent, report, title)
{
    CreateWidgets();
    InitComboBox(cbCompetition, vecId, "select id, strftime('%d.%m.%Y',date) || ' ' || name from competitions; ", 0);
    btnExport->setEnabled(!!cbCompetition->count());
}
Exemplo n.º 5
0
CWorkspaceViewsDialog::CWorkspaceViewsDialog( QWidget *parent, CModel &model )
	: base_t( parent ), mModel( model )
{
	assert__( mModel.Workspace< CWorkspaceDisplay >()->GetDisplays() && mModel.Workspace< CWorkspaceDisplay >()->GetDisplays()->size() > 0 );

	CreateWidgets();
}
Exemplo n.º 6
0
HacksWidget::HacksWidget(GraphicsWindow* parent) : GraphicsWidget(parent)
{
  CreateWidgets();
  LoadSettings();
  ConnectWidgets();
  AddDescriptions();
}
Exemplo n.º 7
0
void CGUIEditor::LoadGXL(GUIPAGELIST gpl, TCHAR* fileName)
{
	if (!m_bCreated)
	{
		SetupTabBar();
		m_bCreated = true;
	}
	if (!m_bDocOpen)
	{
		// make sure we have widgets
		CreateWidgets();

		CGUIEditorDoc *createDoc;
		// create blank document, with frame
		createDoc = DYNAMIC_DOWNCAST(CGUIEditorDoc, m_DocTemplate->OpenDocumentFile(fileName));
		createDoc->SetToolbar(&m_TabBar);

		GUIWORKINGRES gwr;
		static DWORD msgHash_GetFileResolution = CHashString(_T("GetFileResolution")).GetUniqueID();
		EngineGetToolBox()->SendMessage(msgHash_GetFileResolution, sizeof(GUIWORKINGRES), &gwr);		
		createDoc->LoadGXL(gpl, gwr);
		
		SIZEDATA sd;
		sd.m_fXSize = (float)gwr.iSizeX;
		sd.m_fYSize = (float)gwr.iSizeY;
		static DWORD msgHash_SetSize = CHashString(_T("SetSize")).GetUniqueID();
		m_ToolBox->SendMessage(msgHash_SetSize, sizeof(SIZEDATA), &sd, &CHashString(_T("WorkingCanvas")), &CHashString(_T("CGUIBackground")));	
	}
	else
	{
		MessageBox(NULL, _T("Can't have more than one GUI open at a time"), _T("Sorry, mac"), MB_OK);
	}
}
Exemplo n.º 8
0
FilesystemWidget::FilesystemWidget(const UICommon::GameFile& game)
    : m_game(game), m_volume(DiscIO::CreateVolumeFromFilename(game.GetFilePath()))
{
  CreateWidgets();
  ConnectWidgets();
  PopulateView();
}
Exemplo n.º 9
0
RegisterWidget::RegisterWidget(QWidget* parent) : QDockWidget(parent)
{
  setWindowTitle(tr("Registers"));
  setAllowedAreas(Qt::AllDockWidgetAreas);

  QSettings settings;

  restoreGeometry(settings.value(QStringLiteral("registerwidget/geometry")).toByteArray());
  setFloating(settings.value(QStringLiteral("registerwidget/floating")).toBool());

  CreateWidgets();
  PopulateTable();
  ConnectWidgets();

  connect(&Settings::Instance(), &Settings::EmulationStateChanged, [this](Core::State state) {
    if (Settings::Instance().IsDebugModeEnabled() && Core::GetState() == Core::State::Paused)
      emit RequestTableUpdate();
  });

  connect(this, &RegisterWidget::RequestTableUpdate, [this] {
    m_updating = true;
    emit UpdateTable();
    m_updating = false;
  });

  connect(&Settings::Instance(), &Settings::RegistersVisibilityChanged,
          [this](bool visible) { setHidden(!visible); });

  connect(&Settings::Instance(), &Settings::DebugModeToggled, [this](bool enabled) {
    setHidden(!enabled || !Settings::Instance().IsRegistersVisible());
  });

  setHidden(!Settings::Instance().IsRegistersVisible() ||
            !Settings::Instance().IsDebugModeEnabled());
}
Exemplo n.º 10
0
interface::interface(QDomElement xml_item, sEngine *enging, QWidget *parent) :
    QWidget(parent)
{
    setParent(parent);
    eng = enging;
    xml_root = xml_item;
    CreateWidgets();
}
Exemplo n.º 11
0
//!
//! \brief MainWindow::MainWindow
//! \param parent
//! Construct the main window and child widgets
MainWindow::MainWindow(QWidget *parent) :
    QMainWindow(parent)
{
    CreateWidgets();
    CreateActions();
    CreateMenus();
    CreateToolbars();
}
Exemplo n.º 12
0
//--------------------------------------------------------------------------
void ChatLine::ChatLine(Widget root_widget)
{
	m_text_widget = CreateWidgets("gui/layouts/day_z_chat_item.layout", root_widget);
	m_text_widget.Show(false);

	m_fade_timer = new WidgetFadeTimer;
	m_timeout_timer = new Timer(CALL_CATEGORY_GUI);
}
Exemplo n.º 13
0
QvisDatabaseCorrelationWindow::QvisDatabaseCorrelationWindow(
    const QString &correlationName, const QString &caption) :
    QvisWindowBase(caption), createMode(true)
{
    DatabaseCorrelation emptyCorrelation;
    emptyCorrelation.SetName(correlationName.toStdString());
    CreateWidgets(emptyCorrelation);
}
Exemplo n.º 14
0
//--------------------------------------------------------------------------
Widget ScriptConsoleNewPresetDialog::Init()
{
	Widget layoutRoot = CreateWidgets("gui/layouts/script_console_dialog_preset.layout", NULL);
	m_Editbox = layoutRoot.FindAnyWidget("PrimaryEditBox");
	m_Label = layoutRoot.FindAnyWidget("WindowLabel");
	m_Label.SetText("NEW PRESET");

	return layoutRoot;
}
Exemplo n.º 15
0
int 
main (unsigned int argc, char **argv)
{
	char **null_argv = (char **) NULL;
	char *mess;

	extern int ch_set;

	ch_set = TRUE;

	print_parse_errors = FALSE;
	quipu_syntaxes();

#ifdef USE_PP
	pp_quipu_init (argv[0]);
#endif

	want_oc_hierarchy();

	namestr[0] = '\0';
	passwd[0] = '\0';

	toplevel = XtInitialize("X-Directory", "Pod", NULL, 0,
							&argc, argv);

	dsap_init((int *) NULL, &null_argv);

#ifdef USE_PP
	pp_quipu_run ();
#endif

	read_args(&argc, &argv);
	user_tailor();
	read_bind_args(&argc, &argv);

	CreateWidgets();
	message((Widget) NULL, "Connecting to Directory. Please Wait...");

	if ((mess = cnnct_bind()) != NULLCP) {
		kill_message();
		displayStartupError(mess);
		XtMainLoop();
	}

	set_attribute_syntax (str2syntax("photo"),
						  (IFP)pe_cpy,    NULLIFP,
						  NULLIFP,        podphoto,
						  (IFP)pe_cpy,    quipu_pe_cmp,
						  pe_free,        NULLCP,
						  NULLIFP,        TRUE );

	kill_message();
	PodLoop();

	return 0;
}
Exemplo n.º 16
0
EnhancementsWidget::EnhancementsWidget(GraphicsWindow* parent)
    : GraphicsWidget(parent), m_block_save(false)
{
  CreateWidgets();
  LoadSettings();
  ConnectWidgets();
  AddDescriptions();
  connect(parent, &GraphicsWindow::BackendChanged,
          [this](const QString& backend) { LoadSettings(); });
}
Exemplo n.º 17
0
CActiveViewsDialog::CActiveViewsDialog( QWidget *parent, CDesktopManagerBase *manager )
	: base_t( parent )
	, mDesktopManager( manager )
{
	assert__( manager != nullptr );

	CreateWidgets();

	assert__( mSubWindows.size() > 0 );
}
Exemplo n.º 18
0
LogConfigWidget::LogConfigWidget(QWidget* parent) : QDockWidget(parent)
{
  setWindowTitle(tr("Log Configuration"));
  setHidden(!Settings::Instance().IsLogConfigVisible());
  setAllowedAreas(Qt::AllDockWidgetAreas);

  CreateWidgets();
  LoadSettings();
  ConnectWidgets();
}
Exemplo n.º 19
0
CEditTasksFileDialog::CEditTasksFileDialog( const std::string &task_name, const std::string &path, QWidget *parent )
    : base_t( parent )
	, mTaskName( task_name )
	, mPath( path )
{
    CreateWidgets();

	std::string title = mTaskName.empty() ? "Scheduler Tasks File: " : mTaskName + " Log: ";

	setWindowTitle( t2q( title + mPath ) );
}
Exemplo n.º 20
0
CDataDisplayPropertiesDialog::CDataDisplayPropertiesDialog( QWidget *parent, CFormula *formula, COperation *operation )
    : base_t( parent )
    , mFormula( formula )
    , mOperation( operation )
{
	assert__( mFormula->GetFieldType() == CMapTypeField::eTypeOpAsField );

    CreateWidgets();

    setWindowTitle( ( "'" + formula->GetName() + "' Display Properties").c_str() );
}
Exemplo n.º 21
0
CExportImageDialog::CExportImageDialog( bool enable2D, bool enable3D, std::string &ouput_path2d, std::string &ouput_path3d, QWidget *parent )
    : base_t( parent )
	, mOutputFileName2D( ouput_path2d )
	, mOutputFileName3D( ouput_path3d )
{
	assert__( enable2D || enable3D );

    CreateWidgets( enable2D, enable3D );

    setWindowTitle( "Export to Image");
}
Exemplo n.º 22
0
GeneralWidget::GeneralWidget(X11Utils::XRRConfiguration* xrr_config, GraphicsWindow* parent)
    : GraphicsWidget(parent), m_xrr_config(xrr_config)
{
  CreateWidgets();
  LoadSettings();
  ConnectWidgets();
  AddDescriptions();
  emit BackendChanged(QString::fromStdString(SConfig::GetInstance().m_strVideoBackend));

  connect(parent, &GraphicsWindow::BackendChanged, this, &GeneralWidget::OnBackendChanged);
  connect(&Settings::Instance(), &Settings::EmulationStateChanged, this,
          [=](Core::State state) { OnEmulationStateChanged(state != Core::State::Uninitialized); });
}
Exemplo n.º 23
0
//--------------------------------------------------------------------------
Widget ScriptConsoleRenamePresetDialog::Init()
{
	Widget layoutRoot = CreateWidgets("gui/layouts/script_console_dialog_preset.layout", NULL);
	m_Editbox = layoutRoot.FindAnyWidget("PrimaryEditBox");
	m_Label = layoutRoot.FindAnyWidget("WindowLabel");
	m_Message = layoutRoot.FindAnyWidget("MessageText");

	MissionBase mission = GetGame().GetMission();
	m_Editbox.SetText( mission.m_scriptConsole.GetCurrentPresetName() );
	m_Label.SetText("RENAME PRESET");
	m_Message.SetText( mission.m_scriptConsole.GetCurrentPresetName() );

	return layoutRoot;
}
Exemplo n.º 24
0
CheatWarningWidget::CheatWarningWidget(const std::string& game_id, bool restart_required,
                                       QWidget* parent)
    : QWidget(parent), m_game_id(game_id), m_restart_required(restart_required)
{
  CreateWidgets();
  ConnectWidgets();

  connect(&Settings::Instance(), &Settings::EnableCheatsChanged, this,
          [this] { Update(Core::IsRunning()); });
  connect(&Settings::Instance(), &Settings::EmulationStateChanged, this,
          [this](Core::State state) { Update(state == Core::State::Running); });

  Update(Core::IsRunning());
}
Exemplo n.º 25
0
CheatsManager::CheatsManager(QWidget* parent) : QDialog(parent)
{
  setWindowTitle(tr("Cheats Manager"));
  setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);

  connect(&Settings::Instance(), &Settings::EmulationStateChanged, this,
          &CheatsManager::OnStateChanged);

  OnStateChanged(Core::GetState());

  CreateWidgets();
  ConnectWidgets();
  Reset();
  Update();
}
Exemplo n.º 26
0
void CGUIEditor::CreateDocView(UINT xRes, UINT yRes)
{
	CreateWidgets();	
	CGUIEditorDoc *createDoc;
	// create blank document, with frame
	createDoc = DYNAMIC_DOWNCAST(CGUIEditorDoc, m_DocTemplate->OpenDocumentFile(NULL));
	createDoc->SetToolbar(&m_TabBar);

	createDoc->NewGUISystem(xRes, yRes);
		
    SIZEDATA sd;
	sd.m_fXSize = (float)xRes;
	sd.m_fYSize = (float)yRes;
	static DWORD msgHash_SetSize = CHashString(_T("SetSize")).GetUniqueID();
	m_ToolBox->SendMessage(msgHash_SetSize, sizeof(SIZEDATA), &sd, &CHashString(_T("WorkingCanvas")), &CHashString(_T("CGUIBackground")));		
}
Exemplo n.º 27
0
bool wxGenericColourDialog::Create(wxWindow *parent, wxColourData *data)
{
    if ( !wxDialog::Create(GetParentForModalDialog(parent, 0), wxID_ANY,
                           _("Choose colour"),
                           wxPoint(0, 0), wxSize(900, 900)) )
        return false;

    if (data)
        m_colourData = *data;

    InitializeColours();
    CalculateMeasurements();
    CreateWidgets();

    return true;
}
Exemplo n.º 28
0
GeckoCodeWidget::GeckoCodeWidget(const GameFile& game)
    : m_game(game), m_game_id(game.GetGameID().toStdString()), m_game_revision(game.GetRevision())
{
  CreateWidgets();
  ConnectWidgets();

  IniFile game_ini_local;

  // We don't use LoadLocalGameIni() here because user cheat codes that are installed via the UI
  // will always be stored in GS/${GAMEID}.ini
  game_ini_local.Load(File::GetUserPath(D_GAMESETTINGS_IDX) + m_game_id + ".ini");

  IniFile game_ini_default = SConfig::GetInstance().LoadDefaultGameIni(m_game_id, m_game_revision);
  m_gecko_codes = Gecko::LoadCodes(game_ini_default, game_ini_local);

  UpdateList();
}
Exemplo n.º 29
0
 /* -------------------------- OnReady ----------------------------------- */
 void GuiPanelComponent::OnReady(Entity* _entity) {
     DrawableComponent::OnReady(_entity);
     
     // Initialize guichan
     graphics = new gcn::SFMLGraphics(*_entity->GetRenderTarget());
     imageLoader = new gcn::SFMLImageLoader();
     input = new gcn::SFMLInput();
     
     gui.setGraphics(graphics);
     gui.setInput(input);
     gcn::Image::setImageLoader(imageLoader);
     
     // Call the create widgets function
     if (font)
         gcn::Widget::setGlobalFont(font);
     CreateWidgets();
 }
Exemplo n.º 30
0
	KBOOL AppFrame::Initialize( KCCHAR* pTitle, KCCHAR* pIcon )
	{
		if (g_theApp) return false;
		else  g_theApp = this;

#ifdef _DEBUG
		m_pRoot = OGRE_NEW Ogre::Root("plugins_debug.cfg");
#else
		m_pRoot = OGRE_NEW Ogre::Root();
#endif

		//////////////////////////////////////////////////////////////////////////
		if(m_pRoot->restoreConfig() || m_pRoot->showConfigDialog())
		{
			m_pWindow = m_pRoot->initialise(true, pTitle);
			
			//-------------------------------------------------------
			// ╪стьм╪╠Й
			HWND hwnd;
			m_pWindow->getCustomAttribute("WINDOW", (void*)&hwnd);

			HINSTANCE hinstance;
			hinstance = GetModuleHandle(NULL);
			HICON icon = LoadIconA(hinstance, pIcon);

			SendMessage(hwnd, WM_SETICON, ICON_BIG, LPARAM(icon));
			SendMessage(hwnd, WM_SETICON, ICON_SMALL, LPARAM(icon));
			//-------------------------------------------------------

			if (!LoadResources())
				return false;

			// Set default mipmap level (NB some APIs ignore this)
			Ogre::TextureManager::getSingleton().setDefaultNumMipmaps(5);
			
			Ogre::WindowEventUtilities::addWindowEventListener(m_pWindow, this);
			m_pRoot->addFrameListener(this);

			//////////////////////////////////////////////////////////////////////////
			CreateWidgets();
			
			return true;
		}
		
		return false;