Ejemplo n.º 1
0
/* 
 *  Constructs a form_ClientTest which is a child of 'parent', with the 
 *  name 'name' and widget flags set to 'f'.
 *
 *  The dialog will by default be modeless, unless you set 'modal' to
 *  TRUE to construct a modal dialog.
 */
form_ClientTest::form_ClientTest( QWidget* parent,  const char* name, bool modal, WFlags fl )
    : QDialog( parent, name, modal, fl )
{
    if ( !name )
	setName( "form_ClientTest" );
    resize( 802, 731 ); 
    setCaption( trUtf8( "Form1" ) );

    pb_test = new QPushButton( this, "pb_test" );
    pb_test->setGeometry( QRect( 410, 420, 51, 51 ) ); 
    pb_test->setText( trUtf8( "Test" ) );

    frameEditValue = new QFrame( this, "frameEditValue" );
    frameEditValue->setGeometry( QRect( 410, 30, 240, 160 ) ); 
    frameEditValue->setFrameShape( QFrame::StyledPanel );
    frameEditValue->setFrameShadow( QFrame::Raised );

    lvCatalogDesign = new QListView( this, "lvCatalogDesign" );
    lvCatalogDesign->addColumn( trUtf8( "Catalog" ) );
    lvCatalogDesign->addColumn( trUtf8( "Value" ) );
    lvCatalogDesign->addColumn( trUtf8( "id" ) );
    QListViewItem * item_2 = new QListViewItem( lvCatalogDesign, 0 );
    item_2->setOpen( TRUE );
    QListViewItem * item_3 = new QListViewItem( item_2, 0 );
    item_3->setOpen( TRUE );
    QListViewItem * item = new QListViewItem( item_3, 0 );
    item->setText( 0, trUtf8( "Name" ) );
    item->setText( 1, trUtf8( "Table0" ) );
    item_3->setText( 0, trUtf8( "Table" ) );
    item_2->setOpen( TRUE );
    item = new QListViewItem( item_2, item_3 );
    item->setText( 0, trUtf8( "Name" ) );
    item_2->setText( 0, trUtf8( "Catalog" ) );

    lvCatalogDesign->setGeometry( QRect( 30, 30, 360, 450 ) ); 

    Add_Field = new QPushButton( this, "Add_Field" );
    Add_Field->setGeometry( QRect( 410, 290, 161, 41 ) ); 
    Add_Field->setText( trUtf8( "Add Field" ) );

    Add_Tag = new QPushButton( this, "Add_Tag" );
    Add_Tag->setGeometry( QRect( 410, 350, 161, 41 ) ); 
    Add_Tag->setText( trUtf8( "Add Tag" ) );

    Add_Table = new QPushButton( this, "Add_Table" );
    Add_Table->setGeometry( QRect( 410, 230, 161, 41 ) ); 
    Add_Table->setText( trUtf8( "Add Table" ) );

    Save = new QPushButton( this, "Save" );
    Save->setGeometry( QRect( 590, 230, 111, 41 ) ); 
    Save->setText( trUtf8( "Save" ) );

    // signals and slots connections
    connect( Add_Field, SIGNAL( pressed() ), this, SLOT( AddFieldSlot() ) );
    connect( lvCatalogDesign, SIGNAL( selectionChanged() ), this, SLOT( SelectionChangedSlot() ) );
    connect( Add_Table, SIGNAL( pressed() ), this, SLOT( AddTableSlot() ) );
    connect( pb_test, SIGNAL( pressed() ), this, SLOT( TestSlot() ) );
    connect( Add_Tag, SIGNAL( pressed() ), this, SLOT( AddTagSlot() ) );
    connect( Save, SIGNAL( pressed() ), this, SLOT( SaveSlot() ) );
}
Ejemplo n.º 2
0
/* -----------------------------------------------------------------------------*/
void CloseSynth ()
{	
        DriverDataPtr data = GetData ();
        
        SaveConfig ("Configuration", "SoundFont", data->soundfont,  GetProfileFullName(kProfileName));
        SaveSlot ("Output Slots", GetProfileFullName(kProfileName),SynthDriverName);
	close_iiwusynth ();
}
Ejemplo n.º 3
0
bool form_ClientTest::qt_invoke( int _id, QUObject* _o )
{
    switch ( _id - staticMetaObject()->slotOffset() ) {
    case 0: AddFieldSlot(); break;
    case 1: AddTableSlot(); break;
    case 2: AddTagSlot(); break;
    case 3: SelectionChangedSlot(); break;
    case 4: TestSlot(); break;
    case 5: SaveSlot(); break;
    default:
	return QDialog::qt_invoke( _id, _o );
    }
    return TRUE;
}
Ejemplo n.º 4
0
/*
 * Class:     com_Revsoft_Wabbitemu_CalcInterface
 * Method:    SaveCalcState
 * Signature: (Ljava/lang/String;)V
 */
JNIEXPORT jboolean JNICALL Java_com_Revsoft_Wabbitemu_calc_CalcInterface_SaveCalcState
		(JNIEnv *env, jclass classObj, jstring filePath) {
	checkThread();
	const char *path = env->GetStringUTFChars(filePath, JNI_FALSE);

    SAVESTATE_t *save;
    try {
        save = SaveSlot(lpCalc, "Wabbitemu", "Automatic save state");
    } catch (std::exception &e) {
        _tprintf_s(_T("Exception loading save state: %s"), e.what());
        return FALSE;
    }
	if (save != NULL) {
		WriteSave(path, save, ZLIB_CMP);
		FreeSave(save);
	}

	return (jboolean) (save != NULL);
}
Ejemplo n.º 5
0
void do_backup(LPCALC lpCalc) {
	if (!lpCalc->running)
		return;
	int slot = lpCalc->slot;
	if (number_backup > MAX_BACKUPS) {
		debugger_backup* oldestBackup = backups[slot];
		while(oldestBackup->prev != NULL)
			oldestBackup = oldestBackup->prev;
		oldestBackup->next->prev = NULL;
		free_backup(oldestBackup);
	}
	debugger_backup *backup = (debugger_backup *) malloc(sizeof(debugger_backup));
	backup->save = SaveSlot(lpCalc);
	backup->next = NULL;
	backup->prev = backups[slot];
	if (backups[slot] != NULL)
		backups[slot]->next = backup;
	backups[slot] = backup;
	number_backup++;
}
Ejemplo n.º 6
0
void MainWindow::SetConnects()
{
	connect( actionNew_File, SIGNAL(triggered()), this, SLOT(NewFileSlot()) );
	connect( actionOpen_File, SIGNAL(triggered()), this, SLOT(OpenFileSlot()) );
	connect( actionRecent_Files, SIGNAL(triggered()), this, SLOT(OpenFileSlot()) );
	connect( actionSave, SIGNAL(triggered()), this, SLOT(SaveSlot()) );
	connect( actionSave_As, SIGNAL(triggered()), this, SLOT(SaveAsSlot()) );
	connect( actionExit, SIGNAL(triggered()), this, SLOT(ExitSlot()) );
	connect( actionUndo, SIGNAL(triggered()), this, SLOT(UndoSlot()) );
	connect( actionRecover, SIGNAL(triggered()), this, SLOT(RecoverSlot()) );
	connect( actionCut, SIGNAL(triggered()), this, SLOT(CutSlot()) );
	connect( actionCopy, SIGNAL(triggered()), this, SLOT(CopySlot()) );
	connect( actionPast, SIGNAL(triggered()), this, SLOT(PastSlot()) );
	connect( actionClose, SIGNAL(triggered()), this, SLOT(CloseSlot()) );
	connect( actionClose_All_Windows, SIGNAL(triggered()), this, SLOT(CloseAllWindowSlot()) );
	//connect( actionTile, SIGNAL(triggered()), this, SLOT(TileWidowsSlot()) );
	//connect( actionStack, SIGNAL(triggered()), this, SLOT(StackUpWindowsSlot()) );
	connect( actionNext_Window, SIGNAL(triggered()), this, SLOT(NextWindowSlot()) );
	connect( actionPrevious_Window, SIGNAL(triggered()), this, SLOT(PreviousWindowsSlot()) );
	connect( actionAbout, SIGNAL(triggered()), this, SLOT(AboutSlot()) );
	connect( actionAbout_Qt, SIGNAL(triggered()), this, SLOT(AboutQtSlot()) );
	
}