Exemple #1
0
void BaseDialog::sortOnColumn( int col ) {
  if(m_ItemList == NULL)
    return;

  TraceOp.trc( "basedlg", TRCLEVEL_INFO, __LINE__, 9999,"sort on column %d", col);
  if( col != -1 ) {
    m_SortCol = col;
    fillIndex(m_Items, true);
    if( m_SelectedID != NULL )
      setIDSelection(m_SelectedID);
  }
  if( m_SortCol != m_colID ) m_sortID = true;
  if( m_SortCol != m_colIID ) m_sortIID = true;
  if( m_SortCol != m_colDesc ) m_sortDesc = true;
  if( m_SortCol != m_colPos ) m_sortPos = true;
  if( m_SortCol != m_colShow ) m_sortShow = true;
  if( m_SortCol != m_colAddr ) m_sortAddr = true;
  if( m_SortCol != m_colOri ) m_sortOri = true;
  if( m_SortCol != m_colLen ) m_sortLen = true;
  if( m_SortCol != m_colType ) m_sortType = true;
  if( m_SortCol != m_colRTime ) m_sortRTime = true;
  if( m_SortCol != m_colMTime ) m_sortMTime = true;
  if( m_SortCol != m_colMDate ) m_sortMDate = true;

}
Exemple #2
0
bool TextDialog::initIndex() {
  TraceOp.trc( "textdlg", TRCLEVEL_INFO, __LINE__, 9999, "InitIndex" );
  iONode model = wxGetApp().getModel();
  if( model != NULL ) {
    iONode txlist = wPlan.gettxlist( model );
    if( txlist != NULL ) {
      fillIndex(txlist);

      if( m_Props != NULL ) {
        setIDSelection(wItem.getid( m_Props ));
        return true;
      }
      else {
        m_Props = setSelection(0);
      }
    }
  }
  return false;
}
Exemple #3
0
void TextDialog::OnNewtextClick( wxCommandEvent& event )
{
  int i = findID("NEW");
  if( i == wxNOT_FOUND ) {
    iONode model = wxGetApp().getModel();
    if( model != NULL ) {
      iONode txlist = wPlan.gettxlist( model );
      if( txlist == NULL ) {
        txlist = NodeOp.inst( wTextList.name(), model, ELEMENT_NODE );
        NodeOp.addChild( model, txlist );
      }
      if( txlist != NULL ) {
        iONode tx = NodeOp.inst( wText.name(), txlist, ELEMENT_NODE );
        NodeOp.addChild( txlist, tx );
        wText.setid( tx, "NEW" );
        appendItem(tx);
        setIDSelection(wItem.getid(tx));
        m_Props = tx;
        initValues();
      }
    }
  }
}
Exemple #4
0
void AccDecDlg::onAdd( wxCommandEvent& event )
{
    TraceOp.trc( "accdecdlg", TRCLEVEL_INFO, __LINE__, 9999, "Add" );
    int i = findID("NEW");
    if( i == wxNOT_FOUND ) {
        iONode model = wxGetApp().getModel();
        if( model != NULL ) {
            iONode declist = wPlan.getdeclist( model );
            if( declist == NULL ) {
                declist = NodeOp.inst( wDecList.name(), model, ELEMENT_NODE );
                NodeOp.addChild( model, declist );
            }
            if( declist != NULL ) {
                iONode dec = NodeOp.inst( wDec.name(), declist, ELEMENT_NODE );
                NodeOp.addChild( declist, dec );
                wDec.setid( dec, "NEW" );
                m_Props = dec;
                appendItem(dec);
                setIDSelection(wItem.getid(dec));
                initValues();
            }
        }
    }
}
Exemple #5
0
bool AccDecDlg::initIndex() {
    TraceOp.trc( "accdecdlg", TRCLEVEL_INFO, __LINE__, 9999, "initIndex" );
    iONode model = wxGetApp().getModel();
    if( model != NULL ) {
        iONode declist = wPlan.getdeclist( model );
        if( declist == NULL ) {
            declist = NodeOp.inst(wDecList.name(), model, ELEMENT_NODE);
            NodeOp.addChild(model, declist);
        }
        if( declist != NULL ) {
            fillIndex(declist);

            if( m_Props != NULL ) {
                setIDSelection(wDec.getid( m_Props ));
                return true;
            }
            else {
                m_Props = setSelection(0);
            }

        }
    }
    return false;
}