Beispiel #1
0
int main(int argc, char *argv[])
{
  QApplication app(argc, argv);
  new Kernel; // will be deleted by the QQmlEngine
  qmlRegisterSingletonType<Kernel>("Lemonade", 1, 0, "Kernel",
                                    kernelInstanceProvider);
  QQmlEngine engine;
  auto window_color = app.palette().color(QPalette::Window);
  QMainWindow window;
  window.setWindowTitle(window.tr("Lemonade"));
  window.setMenuBar(initMenuBar());
  auto central = new QWidget;
  auto layout = new QHBoxLayout;
  layout->setSpacing(0);
  layout->setContentsMargins(0, 0, 0, 0);
  auto tool_button_bar = new QQuickWidget(&engine, central);
  tool_button_bar->setClearColor(window_color);
  tool_button_bar->setSource(
      QUrl(QLatin1String("qrc:/content/ToolButtonBar.qml")));
  layout->addWidget(tool_button_bar);
  auto hsplitter = new QSplitter(Qt::Horizontal);
  hsplitter->setChildrenCollapsible(false);
  hsplitter->addWidget(initCanvasView());
  layout->addWidget(hsplitter);
  auto vsplitter = new QSplitter(Qt::Vertical);
  vsplitter->addWidget(initNavigatorPanel());
  vsplitter->addWidget(initLayerTreePanel());
  hsplitter->addWidget(vsplitter);
  central->setLayout(layout);
  window.setCentralWidget(central);
  window.resize(800, 600);
  window.show();
  return app.exec();
}
Beispiel #2
0
void App::initView(void)
{
  initSettings();
  initDoc();
  initSequenceEngine();

  QString dir;
  settings()->get(KEY_SYSTEM_DIR, dir);
  dir += QString("/") + PIXMAPPATH;
  
  setIcon(QPixmap(dir + QString("/Q.xpm")));

  initWorkspace();
  connect(m_settings, SIGNAL(outputPluginChanged(const QString&)), m_doc, SLOT(slotChangeOutputPlugin(const QString&)));

  initMenuBar();
  initStatusBar();
  initToolBar();

  initVirtualConsole();
  initDeviceManagerView();

  QString config;
  settings()->get(KEY_OPEN_LAST_WORKSPACE, config);

  if (config == Settings::trueValue())
    {
      settings()->get(KEY_LAST_WORKSPACE_NAME, config);

      doc()->loadWorkspaceAs(config);
      setCaption(KApplicationNameLong + QString(" - ") + doc()->workspaceFileName());
      virtualConsole()->hide();
    }
}
Beispiel #3
0
settings_frame::settings_frame(wxWindow *parent, wxWindowID id, const wxString &title, const wxPoint &position, const wxSize& pa_size)
	: wxFrame(parent, id, title, position, pa_size),
	WindowAttributesPickle( _T("SETTINGSFRAME"), this, wxSize( DEFSETT_SW_WIDTH, DEFSETT_SW_HEIGHT ) )
{
	alreadyCalled = false;
	parentWindow = parent;

	if ( !usync().IsLoaded() )
        usync().ReloadUnitSyncLib();

	notebook = new wxNotebook(this, ID_OPTIONS, wxPoint(0,0),TAB_SIZE, wxNB_TOP|wxNB_NOPAGETHEME);
	notebook->SetFont(wxFont(8, wxSWISS, wxNORMAL,wxNORMAL, false, _T("Tahoma")));

	settingsIcon  = new wxIcon(springsettings_xpm);

    if (abstract_panel::loadValuesIntoMap())
	{
		CreateGUIControls();
		initMenuBar();
	}
	else
	{
		notebook->AddPage(new PathOptionPanel(notebook,this),_("Error!"));
		SetTitle(_T("SpringSettings"));
	}

     SetIcon(*settingsIcon);
     Layout();
     Center();
}
Beispiel #4
0
App::App(QWidget* parent) : QMainWindow(parent)
{
	_app = this;

	m_fileMenu = NULL;
	m_helpMenu = NULL;
	m_toolBar = NULL;

	m_copyChannel = NULL;

	setWindowTitle(App::longName());
	setWindowIcon(QIcon(":/qlc-fixtureeditor.png"));
	setCentralWidget(new QMdiArea(this));

	QCoreApplication::setOrganizationName("qlc");
	QCoreApplication::setOrganizationDomain("sf.net");
	QCoreApplication::setApplicationName(FXEDNAME);

	initActions();
	initMenuBar();
	initToolBar();

	QSettings settings;
	QVariant var = settings.value(KSettingsGeometry);
	if (var.isValid() == true)
		restoreGeometry(var.toByteArray());
}
Beispiel #5
0
	Frame::Frame(const wxString& title, const wxString& filetag)
		: wxFrame(NULL, wxID_ANY, title, wxDefaultPosition, wxSize(800, 600))
		, m_task(NULL)
		, m_filetag(filetag)
	{
		initMenuBar();
	}
Beispiel #6
0
ChatBase::ChatBase( QWidget* parent, const char *name )
  : KMainWindow(parent, name, WDestructiveClose)
{
  initMenuBar();

	QMimeSourceFactory::setDefaultFactory((QMimeSourceFactory *)(kapp->mimeSourceFactory()));
}
Beispiel #7
0
scopePlot::scopePlot(QString title, QWidget *parent) : QMainWindow(parent)
{
  wd=new QWidget(this);
  ui.setupUi(wd);
  mrk1=0;
  mrk2=0;
  initActions();
  initMenuBar();
  initToolBar();
  initStatusBar();
  curve1 = new QwtPlotCurve("Curve 1");
  curve2 = new QwtPlotCurve("Curve 2");
  curve3 = new QwtPlotCurve("Curve 3");
  curve4 = new QwtPlotCurve("Curve 4");

  xScaleMul=1.;
  xPrimeScaleMul=1.;
  xAltScaleMul=1;
  xAxisTitle="Samples";
  xAltAxisTitle="Time (s)";
  toggleMarker=false;

  showCrv1=true;
  showCrv2=true;
  showCrv3=true;
  showCrv4=true;
  init(title);
}
Beispiel #8
0
/**
 * Main initialization function
 */
void App::init()
{
	QSettings settings;

	setWindowIcon(QIcon(":/qlc.png"));

#ifndef __APPLE__
	/* MDI Area */
	setCentralWidget(new QMdiArea(this));
	centralWidget()->setContextMenuPolicy(Qt::CustomContextMenu);
	connect(centralWidget(),
		SIGNAL(customContextMenuRequested(const QPoint&)),
		this,
		SLOT(slotCustomContextMenuRequested(const QPoint&)));

	/* Workspace background */
	setBackgroundImage(settings.value("/workspace/background").toString());

	/* Application geometry and window state */
	QVariant var;
	var = settings.value(KXMLQLCGeometry, QRect(0, 0, 800, 600));
	if (var.isValid() == true)
		setGeometry(var.toRect());
	var = settings.value(KXMLQLCWindowState, Qt::WindowNoState);
	if (var.isValid() == true)
		setWindowState(Qt::WindowState(var.toInt()));
#else
	/* App is just a toolbar, we only need it to be the size of the
	   toolbar's buttons */
	resize(600, 32);
	move(0, 22);
#endif

	/* Input & output mappers and their plugins */
	initOutputMap();
	initInputMap();

	/* Function running engine/master timer */
	m_masterTimer = new MasterTimer(this, m_outputMap);
	m_masterTimer->start();

	/* Buses */
	Bus::init(this);

	/* Fixture definitions */
	loadFixtureDefinitions();

	// The main view
	initStatusBar();
	initActions();
	initMenuBar();
	initToolBar();

	// Document
	initDoc();

	// Start up in non-modified state
	m_doc->resetModified();
}
MainWindow::MainWindow ( QWidget * parent, Qt::WindowFlags flags )
        :QMainWindow ( parent , flags ), m_fullScreenAction ( 0 ),
        m_closeFullScreenAction ( 0 ), m_adminPanel(0)
{
    init();
    initActions();
    initMenuBar();
    retranslateStrings();
}
Beispiel #10
0
/** add comments here */
InterfaceDuel::InterfaceDuel()
{
	_server = new AttalServer( ATTAL_PORT );	
	setCaption("Attal - Lords of Doom (Server)");
	initMenuBar();
	initStatusBar();

	_widget = new ServerWidget( this );
	setCentralWidget( _widget );
}
Beispiel #11
0
void settings_frame::buildGuiFromErrorPanel()
{
	notebook->DeletePage(0);

	//to be safe we'll try again
	if (abstract_panel::loadValuesIntoMap()) {
		CreateGUIControls();
		initMenuBar();
	}
}
Beispiel #12
0
/** add comments here */
InterfaceDuel::InterfaceDuel()
{
	_server = new AttalServer( PORT.toInt() );	
	setWindowTitle("Attal - Lords of Doom (Server)");
	initMenuBar();
	initStatusBar();

	_widget = new ServerWidget( this );
	setCentralWidget( _widget );
}
Beispiel #13
0
/*
 * The show() public SLOT, when the app is being drawn!!!
 * Init member variables and all UI widgets
 */
void MainWindow::show()
{
  if(m_initializationCompleted == false)
  {
    restoreGeometry(SettingsManager::getWindowSize());
    m_commandExecuting=ectn_NONE;
    m_commandQueued=ectn_NONE;
    m_leFilterPackage = new SearchLineEdit(this, m_hasSLocate);

    setWindowTitle(StrConstants::getApplicationName());
    setMinimumSize(QSize(820, 520));

    initTabOutput();
    initTabInfo();
    initTabFiles();
    initTabTransaction();
    initTabHelpUsage();
    initTabNews();
    initLineEditFilterPackages();
    initPackageTreeView();
    initActions();
    loadSettings();
    loadPanelSettings();
    initStatusBar();
    initToolButtonPacman();
    initToolButtonAUR();
    initAppIcon();
    initMenuBar();
    initToolBar();
    initTabWidgetPropertiesIndex();
    refreshDistroNews(false);

    if (Package::hasPacmanDatabase())
    {
      refreshGroupsWidget();
    }        

    QMainWindow::show();

    m_listOfVisitedPackages.clear();
    m_indOfVisitedPackage = 0;

    if (Package::hasPacmanDatabase())
    {
      metaBuildPackageList();
    }
    // Maybe this system has never run a pacman -Syy
    else
    {
      doSyncDatabase();
    }
  }
  else
    QMainWindow::show();
}
ParamConverter::ParamConverter(QWidget *parent)
    : QMainWindow(parent)
{
    setWindowTitle("Param Converter");
    setMinimumSize(800, 600);

    mainEdit = new QPlainTextEdit();
    setCentralWidget(mainEdit);

    initMenuBar();
}
Beispiel #15
0
MainWindow::MainWindow(const wxString& title,
                       const wxPoint& pos,
                       const wxSize& size)
	: wxFrame( NULL, -1, title, pos, size ),
      m_menuBar(NULL),
      m_toolBar(NULL),
	  m_bitmap(wxBitmap()),
      m_hsizer(NULL)
{
  m_mgr.SetManagedWindow(this);
  wxInitAllImageHandlers();
  initMenuBar();

  SetMenuBar( m_menuBar );

  initToolBars();
  initMainPanel();
  {
    wxPanel * pnSettings = new wxPanel(this, wxID_ANY);
    wxPanel * p = pnSettings;
    wxButton * btnInpaint =
        new wxButton(p, wxID_ANY, wxT("Inpaint"), // wxBitmap(inpaint_xpm),
                     wxDefaultPosition, wxDefaultSize);
    wxBoxSizer * vsizer = new wxBoxSizer(wxVERTICAL);
    vsizer->Add(btnInpaint, 0,
                wxALIGN_CENTER | wxALIGN_CENTER_VERTICAL | wxEXPAND
                );
    p->SetSizer(vsizer);
    p->SetSize(wxSize(200,150));
    //if (0)
    {
      wxPanel * pInpaint = new wxPanel(this, wxID_ANY);
      wxSpinCtrl * scThreshold =
          new wxSpinCtrl(pInpaint, wxID_ANY, wxT("threshold"));
      scThreshold->SetValue(5);
      scThreshold->SetRange(1,100);

      wxBoxSizer * pInpaintSizer = new wxBoxSizer(wxVERTICAL);
      pInpaintSizer->Add(scThreshold, 0,
                         wxALIGN_CENTER|wxALIGN_CENTER_VERTICAL|wxEXPAND);
      pInpaint->SetSizer(pInpaintSizer);
      pInpaint->SetSize(200, 150);
      p = pInpaint;
      // m_mgr.AddPane(p, wxRIGHT, wxT("Inpaint Panel"));
    }
    m_mgr.AddPane(p, wxRIGHT, wxT("Manipulations Panel"));
  }
  

  initEvents();
  m_mgr.Update();
}
Beispiel #16
0
MainWindow::MainWindow()
{
	setCaption(tr("GA Bots " VERSION));

	initActions();
	initMenuBar();
	initToolBar();
	initStatusBar();

	initGABotDoc();
	initView();

	ViewToolBar->setOn(true);
	ViewStatusBar->setOn(true);
	//ViewGame->setOn(true);

	connect(GABotDoc, SIGNAL(gameReady(bool)), this, SLOT(slotGameReady(bool)));
	connect(GABotDoc, SIGNAL(teamAScores()), View, SLOT(slotScoreA()));
	connect(GABotDoc, SIGNAL(teamBScores()), View, SLOT(slotScoreB()));
	connect(GABotDoc, SIGNAL(clearScores()), View, SLOT(slotClearScores()));

	connect(GABotDoc, SIGNAL(moveTeamA(Coordinate, Coordinate)), View,
		SLOT(slotMoveTeamA(Coordinate, Coordinate)));
	connect(GABotDoc, SIGNAL(moveTeamB(Coordinate, Coordinate)), View,
		SLOT(slotMoveTeamB(Coordinate, Coordinate)));
	connect(GABotDoc, SIGNAL(turnTeamA(Coordinate, Direction)), View,
		SLOT(slotTurnTeamA(Coordinate, Direction)));
	connect(GABotDoc, SIGNAL(turnTeamB(Coordinate, Direction)), View,
		SLOT(slotTurnTeamB(Coordinate, Direction)));

	connect(GABotDoc, SIGNAL(moveBall(Coordinate,Coordinate)), View,
		SLOT(slotMoveBall(Coordinate,Coordinate)));

	connect(GoGame, SIGNAL(activated()), this, SLOT(slotGoGame()));
	connect(GoGame, SIGNAL(activated()), GABotDoc, SLOT(slotStartTimer()));
	connect(StopGame, SIGNAL(activated()), GABotDoc, SLOT(slotStopTimer()));
	connect(StopGame, SIGNAL(activated()), this, SLOT(slotStopGame()));

	connect(View, SIGNAL(valueChanged(int)), this, SLOT(slotTickInterval(int)));
	connect(GABotDoc, SIGNAL(clearField()), View, SLOT(slotClearField()));

	connect(ResetScreen, SIGNAL(activated()), View, SLOT(slotClearField()));
//not sure if we should clear the field whenever regenerating the team
//	connect(TeamAGenerate,SIGNAL(activated()), View, SLOT(slotClearField()));
//	connect(TeamBGenerate,SIGNAL(activated()), View, SLOT(slotClearField()));

	connect(GABotDoc, SIGNAL(gameOver()), View, SLOT(slotClearField()));
	connect(GABotDoc, SIGNAL(gameOver()), View, SLOT(slotClearScores()));
	connect(GABotDoc, SIGNAL(gameOver()), this, SLOT(slotGameOver()));
	
}
Beispiel #17
0
void App::initView(void)
{
  initSettings();

  setIcon(QPixmap(QString(PIXMAPS) + QString("/Q.xpm")));

  initWorkspace();

  initMenuBar();
  initStatusBar();
  initToolBar();
  
  m_lastPath = QString(FIXTURES);
}
Beispiel #18
0
/** add comments here */
ScenarioInterface::ScenarioInterface()
{
	_filename = "";

	setCaption( "Scenario editor for 'Attal - Lords of Doom'" );
	initMenuBar();
	initStatusBar();
	DataTheme.init();
	ImageTheme.init();
	_screen = new Screen( this );
	setCentralWidget( _screen );

	resize( 600, 600 );
}
Beispiel #19
0
void App::initView(void)
{
	setIcon(QPixmap(QString(PIXMAPS) + QString("/qlc-fixtureeditor.png")));

	initWorkspace();

	initMenuBar();
	initStatusBar();
	initToolBar();

	m_lastPath = QString(FIXTURES);

	resize(800, 600);
}
/*XmdvToolMainWnd::XmdvToolMainWnd(QWidget *parent)
: QMainWindow(parent)
{

	//To display help in QT Assistant
	assistant = new Assistant;

	m_pipelineManager = new PipelineManager(this);

	m_viewManager = new ViewManager(this);

	if (this->objectName().isEmpty())
		this->setObjectName(QString::fromUtf8("XmdvToolMainWnd"));
	this->resize(1000, 600);
	this->setWindowIcon(ICON_PA);

	m_mdiArea = new QMdiArea(this);
	this->setCentralWidget(m_mdiArea);
	m_viewManager->setMdiArea(m_mdiArea);
	connect(m_mdiArea, SIGNAL(subWindowActivated(QMdiSubWindow*)),
			m_viewManager, SLOT(mdiSubWindowActivated(QMdiSubWindow*)) );

	m_handleFiles = new HandleFiles(this);
	m_handleView = new HandleView(this);
	m_handleBrush = new HandleBrush(this);
	m_handleTools = new HandleTools(this);
	m_handleZoom = new HandleZoom(this);

	initFileActions();
	initViewActions();
	initBrushActions();
	initToolsActions();
	initWindowActions();
	initVisActions();
	initZoomActions();
	initHelpActions();

	initMenuBar();
	initFileMenu();
	initViewMenu();
	initBrushMenu();
	initToolsMenu();
	initWindowMenu();
	initHelpMenu();

    initToolBarTop();
	initToolBarRight();
	initStatusBar();

	this->setMouseTracking(true);
}*/
XmdvToolMainWnd::XmdvToolMainWnd(QWidget *parent, RInside &R)
:QMainWindow(parent),m_R(R)
{
   // m_R = R.instance();
    assistant = new Assistant;

    m_pipelineManager = new PipelineManager(this);

    m_viewManager = new ViewManager(this);

    if (this->objectName().isEmpty())
        this->setObjectName(QString::fromUtf8("XmdvToolMainWnd"));
    this->resize(1000, 600);
    this->setWindowIcon(ICON_PA);

    m_mdiArea = new QMdiArea(this);
    this->setCentralWidget(m_mdiArea);
    m_viewManager->setMdiArea(m_mdiArea);
    connect(m_mdiArea, SIGNAL(subWindowActivated(QMdiSubWindow*)),
            m_viewManager, SLOT(mdiSubWindowActivated(QMdiSubWindow*)) );

    m_handleFiles = new HandleFiles(this);
    m_handleView = new HandleView(this);
    m_handleBrush = new HandleBrush(this);
    m_handleTools = new HandleTools(this);
    m_handleZoom = new HandleZoom(this);

    initFileActions();
    initViewActions();
    initBrushActions();
    initToolsActions();
    initWindowActions();
    initVisActions();
    initZoomActions();
    initHelpActions();

    initMenuBar();
    initFileMenu();
    initViewMenu();
    initBrushMenu();
    initToolsMenu();
    initWindowMenu();
    initHelpMenu();

    initToolBarTop();
    initToolBarRight();
    initStatusBar();

    this->setMouseTracking(true);
}
Beispiel #21
0
void settings_frame::buildGuiFromErrorPanel()
{
	notebook->DeletePage(0);

	//to be safe we'll try again
	if (abstract_panel::loadValuesIntoMap())
	{
		CreateGUIControls();
		initMenuBar();
	}
	else
	{
		notebook->AddPage(new PathOptionPanel(notebook,this),_("Error!"));
	}
}
bool DiffAnalystWindow::init(QString session0, 
			QString session1) 
{
	QString diffSessName;
	bool ret = false;
	// ////////////////////////////////////////////////////////////////
	// Instantiate the workspace
	// ////////////////////////////////////////////////////////////////

	m_pSplitter	= new QSplitter (this);
	if(m_pSplitter == NULL) return ret;
	m_pVBox		= new QVBox (m_pSplitter);
	if(m_pVBox == NULL) return ret;
	m_pWs		= new QWorkspace (m_pVBox);
	if(m_pWs == NULL) return ret;

	// When we cascade the sessions...
	m_pWs->setScrollBarsEnabled (true);
	m_pVBox->setFrameStyle (QFrame::StyledPanel | QFrame::Sunken);

	QObject::connect (m_pWs,
		SIGNAL (windowActivated (QWidget *)),
		SLOT (onWindowActivated (QWidget *)));

	setCentralWidget (m_pSplitter);

	// /////////////////////////////////////////////////////////////////////
	// Setup Initial Caption
	setDiffAnalystCaption(diffSessName);

	ret = true;
	ret = ret && initMenuBar();
	ret = ret && initViewToolBar();
	ret = ret && initDasmDockView();
	ret = ret && initPropDockView();
	
	// /////////////////////////////////////////////////////////////////////
	// Initialize Status Bar
	ret = ret && initStatusBar();

	// /////////////////////////////////////////////////////////////////////
	if( !session0.isEmpty() && !session1.isEmpty())
	{
		ret = ret && startCAProfDiffSession(session0, session1,diffSessName);
	}
	
	return ret;
}//init()
Beispiel #23
0
/** add comments here */
AiInterface::AiInterface()
{
    _socket = 0;
    iaLogLevel = LOG_VERBOSE;
    DataTheme.init();

    _analyst = new Analyst();

    setCaption( "Attal: IA client" );
    initMenuBar();
    initStatusBar();

    _edit = new QMultiLineEdit( this );
    _edit->setReadOnly( true );
    screen = _edit;
    setCentralWidget( _edit );

    connect( &aifLog, SIGNAL( sig_print( QString ) ), SLOT( slot_log( QString ) ) );
}
/**
  * Initialisiert die Komponenten der Anwendung
  */
AstroCalcApp::AstroCalcApp()
{
	CalcBib = new AstroCalcBib();

	QPixmap imageApp( ( const char** ) imageApp_data );
	setIcon( imageApp );	
	setCaption( tr( "AstroCalc" ));
	/* setCaption(tr("AstroCalc " VERSION)); */
	/* Fenster laesst sich dennoch verkleinern... Any hints ?! */
	setFixedSize( 400, 240 );
	
	///////////////////////////////////////////////////////////////////
	// call inits to invoke all other construction parts
  	initActions();
  	initMenuBar();
	initToolBar();
  	initMainLabel();
  	initStatusBar();
  	
  	viewToolBar->setOn(true);
  	viewStatusBar->setOn(true);
}
Beispiel #25
0
settings_frame::settings_frame(wxWindow *parent, const wxString &title, wxWindowID id)
	: wxFrame(parent, id, title ),
	WindowAttributesPickle( _T("SETTINGSFRAME"), this, wxSize( DEFSETT_SW_WIDTH, DEFSETT_SW_HEIGHT ) ),
	simpleTab(0),
	uiTab(0),
	audioTab(0),
	detailTab(0),
	qualityTab(0),
	hotkeyTab(0),
	settingsIcon( new wxIcon(springsettings_xpm) ),
	m_has_focus(true)
{
	SetIcons( SLcustomizations().GetAppIconBundle() );

	alreadyCalled = false;
	parentWindow = parent;

	if ( !usync().IsLoaded() )
        usync().ReloadUnitSyncLib();

	notebook = new wxNotebook(this, ID_OPTIONS);
//	notebook->SetFont(wxFont(8, wxSWISS, wxNORMAL,wxNORMAL, false, _T("Tahoma")));


    if (abstract_panel::loadValuesIntoMap())
	{
		CreateGUIControls();
		initMenuBar();
	}
	else
	{
		notebook->AddPage(new PathOptionPanel(notebook,this),_("Error!"));
	}

     Layout();
     Center();

     if ( !parentWindow ) 	UpdateMainAppHasFocus(m_has_focus); // only do if not being a slave of main SL app
}
Beispiel #26
0
/** add comments here */
ServerInterface::ServerInterface()
	:QMainWindow()
{
	setCaption( "Attal - Lords of Doom (Server)" );
	initMenuBar();
	initStatusBar();
	DataTheme.init();

	_widget = new ServerWidget( this );
	setCentralWidget( _widget );

	connect( _widget, SIGNAL( sig_stop() ), SLOT( slot_stop() ) );
	connect( _widget, SIGNAL( sig_load( QString ) ), SLOT( slot_load( QString ) ) );
	connect( _widget, SIGNAL( sig_save() ), SLOT( slot_save() ) );

	setMinimumSize( 350, 200 );

	if( !init() ) {
		logDD( "quit" );
		qApp->quit();
	}
	connect( _server, SIGNAL( sig_endConnection( QString ) ), _widget, SLOT( slot_endConnection( QString ) ) );
}
Beispiel #27
0
settings_frame::settings_frame(wxWindow* parent, const wxString& title, wxWindowID id)
    : wxFrame(parent, id, title)
    , WindowAttributesPickle(_T("SETTINGSFRAME"), this, wxSize(DEFSETT_SW_WIDTH, DEFSETT_SW_HEIGHT))
    , simpleTab(0)
    , uiTab(0)
    , audioTab(0)
    , detailTab(0)
    , qualityTab(0)
    ,
    //	hotkeyTab(0),
    settingsIcon(new wxIcon(springsettings_xpm))
    , m_has_focus(true)
{
	SetMinSize(wxSize(DEFSETT_SW_WIDTH, DEFSETT_SW_HEIGHT));

	alreadyCalled = false;
	parentWindow = parent;

	notebook = new wxNotebook(this, ID_OPTIONS);
	//	notebook->SetFont(wxFont(8, wxSWISS, wxNORMAL,wxNORMAL, false, _T("Tahoma")));


	if (abstract_panel::loadValuesIntoMap()) {
		CreateGUIControls();
		initMenuBar();
	}

	//Dialog just created, no setting were changed yet
	abstract_panel::settingsChanged = false;

	Layout();
	Center();

	if (!parentWindow)
		UpdateMainAppHasFocus(m_has_focus); // only do if not being a slave of main SL app
}
Beispiel #28
0
//
// Init the whole view
//
void VirtualConsole::initView(void)
{
    setCaption("Virtual Console");
    resize(200, 400);

    initMenuBar();

    // Reset ID
    VCFrame::ResetID();

    // Dock & Draw Area
    initDockArea();
    initDrawArea();

    slotModeChanged();
    connect(_app, SIGNAL(modeChanged()), this, SLOT(slotModeChanged()));

    // Check if VC should be open
    QString config;
    _app->settings()->get(KEY_VIRTUAL_CONSOLE_OPEN, config);
    if (config == Settings::trueValue())
    {
        _app->slotViewVirtualConsole();
    }
    else
    {
        hide();
        _app->slotVirtualConsoleClosed();
    }

    // Grid
    _app->settings()->get(KEY_VIRTUAL_CONSOLE_SNAPGRID, config);
    if (config == Settings::trueValue())
    {
        m_gridEnabled = true;
    }
    else
    {
        m_gridEnabled = false;
    }

    // Grid X
    if (_app->settings()->get(KEY_VIRTUAL_CONSOLE_GRIDX, config))
    {
        m_gridX = config.toInt();
    }
    else
    {
        m_gridX = 10;
    }

    // Grid Y
    if (_app->settings()->get(KEY_VIRTUAL_CONSOLE_GRIDY, config))
    {
        m_gridY = config.toInt();
    }
    else
    {
        m_gridY = 10;
    }
}
Beispiel #29
0
VirtualConsole::VirtualConsole(QWidget* parent, Doc* doc)
    : QWidget(parent)
    , m_doc(doc)

    , m_editAction(EditNone)
    , m_toolbar(NULL)

    , m_addActionGroup(NULL)
    , m_editActionGroup(NULL)
    , m_bgActionGroup(NULL)
    , m_fgActionGroup(NULL)
    , m_fontActionGroup(NULL)
    , m_frameActionGroup(NULL)
    , m_stackingActionGroup(NULL)

    , m_addButtonAction(NULL)
    , m_addButtonMatrixAction(NULL)
    , m_addSliderAction(NULL)
    , m_addSliderMatrixAction(NULL)
    , m_addSpeedDialAction(NULL)
    , m_addXYPadAction(NULL)
    , m_addCueListAction(NULL)
    , m_addFrameAction(NULL)
    , m_addSoloFrameAction(NULL)
    , m_addLabelAction(NULL)

    , m_toolsSettingsAction(NULL)

    , m_editCutAction(NULL)
    , m_editCopyAction(NULL)
    , m_editPasteAction(NULL)
    , m_editDeleteAction(NULL)
    , m_editPropertiesAction(NULL)
    , m_editRenameAction(NULL)

    , m_bgColorAction(NULL)
    , m_bgImageAction(NULL)
    , m_bgDefaultAction(NULL)

    , m_fgColorAction(NULL)
    , m_fgDefaultAction(NULL)

    , m_fontAction(NULL)
    , m_resetFontAction(NULL)

    , m_frameSunkenAction(NULL)
    , m_frameRaisedAction(NULL)
    , m_frameNoneAction(NULL)

    , m_stackingRaiseAction(NULL)
    , m_stackingLowerAction(NULL)

    , m_customMenu(NULL)
    , m_editMenu(NULL)
    , m_addMenu(NULL)

    , m_dockArea(NULL)
    , m_contentsLayout(NULL)
    , m_scrollArea(NULL)
    , m_contents(NULL)

    , m_tapModifierDown(false)
{
    Q_ASSERT(s_instance == NULL);
    s_instance = this;

    Q_ASSERT(doc != NULL);

    /* Main layout */
    new QHBoxLayout(this);
    layout()->setMargin(1);
    layout()->setSpacing(1);

    initActions();
    initDockArea();
    m_contentsLayout = new QVBoxLayout;
    layout()->addItem(m_contentsLayout);
    initMenuBar();
    initContents();

    // Propagate mode changes to all widgets
    connect(m_doc, SIGNAL(modeChanged(Doc::Mode)),
            this, SLOT(slotModeChanged(Doc::Mode)));

    // Use the initial mode
    slotModeChanged(m_doc->mode());

    // Nothing is selected
    updateActions();
}
Beispiel #30
0
//////////////////////////////////////////////////////////////////////
// Main initialization function                                     //
//                                                                  //
// This creates all items that are not saved in workspace files     //
//////////////////////////////////////////////////////////////////////
void App::init(QString openFile)
{
  //
  // Default size
  //
  resize(maximumSize());

  //
  // Settings has to be first
  //
  initSettings();

  //
  // Menus, toolbar, statusbar
  //
  initMenuBar();
  initStatusBar();
  initToolBar();

  //
  // The main view
  //
  initWorkspace();

  //
  // Plugins
  //
  initPlugins();

  //
  // Device classes
  //
  initDeviceClasses();

  //
  // Submasters & values
  //
  initSubmasters();
  initValues();

  //
  // Function consumer
  //
  initFunctionConsumer();

  //
  // Buses
  //
  Bus::init();

  //
  // Document
  //
  initDoc();

  //
  // Views
  //
  initDeviceManagerView();
  initVirtualConsole();


  // Trying to load workspace files
  // Either specified on command line or the last active workspace
  bool success = false;
  if (openFile != "")
    {
       success = doc()->loadWorkspaceAs(openFile);
       if (!success)
         {
            QString msg = "File: " + openFile + "\ncould'nt be opened. Please check path and spelling!\n";
	            msg += "We revert to the previously used workspace.";
	    QMessageBox::warning(this, KApplicationNameShort, msg,
			       QMessageBox::Ok, 0);
         }
    }
  //
  // Load the previous workspace
  //
  if (!success)
    {
      QString config;
      if (settings()->get(KEY_OPEN_LAST_WORKSPACE, config))
       {
         if (config == Settings::trueValue())
	  {
	    if (settings()->get(KEY_LAST_WORKSPACE_NAME, config))
	      {
	         success =  doc()->loadWorkspaceAs(config);
		 if (!success)
		   {
                      QString msg = "Previously used workspace file: " + config + "\ncould'nt be opened.";
	                      msg += "We start over with a new workspace.";
	              QMessageBox::warning(this, KApplicationNameShort, msg, QMessageBox::Ok, 0);
		   }
	      }
	  }
       }
    }
  if (!success)
    {
      newDocument();
    }
}