void BELGE_KERNEL::INIT_REPORT ()
{
    m_header_struct      = GET_BELGE_HEADER_STRUCT();
    m_header_struct_size = GET_BELGE_HEADER_STRUCT_SIZE();
    m_footer_struct      = GET_BELGE_FOOTER_STRUCT();
    m_footer_struct_size = GET_BELGE_FOOTER_STRUCT_SIZE();
    m_line_struct        = GET_BELGE_LINE_STRUCT();
    m_line_struct_size   = GET_BELGE_LINE_STRUCT_SIZE();

    GET_KAYITLI_DEGISKENLER( &m_all_variables );

    m_row_count          = GET_BELGE_PRINT_ROW_COUNT();
    m_belge_satir_count  = GET_BELGE_ROW_COUNT();

    for (int i = 0; i < m_row_count; ++i) {
        QString *line_str = new QString();
        m_line_print_txt.append(line_str);
    }
    m_print_txt.setInsertInOrder(true);
}
示例#2
0
void GET_SAVED_VARIABLE_INFO ( int tasarim_id )
{
    //! DB KAYITLI DEGISKENLERI AYRI AYRI OLARAK

    SQL_QUERY query(G_YONETIM_DB);

    int header_struct_size = GET_BELGE_HEADER_STRUCT_SIZE();
    ADAK_BELGE_DEFAULTS_STRUCT * header_orj = GET_BELGE_HEADER_STRUCT();

    int footer_struct_size = GET_BELGE_FOOTER_STRUCT_SIZE();
    ADAK_BELGE_DEFAULTS_STRUCT * footer_orj = GET_BELGE_FOOTER_STRUCT();

    int line_struct_size   = GET_BELGE_LINE_STRUCT_SIZE();
    ADAK_BELGE_DEFAULTS_STRUCT * line_orj   = GET_BELGE_LINE_STRUCT();


    query.PREPARE_SELECT("ynt_belge_degiskenleri",
                         "belge_degisken_id, degisken_id, font_size, align, pos_x, pos_y, is_visible_variable, "
                         "grup_enum, monospace_mi, text_size","tasarim_id =:tasarim_id AND degisken_id != -1 ","");

    query.SET_VALUE(":tasarim_id",tasarim_id);

    if ( query.SELECT() EQ 0 ) {
        for ( int i = 0 ; i < header_struct_size ; i++ )  {
            header_orj[i].is_visible_variable   = 0;
            header_orj[i].x_position            = 0;
            header_orj[i].y_position            = 0;
        }
        for ( int i = 0 ; i < footer_struct_size ; i++ )  {
            footer_orj[i].is_visible_variable   = 0;
            footer_orj[i].x_position            = 0;
            footer_orj[i].y_position            = 0;
        }
        for ( int i = 0 ; i < line_struct_size ; i++ )  {
            line_orj[i].is_visible_variable     = 0;
            line_orj[i].x_position              = 0;
            line_orj[i].y_position              = 0;
        }
        return;
    }
    while( query.NEXT() EQ true ) {
        switch(query.VALUE(7).toInt()){
            case HEADER:
                for ( int i = 0 ; i < header_struct_size ; i++ )  {
                    if (header_orj[i].degisken_id EQ query.VALUE(1).toInt()) {
                        header_orj[i].align                 = query.VALUE(3).toInt();
                        header_orj[i].font_size             = query.VALUE(2).toInt();
                        header_orj[i].is_visible_variable   = query.VALUE(6).toInt();
                        header_orj[i].x_position            = query.VALUE(4).toDouble();
                        header_orj[i].y_position            = query.VALUE(5).toDouble();
                        header_orj[i].monospace_mi          = query.VALUE(8).toDouble();
                        header_orj[i].karakter_sayisi       = query.VALUE(9).toDouble();
                        break;
                    }
                }
                break;
            case FOOTER:
                for ( int i = 0 ; i < footer_struct_size ; i++ )  {
                    if (footer_orj[i].degisken_id EQ query.VALUE(1).toInt()) {
                        footer_orj[i].align                 = query.VALUE(3).toInt();
                        footer_orj[i].font_size             = query.VALUE(2).toInt();
                        footer_orj[i].is_visible_variable   = query.VALUE(6).toInt();
                        footer_orj[i].x_position            = query.VALUE(4).toDouble();
                        footer_orj[i].y_position            = query.VALUE(5).toDouble();
                        footer_orj[i].monospace_mi          = query.VALUE(8).toDouble();
                        footer_orj[i].karakter_sayisi       = query.VALUE(9).toDouble();
                        break;
                    }
                }
                break;
            case LINE:
                for ( int i = 0 ; i < line_struct_size ; i++ )  {
                    if (line_orj[i].degisken_id EQ query.VALUE(1).toInt()) {
                        line_orj[i].align                 = query.VALUE(3).toInt();
                        line_orj[i].font_size             = query.VALUE(2).toInt();
                        line_orj[i].is_visible_variable   = query.VALUE(6).toInt();
                        line_orj[i].x_position            = query.VALUE(4).toDouble();
                        line_orj[i].y_position            = query.VALUE(5).toDouble();
                        line_orj[i].monospace_mi          = query.VALUE(8).toDouble();
                        line_orj[i].karakter_sayisi       = query.VALUE(9).toDouble();
                        break;
                    }
                }
                break;
            default:
                break;
        }
    }
}