Пример #1
0
void GraphicsReportView::refresh_dirs_graphs()
{
    if(slidingDownBts)
        slidingDownBts->deleteLater();

    slidingDownBts = new GraphicSlidingDownBts(this);
    slidingDownBts->setPos(110+5,0);
    slidingDownBts->setBtsRect(QRectF(0,0,110+5+110,54));

    QString dirName;
    load_avDirectories_directories();
    for(int i=0;i<avDirectories.count();i++)
    {

        dirName = FSC_RUNS_FOLDERS_ROOT;

        if(avDirectories[i].length() == 16) // old format
        {
            dirName.append(avDirectories[i]);
            slidingDownBts->addBt(name_from_old_format(avDirectories[i]), dirName);
        } else {
            dirName.append(avDirectories[i]);
            slidingDownBts->addBt(name_from_new_format(avDirectories[i]), dirName);
        }
    }
    slidingDownBts->construction_finished();
    connect(slidingDownBts, SIGNAL(bt_selected(QString)), this, SLOT(file_selected(QString)));
}
void GraphicsReportView::refresh_dirs_graphs()
{
    if(slidingDownBts)
        slidingDownBts->deleteLater();

    slidingDownBts = new GraphicSlidingDownBts(this);
    slidingDownBts->setPos(110+5,0);
    slidingDownBts->setBtsRect(QRectF(0,0,110+5+110,54));

    QString dirName;
    load_avDirectories_directories();
    for(int i=0; i<avDirectories.count(); i++)
    {

#ifdef Q_WS_MAEMO_5
        qDebug() << "In Maemo home = " << QDir::homePath();
        dirName = QDir::homePath() + QString("/PushSnowboarding/");
#else
        dirName = FSC_RUNS_FOLDERS_ROOT;
#endif

        if(avDirectories[i].length() == 16) // old format
        {
            dirName.append(avDirectories[i]);
            slidingDownBts->addBt(name_from_old_format(avDirectories[i]), dirName);
        } else {
            dirName.append(avDirectories[i]);
            slidingDownBts->addBt(name_from_new_format(avDirectories[i]), dirName);
        }
    }
    slidingDownBts->construction_finished();
    connect(slidingDownBts, SIGNAL(bt_selected(QString)), this, SLOT(file_selected(QString)));
}