Ejemplo n.º 1
0
/**
 * Get an absolute time stamp for the given index.
 *
 * A time stamp is a 64 bit signed integer counting nanoseconds.  This
 * is based on the type used in ASIO.
 *
 * This call is recursive; it calls itself on the first input until a
 * source returns a time for index 0.  It then calls TimeOffset() to
 * get a time for the given frame and adds them.
 */
Tracter::TimeType Tracter::ComponentBase::TimeStamp(IndexType iIndex) const
{
    assert(iIndex >= 0);
    if (mInput.size() == 0)
        throw Exception("TimeStamp: No inputs."
                        "  %s probably missing TimeStamp()", mObjectName);
    TimeType time = mInput[0]->TimeStamp();
    if (iIndex)
        time += TimeOffset(iIndex);
    Verbose(2, "TimeStamp: index %lld time %lld\n", iIndex, time);
    return time;
}
Ejemplo n.º 2
0
BackendSettings::BackendSettings() {
    VerticalConfigurationGroup* server = new VerticalConfigurationGroup(false);
    server->setLabel(QObject::tr("Host Address Backend Setup"));
    VerticalConfigurationGroup* localServer = new VerticalConfigurationGroup();
    localServer->setLabel(QObject::tr("Local Backend") + " (" +
                          gCoreContext->GetHostName() + ")");
    HorizontalConfigurationGroup* localIP =
              new HorizontalConfigurationGroup(false, false, true, true);
    localIP->addChild(LocalServerIP());
    localServer->addChild(localIP);
    HorizontalConfigurationGroup* localPorts =
              new HorizontalConfigurationGroup(false, false, true, true);
    localPorts->addChild(LocalServerPort());
    localPorts->addChild(LocalStatusPort());
    localServer->addChild(localPorts);
    HorizontalConfigurationGroup* localPin =
              new HorizontalConfigurationGroup(false, false, true, true);
    localPin->addChild(LocalSecurityPin());
    localServer->addChild(localPin);
    VerticalConfigurationGroup* masterServer = new VerticalConfigurationGroup();
    masterServer->setLabel(QObject::tr("Master Backend"));
    HorizontalConfigurationGroup* master =
              new HorizontalConfigurationGroup(false, false, true, true);
    master->addChild(MasterServerIP());
    master->addChild(MasterServerPort());
    masterServer->addChild(master);
    server->addChild(localServer);
    server->addChild(masterServer);
    addChild(server);

    VerticalConfigurationGroup* locale = new VerticalConfigurationGroup(false);
    locale->setLabel(QObject::tr("Locale Settings"));
    locale->addChild(TVFormat());
    locale->addChild(VbiFormat());
    locale->addChild(FreqTable());
    locale->addChild(TimeOffset());
    addChild(locale);

    VerticalConfigurationGroup* group2 = new VerticalConfigurationGroup(false);
    group2->setLabel(QObject::tr("Miscellaneous Settings"));
    VerticalConfigurationGroup* fm = new VerticalConfigurationGroup();
    fm->setLabel(QObject::tr("File Management Settings"));
    fm->addChild(MasterBackendOverride());
    HorizontalConfigurationGroup *fmh1 =
        new HorizontalConfigurationGroup(false, false, true, true);
    fmh1->addChild(DeletesFollowLinks());
    fmh1->addChild(TruncateDeletes());
    fm->addChild(fmh1);
    fm->addChild(HDRingbufferSize());
    fm->addChild(StorageScheduler());
    group2->addChild(fm);
    group2->addChild(MiscStatusScript());
    group2->addChild(DisableAutomaticBackup());
    group2->addChild(DisableFirewireReset());
    addChild(group2);

    VerticalConfigurationGroup* group2a1 = new VerticalConfigurationGroup(false);
    group2a1->setLabel(QObject::tr("EIT Scanner Options"));
    //group2a1->addChild(EITTimeOffset());
    group2a1->addChild(EITTransportTimeout());
    group2a1->addChild(EITCrawIdleStart());
    addChild(group2a1);

    VerticalConfigurationGroup* group3 = new VerticalConfigurationGroup(false);
    group3->setLabel(QObject::tr("Shutdown/Wakeup Options"));
    group3->addChild(startupCommand());
    group3->addChild(blockSDWUwithoutClient());
    group3->addChild(idleTimeoutSecs());
    group3->addChild(idleWaitForRecordingTime());
    group3->addChild(StartupSecsBeforeRecording());
    group3->addChild(WakeupTimeFormat());
    group3->addChild(SetWakeuptimeCommand());
    group3->addChild(ServerHaltCommand());
    group3->addChild(preSDWUCheckCommand());
    addChild(group3);

    VerticalConfigurationGroup* group4 = new VerticalConfigurationGroup(false);
    group4->setLabel(QObject::tr("Backend Wakeup settings"));

    VerticalConfigurationGroup* backend = new VerticalConfigurationGroup();
    backend->setLabel(QObject::tr("Master Backend"));
    backend->addChild(WOLbackendReconnectWaitTime());
    backend->addChild(WOLbackendConnectRetry());
    backend->addChild(WOLbackendCommand());
    group4->addChild(backend);

    VerticalConfigurationGroup* slaveBackend = new VerticalConfigurationGroup();
    slaveBackend->setLabel(QObject::tr("Slave Backends"));
    slaveBackend->addChild(SleepCommand());
    slaveBackend->addChild(WakeUpCommand());
    group4->addChild(slaveBackend);
    addChild(group4);

    VerticalConfigurationGroup* backendControl = new VerticalConfigurationGroup();
    backendControl->setLabel(QObject::tr("Backend Control"));
    backendControl->addChild(BackendStopCommand());
    backendControl->addChild(BackendStartCommand());
    addChild(backendControl);

    VerticalConfigurationGroup* group5 = new VerticalConfigurationGroup(false);
    group5->setLabel(QObject::tr("Job Queue (Backend-Specific)"));
    group5->addChild(JobQueueMaxSimultaneousJobs());
    group5->addChild(JobQueueCheckFrequency());

    HorizontalConfigurationGroup* group5a =
              new HorizontalConfigurationGroup(false, false);
    VerticalConfigurationGroup* group5a1 =
              new VerticalConfigurationGroup(false, false);
    group5a1->addChild(JobQueueWindowStart());
    group5a1->addChild(JobQueueWindowEnd());
    group5a1->addChild(JobQueueCPU());
    group5a1->addChild(JobAllowMetadata());
    group5a1->addChild(JobAllowCommFlag());
    group5a1->addChild(JobAllowTranscode());
    group5a->addChild(group5a1);

    VerticalConfigurationGroup* group5a2 =
            new VerticalConfigurationGroup(false, false);
    group5a2->addChild(JobAllowUserJob(1));
    group5a2->addChild(JobAllowUserJob(2));
    group5a2->addChild(JobAllowUserJob(3));
    group5a2->addChild(JobAllowUserJob(4));
    group5a->addChild(group5a2);
    group5->addChild(group5a);
    addChild(group5);

    VerticalConfigurationGroup* group6 = new VerticalConfigurationGroup(false);
    group6->setLabel(QObject::tr("Job Queue (Global)"));
    group6->addChild(JobsRunOnRecordHost());
    group6->addChild(AutoCommflagWhileRecording());
    group6->addChild(JobQueueCommFlagCommand());
    group6->addChild(JobQueueTranscodeCommand());
    group6->addChild(AutoTranscodeBeforeAutoCommflag());
    group6->addChild(SaveTranscoding());
    addChild(group6);

    VerticalConfigurationGroup* group7 = new VerticalConfigurationGroup(false);
    group7->setLabel(QObject::tr("Job Queue (Job Commands)"));
    group7->addChild(UserJobDesc(1));
    group7->addChild(UserJob(1));
    group7->addChild(UserJobDesc(2));
    group7->addChild(UserJob(2));
    group7->addChild(UserJobDesc(3));
    group7->addChild(UserJob(3));
    group7->addChild(UserJobDesc(4));
    group7->addChild(UserJob(4));
    addChild(group7);

    VerticalConfigurationGroup* group8 = new VerticalConfigurationGroup(false);
    group8->setLabel(QObject::tr("UPnP Server Settings"));
    //group8->addChild(UPNPShowRecordingUnderVideos());
    group8->addChild(UPNPWmpSource());
    group8->addChild(UPNPRebuildDelay());
    addChild(group8);

    MythFillSettings *mythfill = new MythFillSettings();
    addChild(mythfill);

}
Ejemplo n.º 3
0
LineEditor::LineEditor(Line& line, wxWindow* parent, wxImageList* imageList, wxWindowID id)
    :_line(line), _imageList(imageList)
{
	//(*Initialize(LineEditor)
	wxBoxSizer* BoxSizer4;
	wxStaticBoxSizer* StaticBoxSizer2;
	wxBoxSizer* BoxSizer6;
	wxBoxSizer* BoxSizer5;
	wxBoxSizer* BoxSizer7;
	wxBoxSizer* BoxSizer8;
	wxBoxSizer* BoxSizer2;
	wxBoxSizer* BoxSizer1;
	wxBoxSizer* BoxSizer9;
	wxStaticBoxSizer* StaticBoxSizer1;
	wxBoxSizer* BoxSizer3;

	Create(parent, id, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER, _T("id"));
	BoxSizer1 = new wxBoxSizer(wxHORIZONTAL);
	Panel1 = new wxPanel(this, ID_PANEL1, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL, _T("ID_PANEL1"));
	BoxSizer2 = new wxBoxSizer(wxVERTICAL);
	Panel2 = new wxPanel(Panel1, ID_PANEL2, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL, _T("ID_PANEL2"));
	BoxSizer4 = new wxBoxSizer(wxHORIZONTAL);
	chIcon = new wxChoice(Panel2, ID_CHOICE1, wxDefaultPosition, wxDefaultSize, 0, 0, 0, wxDefaultValidator, _T("ID_CHOICE1"));
	chIcon->SetSelection( chIcon->Append(_("no icon")) );
	chIcon->Append(_("bus"));
	chIcon->Append(_("trolley"));
	chIcon->Append(_("tram"));
	chIcon->Append(_("metro"));
	chIcon->Append(_("waterbus"));
	chIcon->Append(_("monorail"));
	BoxSizer4->Add(chIcon, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
	Panel5 = new wxPanel(Panel2, ID_PANEL5, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL, _T("ID_PANEL5"));
	BoxSizer5 = new wxBoxSizer(wxHORIZONTAL);
	StaticText1 = new wxStaticText(Panel5, ID_STATICTEXT1, _("#"), wxDefaultPosition, wxDefaultSize, 0, _T("ID_STATICTEXT1"));
	BoxSizer5->Add(StaticText1, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
	txtNumber = new wxTextCtrl(Panel5, ID_TEXTCTRL1, _("1000"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T("ID_TEXTCTRL1"));
	BoxSizer5->Add(txtNumber, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
	StaticText2 = new wxStaticText(Panel5, ID_STATICTEXT2, _("Name"), wxDefaultPosition, wxDefaultSize, wxALIGN_RIGHT, _T("ID_STATICTEXT2"));
	BoxSizer5->Add(StaticText2, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
	txtName = new wxTextCtrl(Panel5, ID_TEXTCTRL2, _("Text"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T("ID_TEXTCTRL2"));
	BoxSizer5->Add(txtName, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
	Panel5->SetSizer(BoxSizer5);
	BoxSizer5->Fit(Panel5);
	BoxSizer5->SetSizeHints(Panel5);
	BoxSizer4->Add(Panel5, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
	Panel2->SetSizer(BoxSizer4);
	BoxSizer4->Fit(Panel2);
	BoxSizer4->SetSizeHints(Panel2);
	BoxSizer2->Add(Panel2, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
	panMiddle = new wxPanel(Panel1, ID_PANEL3, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL, _T("ID_PANEL3"));
	BoxSizer6 = new wxBoxSizer(wxHORIZONTAL);
	panTimetable = new TimeTablePanel(_line.getTimetable(),panMiddle,ID_CUSTOM1,wxDefaultPosition,wxDefaultSize);
	BoxSizer6->Add(panTimetable, 1, wxALL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
	Panel7 = new wxPanel(panMiddle, ID_PANEL7, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL, _T("ID_PANEL7"));
	BoxSizer7 = new wxBoxSizer(wxHORIZONTAL);
	Panel8 = new wxPanel(Panel7, ID_PANEL8, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL, _T("ID_PANEL8"));
	StaticBoxSizer2 = new wxStaticBoxSizer(wxVERTICAL, Panel8, _("Stops"));
	lvStops = new wxListView(Panel8, ID_LISTVIEW1, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxLC_EDIT_LABELS, wxDefaultValidator, _T("ID_LISTVIEW1"));
	StaticBoxSizer2->Add(lvStops, 1, wxALL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
	Panel10 = new wxPanel(Panel8, ID_PANEL10, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL, _T("ID_PANEL10"));
	BoxSizer8 = new wxBoxSizer(wxHORIZONTAL);
	btEditStop = new wxButton(Panel10, ID_BUTTON7, _("edit"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T("ID_BUTTON7"));
	BoxSizer8->Add(btEditStop, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
	btRemoveStop = new wxButton(Panel10, ID_BUTTON6, _("-->"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T("ID_BUTTON6"));
	BoxSizer8->Add(btRemoveStop, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
	Panel10->SetSizer(BoxSizer8);
	BoxSizer8->Fit(Panel10);
	BoxSizer8->SetSizeHints(Panel10);
	StaticBoxSizer2->Add(Panel10, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
	Panel8->SetSizer(StaticBoxSizer2);
	StaticBoxSizer2->Fit(Panel8);
	StaticBoxSizer2->SetSizeHints(Panel8);
	BoxSizer7->Add(Panel8, 1, wxALL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
	Panel9 = new wxPanel(Panel7, ID_PANEL9, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL, _T("ID_PANEL9"));
	StaticBoxSizer1 = new wxStaticBoxSizer(wxVERTICAL, Panel9, _("Stations"));
	lvStations = new wxListView(Panel9, ID_LISTVIEW2, wxDefaultPosition, wxDefaultSize, wxLC_LIST, wxDefaultValidator, _T("ID_LISTVIEW2"));
	StaticBoxSizer1->Add(lvStations, 1, wxALL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
	Panel11 = new wxPanel(Panel9, ID_PANEL11, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL, _T("ID_PANEL11"));
	BoxSizer9 = new wxBoxSizer(wxHORIZONTAL);
	btStopAtStation = new wxButton(Panel11, ID_BUTTON5, _("<--"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T("ID_BUTTON5"));
	BoxSizer9->Add(btStopAtStation, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
	btAddStation = new wxButton(Panel11, ID_BUTTON3, _("add"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T("ID_BUTTON3"));
	BoxSizer9->Add(btAddStation, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
	btEditStation = new wxButton(Panel11, ID_BUTTON4, _("edit"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T("ID_BUTTON4"));
	BoxSizer9->Add(btEditStation, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
	Panel11->SetSizer(BoxSizer9);
	BoxSizer9->Fit(Panel11);
	BoxSizer9->SetSizeHints(Panel11);
	StaticBoxSizer1->Add(Panel11, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
	Panel9->SetSizer(StaticBoxSizer1);
	StaticBoxSizer1->Fit(Panel9);
	StaticBoxSizer1->SetSizeHints(Panel9);
	BoxSizer7->Add(Panel9, 1, wxALL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
	Panel7->SetSizer(BoxSizer7);
	BoxSizer7->Fit(Panel7);
	BoxSizer7->SetSizeHints(Panel7);
	BoxSizer6->Add(Panel7, 0, wxALL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
	panMiddle->SetSizer(BoxSizer6);
	BoxSizer6->Fit(panMiddle);
	BoxSizer6->SetSizeHints(panMiddle);
	BoxSizer2->Add(panMiddle, 1, wxALL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
	Panel4 = new wxPanel(Panel1, ID_PANEL4, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL, _T("ID_PANEL4"));
	BoxSizer3 = new wxBoxSizer(wxHORIZONTAL);
	btOK = new wxButton(Panel4, ID_BUTTON1, _("OK"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T("ID_BUTTON1"));
	BoxSizer3->Add(btOK, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
	btCancel = new wxButton(Panel4, ID_BUTTON2, _("cancel"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T("ID_BUTTON2"));
	BoxSizer3->Add(btCancel, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
	Panel4->SetSizer(BoxSizer3);
	BoxSizer3->Fit(Panel4);
	BoxSizer3->SetSizeHints(Panel4);
	BoxSizer2->Add(Panel4, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
	Panel1->SetSizer(BoxSizer2);
	BoxSizer2->Fit(Panel1);
	BoxSizer2->SetSizeHints(Panel1);
	BoxSizer1->Add(Panel1, 1, wxALL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
	SetSizer(BoxSizer1);
	BoxSizer1->Fit(this);
	BoxSizer1->SetSizeHints(this);
	Center();

	Connect(ID_LISTVIEW1,wxEVT_COMMAND_LIST_BEGIN_LABEL_EDIT,(wxObjectEventFunction)&LineEditor::OnlvStopsBeginLabelEdit);
	Connect(ID_LISTVIEW1,wxEVT_COMMAND_LIST_END_LABEL_EDIT,(wxObjectEventFunction)&LineEditor::OnlvStopsEndLabelEdit);
	Connect(ID_LISTVIEW1,wxEVT_COMMAND_LIST_ITEM_SELECTED,(wxObjectEventFunction)&LineEditor::OnlvStopsItemSelect);
	Connect(ID_BUTTON7,wxEVT_COMMAND_BUTTON_CLICKED,(wxObjectEventFunction)&LineEditor::OnbtEditStopClick);
	Connect(ID_BUTTON6,wxEVT_COMMAND_BUTTON_CLICKED,(wxObjectEventFunction)&LineEditor::OnbtRemoveStopClick);
	Connect(ID_BUTTON5,wxEVT_COMMAND_BUTTON_CLICKED,(wxObjectEventFunction)&LineEditor::OnbtStopAtStationClick);
	Connect(ID_BUTTON3,wxEVT_COMMAND_BUTTON_CLICKED,(wxObjectEventFunction)&LineEditor::OnbtAddStationClick);
	Connect(ID_BUTTON1,wxEVT_COMMAND_BUTTON_CLICKED,(wxObjectEventFunction)&LineEditor::OnbtOKClick);
	Connect(ID_BUTTON2,wxEVT_COMMAND_BUTTON_CLICKED,(wxObjectEventFunction)&LineEditor::OnbtCancelClick);
	//*)

    /*
    if(_imageList)
    {
        //bcbIconSelect
        for(int i = -1; i < _imageList->GetImageCount();++i)
        {
            bcbIconSelect->Append(iconLabels[i+1], _imageList->GetBitmap(i));
        }
        this->bcbIconSelect->SetSelection(_line.getIcon()+1);

    }
    */

    chIcon->SetSelection(_line.getIcon()+1);

	wxListItem colStation;
	wxListItem colTime;

	colStation.SetText("Station");
	colStation.SetId(1);

	colTime.SetText("Time");
	colTime.SetId(0);

	lvStops->InsertColumn(1,colStation);
	lvStops->InsertColumn(0,colTime);

    std::stringstream ss;
    ss << _line.getNumber();
	txtNumber->SetValue(ss.str());
	txtName->SetValue(_line.getName());


	const StationList& stations = Stations::instance()->getStationsList();

	for(StationList::const_iterator i = stations.begin(); i != stations.end(); ++i )
    {
        long itemIndex = lvStations->InsertItem(lvStations->GetItemCount(), (*i).getName());
        lvStations->SetItemData(itemIndex,(*i).getID());
    }



    long itemIndex = lvStops->InsertItem(0, "+0:00");
        lvStops->SetItem(itemIndex, 1, "line schedule");
        wxFont font = lvStops->GetItemFont(itemIndex);
        font.MakeItalic();
        lvStops->SetItemFont(itemIndex, font);
        lvStops->SetItemPtrData(itemIndex, (wxUIntPtr) new Line::Stop(NO_STATION, TimeOffset(0)));

    const Line::StopList& stops = _line.getStopsList();
	for(Line::StopList::const_iterator i = stops.begin(); i != stops.end(); ++i )
    {
        try
        {
            wxString t(std::string("+") + (*i).time.toString());
            const Station& station = Stations::instance()->getStation((*i).station);
            Line::Stop* newStop = new Line::Stop(station.getID(),(*i).time);
            long itemIndex = lvStops->InsertItem(lvStations->GetItemCount(), t);
            //lvStops->SetItemData(itemIndex, station.getID());
            lvStops->SetItemPtrData(itemIndex,(wxUIntPtr) newStop);
            lvStops->SetItem(itemIndex, 1, station.getName());
        }
        catch(std::invalid_argument& e)
        {
            wxMessageBox(e.what());
        }
    }
    lvStops->SortItems(StopCompareFunc, 0);


}