ICS

QicsTable Documentation Set

main.cpp

/****************************************************************************
** $RCSfile: cdm_main_cpp.html,v $ $Date: 2008/06/23 16:31:51 $
**
** Copyright ( C ) 2002-2006 Integrated Computer Solutions, Inc.
** All rights reserved.
**
** This file is part of an example program for QicsTable.  This example
** program may be used, distributed and modified without limitation.
**
*****************************************************************************/

#include <QApplication>

#include <QicsTable.h>
#include "custom_data_model.h"

int main(int argc, char *argv[])
{
    QApplication app(argc,argv);

    // create the data model
    StockDataModel *dm = new StockDataModel();

    // fill the data model with some values
    dm->insertStock(-1);
    dm->setSymbol(0, "ATT");
    dm->setClose(0, (float) 37.73);
    dm->setHigh(0, (float) 38.0);
    dm->setLow(0, (float) 37.55);
    dm->setVolume(0, 503333);

    dm->insertStock(-1);
    dm->setSymbol(1, "RJR");
    dm->setClose(1, (float) 67.05);
    dm->setHigh(1, (float) 67.05);
    dm->setLow(1, (float) 64.89);
    dm->setVolume(1, 997323);

    // create the table, using the data model we created above
    QicsTable *table = new QicsTable(dm, 0);

    app.setActiveWindow(table);
    table->show();

    return app.exec();
}

All trademarks and copyrights on this page are properties of their respective owners.
The rest is copyright 1999-2006 Integrated Computer Solutions, Inc.