UIInternal(void* ptr, intptr_t winId, editParamFunc editParamCall, setParamFunc setParamCall, setStateFunc setStateCall, sendNoteFunc sendNoteCall, uiResizeFunc uiResizeCall) #ifdef DISTRHO_UI_OPENGL : glApp(), glWindow(&glApp, winId), kUi(createUI()), #else : kUi(createUI()), #endif kData((kUi != nullptr) ? kUi->pData : nullptr) { assert(kUi != nullptr); if (kUi == nullptr) return; #ifdef DISTRHO_UI_OPENGL //assert(winId != 0); //if (winId == 0) // return; #else assert(winId == 0); if (winId != 0) return; #endif kData->ptr = ptr; kData->editParamCallbackFunc = editParamCall; kData->setParamCallbackFunc = setParamCall; kData->setStateCallbackFunc = setStateCall; kData->sendNoteCallbackFunc = sendNoteCall; kData->uiResizeCallbackFunc = uiResizeCall; }
/** * private constructor */ MediaApp::MediaApp() : QWidget(), m_libraryOpened(false) { m_player = new Player(this); m_playlist = new Playlist(this); m_albumWidget = new AlbumWidget(this); m_albumWidget->LoadImage("Player", "The"); m_albumWidget->setGeometry(46, 16, 300, 300); connect(m_player, SIGNAL(positionChanged()), this, SLOT(onPositionChanged())); connect(m_player, SIGNAL(stateChanged()), this, SLOT(onStateChanged())); m_baseDir = QLatin1String("."); m_fullScreenTimer.setSingleShot(true); connect(&m_fullScreenTimer, SIGNAL(timeout()), this, SLOT(hideControls())); QHBoxLayout* mainLayout = new QHBoxLayout(); mainLayout->setContentsMargins(0, 0, 0, 0); createUI(mainLayout); setLayout(mainLayout); onStateChanged(); setWindowTitle(tr("ThePlayer")); resize(700, 400); }
LoginWindow::LoginWindow(IMAPClient* client, QWidget *parent, Qt::WindowFlags flags) : QDialog(parent, flags) { m_client = client; createUI(); setConnections(); }
/** * Lazy initialization */ int SettingsScreen::initialize(MAHandle stackScreen, MAHandle previewWidget) { mPreviewWidget = previewWidget; mStackScreen = stackScreen; numCameras = maCameraNumber(); createUI(); }
/** * Constructor. */ FirstScreen::FirstScreen() : Screen(), mMainLayout(NULL) { // First screen has some default menu items. mMainLayout = new VerticalLayout(); mMainLayout->setBackgroundColor(0x104E8B); Screen::setMainWidget(mMainLayout); this->setTitle("First"); createUI(); // By default the title is the activity name. maActionBarSetEnabled(1); addDefaultActionBarItems(); createAddItemDialog(); createRemoveItemDialog(); Screen::addScreenListener(this); mTitleSet->addButtonListener(this); mGetHeightBtn->addButtonListener(this); mShowCheckBox->addCheckBoxListener(this); mHideCheckBox->addCheckBoxListener(this); mGetVisibilityBtn->addButtonListener(this); mEnableTitle->addCheckBoxListener(this); mDisableTitle->addCheckBoxListener(this); mEnableLogo->addCheckBoxListener(this); mDisableLogo->addCheckBoxListener(this); mDisplayUpIndicator->addButtonListener(this); mAddItemBtn->addButtonListener(this); mRemoveItemBtn->addButtonListener(this); mAddItemDone->addButtonListener(this); mRemoveAllItemsDone->addButtonListener(this); }
void frmMainStateTable::setupUI(bool hasRowLabels_) { ui = createUI(); ui->setupUI(tableColumns(), hasRowLabels_, static_cast<QWidget*>(this->parent())); ui->toolbarDateBeginEdit->setDate(QDate::fromJulianDay(m_portfolio.startDate())); ui->toolbarDateEndEdit->setDate(QDate::fromJulianDay(m_portfolio.endDate())); setSortDropDown(); connect(ui->toolbarDateBeginEdit, SIGNAL(dateChanged(QDate)), this, SLOT(refreshTab())); connect(ui->toolbarDateEndEdit, SIGNAL(dateChanged(QDate)), this, SLOT(refreshTab())); connect(ui->toolbarSortCmb, SIGNAL(activated(int)), this, SLOT(sortIndexChanged(int))); connect(ui->toolbarReorder, SIGNAL(triggered()), this, SLOT(modifyColumns())); connect(ui->toolbarExport, SIGNAL(triggered()), ui->table, SLOT(exportTable())); connect(ui->tableCopy, SIGNAL(activated()), ui->table, SLOT(copyTable())); connect(ui->toolbar1D, SIGNAL(triggered()), this, SLOT(dateClicked())); connect(ui->toolbar3M, SIGNAL(triggered()), this, SLOT(dateClicked())); connect(ui->toolbar6M, SIGNAL(triggered()), this, SLOT(dateClicked())); connect(ui->toolbarYTD, SIGNAL(triggered()), this, SLOT(dateClicked())); connect(ui->toolbar1Y, SIGNAL(triggered()), this, SLOT(dateClicked())); connect(ui->toolbar5Y, SIGNAL(triggered()), this, SLOT(dateClicked())); connect(ui->toolbarMax, SIGNAL(triggered()), this, SLOT(dateClicked())); refreshTab(); connect(ui->table,SIGNAL(doubleClicked(const QModelIndex &)),this,SLOT(cellSelected(const QModelIndex &))); }
void draw() { unsigned char mbut = 0; int scrollarea1 = 0; int i; background(gray(122)); uiSetCursor((int)mouseX,(int)mouseY); for (i=0; i<3; i++) uiSetButton(i, 0); if (mousePressed) uiSetButton(mouseButton, 1); createUI(vg, width, height); uiProcess(); drawUI(vg, 0, 0, 0); { int x = mouseX - width/2; int y = mouseY - height/2; if (abs(x) > width/4) { bndJoinAreaOverlay(vg, 0, 0, width, height, 0, (x > 0)); } else if (abs(y) > height/4) { bndJoinAreaOverlay(vg, 0, 0, width, height, 1, (y > 0)); } } if (key == GLFW_KEY_ESCAPE) { quit(); } else if (key == GLFW_KEY_SPACE) { saveFrame("screenshot.png"); } }
MediaApp::MediaApp(QWidget *parent) : QWidget(parent) { //create the player m_player = new Player(this); connect(m_player, SIGNAL(positionChanged()), this, SLOT(onPositionChanged())); connect(m_player, SIGNAL(stateChanged()), this, SLOT(onStateChanged())); //m_baseDir is used to remember the last directory that was used. //defaults to the current working directory m_baseDir = QLatin1String("."); //this timer (re-)hides the controls after a few seconds when we are in fullscreen mode m_fullScreenTimer.setSingleShot(true); connect(&m_fullScreenTimer, SIGNAL(timeout()), this, SLOT(hideControls())); //create the UI QVBoxLayout *appLayout = new QVBoxLayout; appLayout->setContentsMargins(0, 0, 0, 0); createUI(appLayout); setLayout(appLayout); onStateChanged(); //set the controls to their default state setWindowTitle(tr("QtGStreamer example player")); resize(400, 400); }
MainScreen::MainScreen() : eventPeriodIndexTransmission(-1), editScreenMode(SEMInit) { readOptionsFormDevice(); applyOptions(); Styler::update(); mass = this; screenOptions = new ScreenOptions(this); waitMsg = new WaitMessage(); waitMsg->setTitle(Lang::getString(GS_WAIT)); screenEditEvent = new EditEventScreen(this); dbgPopup = new PopupMessage(); dbgPopup->setTitle(Lang::getString(GS_WAIT)); popProgress = new PopupProgress(Lang::getString(GS_WAITPB)); pmAlarmContextMenuClick = new PopupMenu(this); eventsList.regCallback(updateParseEventInfo); fontOverload(); createUI(); initLoad(); }
void ConfigTabFour::createLayout(void) { checkBoxGroup = new CheckBoxGroup(); createUI(); layout = new QGridLayout(this); layout->addWidget(percentageShareLabel,1,2,1,2); layout->addWidget(shareCheckBox[0],2,1); layout->addWidget(shareCheckBox[1],3,1); layout->addWidget(shareCheckBox[2],4,1); layout->addWidget(shareCheckBox[3],5,1); layout->addWidget(shareLabel[0],2,2); layout->addWidget(shareLabel[1],3,2); layout->addWidget(shareLabel[2],4,2); layout->addWidget(shareLabel[3],5,2); layout->addWidget(shareSlider[0],2,3); layout->addWidget(shareSlider[1],3,3); layout->addWidget(shareSlider[2],4,3); layout->addWidget(shareSlider[3],5,3); setLayout(layout); }
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) { createObjects(); createUI(); createConnects(); resize(800,600); }
QwtPlotPropertySetDialog::QwtPlotPropertySetDialog(QWidget *parent,ChartWave_qwt* plot) : QWidget(parent) ,m_plot(plot) ,m_enableSet(false) { createUI(); buildConnect(); }
MainWindow::MainWindow(QWidget* parent) : QMainWindow(parent) { createUI(); disableViewActions(); currentChild = 0; }
bool IntroScene::init() { if (!CCLayer::init()) { return false; } winSize = CCDirector::sharedDirector()->getWinSize(); createUI(); return true; }
MindMapWindow::MindMapWindow(MindMapPresentationModel* mindMapPresentationModel, QWidget* parent) : QMainWindow(parent) { _mindMapPresentationModel = mindMapPresentationModel; _mindMapPresentationModel->setObserver(this); resize(600, 400); createActions(); createUI(); }
/* * Constructor */ ScreenImageSwiper::ScreenImageSwiper(): Screen(), mAdsBanner(NULL) { createUI(); // Add a timer to keep the update at a 20 FPS rate MAUtil::Environment::getEnvironment().addTimer(this, FRAME_DELAY, 0); }
ImageViewerScreen::ImageViewerScreen(ImageViewerScreenController& controller): mController(controller), mMainLayout(NULL), mImageView(NULL), mDismissButton(NULL), mSaveImageButton(NULL), mActivityIndicator(NULL) { createUI(); }
WebViewGeoLocationApp() { // This app only runs on platforms that support NatiuveUI // and the WebView widget. Util::checkNativeUISupport(); // Create the user interface. This displays // the web page. createUI(); }
int main(void){ FILE *archive; Memory *memory; rcp_arg args; pthread_t processesCreation, frameUpdate, buttonEventsThread; bool frame_update = true, button_event = true; fu_arg frame_update_args; numberOfSpaces memory_size; insertionMode insertionModeID; archive = fileMenu(); XInitThreads(); if(!archive){ memory_size = getSize(); memory = createMemory(memory_size); args.memory = memory; insertionModeID = ask_rcp_args(&args); } else{ memory = dropSimulationFromFile(archive, &args, &insertionModeID); setInsertionMode(insertionModeID, &args); memory_size = memory->available + memory->inUse; } frame_update_args.memory = memory; frame_update_args.frame_update = &frame_update; frame_update_args.ui_params = createUI(); frame_update_args.ui_params -> byte_size = ((double)MEMORY_UI_X/(double)memory_size); frame_update_args.ui_params -> status = 1; frame_update_args.ui_params -> button_event = &button_event; frame_update_args.aux = &args; frame_update_args.insertionID = insertionModeID; pthread_mutex_init(&mutex_listModify, NULL); pthread_mutex_init(&mutex_play, NULL); pthread_cond_init(&cond_play, NULL); pthread_create(&processesCreation, NULL, randomCreateProcesses, &args); pthread_create(&frameUpdate, NULL, plotMemoryStatus, &frame_update_args); pthread_create(&buttonEventsThread, NULL, buttonEvents, &frame_update_args); pthread_join(processesCreation, NULL); while(memory->firstProcessCase); sleep(1); frame_update = false; pthread_join(frameUpdate, NULL); pthread_cond_destroy(&cond_play); pthread_mutex_destroy(&mutex_play); pthread_mutex_destroy(&mutex_listModify); pthread_exit((void *)NULL); return 0; }
SMV::SMV() { // void runTimerEvent() //{ // maWidgetScreenShow(0); //} //TimerListener //addTimer(this,6000,1); engine = new Engine(); createUI(); }
/** * Constructor. * Creates a Native UI screen. During this call a check if NativeUI is * supported by the runtime platform is made. For example, MoRE does not * support NativeUI at the time of writing this program/ */ MainScreen::MainScreen(): Screen() { // Create the UI widgets. createUI(); // Make the AppScreen listen for events coming from widgets. mClearButton->addButtonListener(this); mSubmitButton->addButtonListener(this); mPasswordBox->addEditBoxListener(this); }
SettingsDialog::SettingsDialog(QWidget *parent) : QDialog(parent) { setWindowTitle(tr("Settings")); m_intValidator = new QIntValidator(0, 4000000, this); createUI(); fillPortsParameters(); fillPortsInfo(); updateSettings(); }
HuMomentsWidget::HuMomentsWidget(QWidget *parent) { Q_UNUSED(parent) setTitle(QString("Hu Moments")); setCheckable(true); setChecked(false); createUI(); computeQuantity(); }
LLFloaterColorPicker::LLFloaterColorPicker (LLColorSwatchCtrl* swatch, BOOL show_apply_immediate ) : LLFloater(LLSD()), mComponents ( 3 ), mMouseDownInLumRegion ( FALSE ), mMouseDownInHueRegion ( FALSE ), mMouseDownInSwatch ( FALSE ), // *TODO: Specify this in XML mRGBViewerImageLeft ( 140 ), mRGBViewerImageTop ( 356 ), mRGBViewerImageWidth ( 256 ), mRGBViewerImageHeight ( 256 ), mLumRegionLeft ( mRGBViewerImageLeft + mRGBViewerImageWidth + 16 ), mLumRegionTop ( mRGBViewerImageTop ), mLumRegionWidth ( 16 ), mLumRegionHeight ( mRGBViewerImageHeight ), mLumMarkerSize ( 6 ), // *TODO: Specify this in XML mSwatchRegionLeft ( 12 ), mSwatchRegionTop ( 190 ), mSwatchRegionWidth ( 116 ), mSwatchRegionHeight ( 60 ), mSwatchView ( NULL ), // *TODO: Specify this in XML numPaletteColumns ( 16 ), numPaletteRows ( 2 ), highlightEntry ( -1 ), mPaletteRegionLeft ( 11 ), mPaletteRegionTop ( 100 - 8 ), mPaletteRegionWidth ( mLumRegionLeft + mLumRegionWidth - 10 ), mPaletteRegionHeight ( 40 ), mSwatch ( swatch ), mActive ( TRUE ), mCanApplyImmediately ( show_apply_immediate ), mContextConeOpacity ( 0.f ), mContextConeInAlpha ( 0.f ), mContextConeOutAlpha ( 0.f ), mContextConeFadeTime ( 0.f ) { buildFromFile ( "floater_color_picker.xml"); // create user interface for this picker createUI (); if (!mCanApplyImmediately) { mApplyImmediateCheck->setEnabled(FALSE); mApplyImmediateCheck->set(FALSE); } mContextConeInAlpha = gSavedSettings.getF32("ContextConeInAlpha"); mContextConeOutAlpha = gSavedSettings.getF32("ContextConeOutAlpha"); mContextConeFadeTime = gSavedSettings.getF32("ContextConeFadeTime"); }
// on "init" you need to initialize your instance bool BattleScene::init() { log("BattleScene::init()"); if ( !Scene::init() ) { return false; } initBattleData(); createUI(); createBottomBar(); return true; }
MesytecMadc32UI::MesytecMadc32UI(MesytecMadc32Module* _module) : module(_module), uif(this,&tabs), applyingSettings(false), previewRunning(false) { createUI(); createPreviewUI(); previewTimer = new QTimer(); previewTimer->setInterval(50); previewTimer->setSingleShot(true); std::cout << "Instantiated" << _module->getName().toStdString() << "UI" << std::endl; }
bool WagonSelect::init(TurnType turntype) { if(!Layer::init()) { return false; } _turntype = turntype; createUI(); return true; }
int main(int argc, char **argv) { initOpenGL(); initBSGUI(); createUI(); runMe(); shutdownBSGUI(); SDL_Quit(); return 0; }
EditorFrame::EditorFrame(const wxString& title) : wxFrame(nullptr, wxID_ANY, title) , paneCtrl(nullptr) , toolbarCtrl(nullptr) , statusCtrl(nullptr) , notebookCtrl(nullptr) , eventManager(nullptr) , pluginManager(nullptr) , documentManager(nullptr) , engine(nullptr) , archive(nullptr) , input(nullptr) { gs_EditorInstance = this; CoreInitialize(); #ifdef EDITOR_OLD_UI documentManager = AllocateThis(DocumentManager); documentManager->onDocumentAdded.Connect(this, &EditorFrame::onDocumentAdded); documentManager->onDocumentRemoved.Connect(this, &EditorFrame::onDocumentRemoved); documentManager->onDocumentRenamed.Connect(this, &EditorFrame::onDocumentRenamed); #endif createPlugins(); #ifdef EDITOR_OLD_UI createUI(); #endif createEngine(); eventManager = AllocateThis(EventManager); #ifdef ENABLE_PLUGIN_MONO Plugin* monoPlugin = pluginManager->getPluginFromClass( ReflectionGetType(MonoPlugin) ); pluginManager->enablePlugin(monoPlugin); #endif #ifdef EDITOR_OLD_UI enablePlugins(); createToolbar(); createLastUI(); #endif Bind(wxEVT_IDLE, &EditorFrame::OnIdle, this); Bind(wxEVT_CLOSE_WINDOW, &EditorFrame::OnClose, this); auto projectPlugin = GetPlugin<ProjectPlugin>(); projectPlugin->createDocument(); }
void ConfigTabTwo::createLayout(void) { createUI(); layout = new QGridLayout(this); layout->addWidget(iterationLabel,1,1); layout->addWidget(iterationLineEdit,1,2); layout->addWidget(chargePercentageLabel,2,1); layout->addWidget(chargePercentageSlider,2,2); setLayout(layout); }