Пример #1
0
/*! 
  Deletes a listbox
  \return  None
  \author  jfpatry
  \date    Created:  2000-09-17
  \date    Modified: 2000-09-17
*/
void listbox_delete( listbox_t *listbox )
{
    check_assertion( listbox != NULL, "listbox is NULL" );

    listbox_set_visible( listbox, False );
    listbox_set_active( listbox, False );

    button_delete( listbox->up_button );
    button_delete( listbox->down_button );

    free(listbox);
}
Пример #2
0
static void preference_term(void)
{
    button_delete( chancel_btn );
    chancel_btn = NULL;
    
    button_delete( save_btn );
    save_btn = NULL;

    listbox_delete( sound_listbox );
    sound_listbox = NULL;

    listbox_delete( video_listbox );
    video_listbox = NULL;
}
Пример #3
0
/*! 
 Mode termination function
 \author  jfpatry
 \date    Created:  2000-09-24
 \date    Modified: 2000-09-24
 */
static void race_select_term(void)
{
    if ( back_btn ) {
        button_delete( back_btn );
    }
    back_btn = NULL;
    
    if ( start_btn ) {
        button_delete( start_btn );
    }
    start_btn = NULL;
	
	if ( fb_btn ) {
        button_delete( fb_btn );
    }
    fb_btn = NULL;
    
    if ( race_listbox ) {
        listbox_delete( race_listbox );
    }
    race_listbox = NULL;
    
    if ( conditions_ssbtn ) {
        ssbutton_delete( conditions_ssbtn );
    }
    conditions_ssbtn = NULL;
    
    if ( snow_ssbtn ) {
        ssbutton_delete( snow_ssbtn );
    }
    snow_ssbtn = NULL;
    
    if ( wind_ssbtn ) {
        ssbutton_delete( wind_ssbtn );
    }
    wind_ssbtn = NULL;
    
    if ( mirror_ssbtn ) {
        ssbutton_delete( mirror_ssbtn );
    }
    mirror_ssbtn = NULL;
    
    textarea_delete( desc_ta );
    desc_ta = NULL;
}
Пример #4
0
static void game_type_select_term(void)
{
    button_delete( enter_event_btn );
    enter_event_btn = NULL;

    button_delete( practice_btn );
    practice_btn = NULL;

    button_delete( credits_btn );
    credits_btn = NULL;

    button_delete( preference_btn );
    preference_btn = NULL;

    button_delete( help_btn );
    help_btn = NULL;

    button_delete( quit_btn );
    quit_btn = NULL;

    /*
    button_delete( pref_btn );
    pref_btn = NULL;
    
    button_delete( rankings_btn );
    rankings_btn = NULL;
    */
}
/**
 * The factory method that builds a GUI using the given factory.
 *
 * @param gui_factory_h The factory to use for building the GUI.
 */
static void
generate_gui (gui_factory_handle gui_factory_h)
{
    button_handle button1 = NULL, button2 = NULL, button3 = NULL;

    if (NULL == gui_factory_h) {
        return;
    }

    /* 
     * The will create some buttons, call their paint functions, and then delete
     * them.  Use your imagination for much more complicated GUIs being built in
     * real life.
     */
    button1 = gui_factory_create_button(gui_factory_h);
    if (NULL == button1) {
        goto err_exit;
    }

    button2 = gui_factory_create_button(gui_factory_h);
    if (NULL == button2) {
        goto err_exit;
    }

    button3 = gui_factory_create_button(gui_factory_h);
    if (NULL == button3) {
        goto err_exit;
    }

    button_paint(button1);
    button_paint(button2);
    button_paint(button3);

    button_delete(button1);
    button_delete(button2);
    button_delete(button3);

    return;

err_exit:

    if (NULL != button1) {
        button_delete(button1);
    }

    if (NULL != button2) {
        button_delete(button2);
    }

    if (NULL != button3) {
        button_delete(button3);
    }
}
Пример #6
0
map::map(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::map),m_view(new SvgView)
{


    ui->setupUi(this);


    QFile file("piu.s3db") ;
    QSqlDatabase db;
    if (file.exists())
    {
        db = QSqlDatabase::addDatabase("QSQLITE");
        db.setDatabaseName("piu.s3db");
        db.open();
        QSqlQuery query;
        query.exec("CREATE TABLE map ("
                   "ID INTEGER  NOT NULL PRIMARY KEY AUTOINCREMENT,"
                   "Name NAME  NULL,"
                   "Street STREET  NULL)");

    }
    else
    {
        db = QSqlDatabase::addDatabase("QSQLITE");
        db.setDatabaseName("piu.s3db");
        db.open();
    }



    model = new QSqlTableModel(this);
    model->setTable("map");
    model->select();
    model->setFilter("");
    ui->tableView->setModel(model);

    setWindowTitle(tr("Minsk Map v1.15a"));
     resize(1000, 650);

    // int frameStyle = QFrame::Sunken | QFrame::Panel;


       ui->verticalLayout->addWidget(m_view);



    connect(ui->actionOpen,SIGNAL(triggered()),this,SLOT(openFile()));

    connect(ui->actionExit,SIGNAL(triggered()),this,SLOT(close()));

    connect(ui->actionAbout_QT,SIGNAL(triggered()),this,SLOT(about()));

    connect(ui->actionAbout,SIGNAL(triggered()),this,SLOT(aboutpiu()));

connect(ui->actionOpen_2,SIGNAL(triggered()),this,SLOT(openbd()));

connect(ui->pushButton_2,SIGNAL(clicked()),this,SLOT(button_clicked()));

connect(ui->pushButton,SIGNAL(clicked()),this,SLOT(button_delete()));

connect(ui->pushButton_2,SIGNAL(clicked()),this,SLOT(otrisovka()));

}