SyncDiagram::SyncDiagram(size_t channels) { assert(channels > 0); { SharedLock lock(&m_shared_data); lock->m_time_channels.resize(channels); for(auto &c : lock->m_time_channels) { c.m_name = ""; c.m_current_time = 0.0; c.m_time_shift = std::numeric_limits<double>::max() * 0.5; c.m_time_shift_v = 0.0; } } m_height = CHANNEL_SPACING + (CHANNEL_HEIGHT + CHANNEL_SPACING) * channels; m_font = QFont("Sans"); m_font.setPixelSize(12); setWindowTitle(tr("Synchronization Diagram") + " - " + MainWindow::WINDOW_CAPTION); setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); m_update_timer = new QTimer(this); m_update_timer->setSingleShot(true); connect(this, SIGNAL(NeedsUpdate()), this, SLOT(DelayedUpdate()), Qt::QueuedConnection); connect(m_update_timer, SIGNAL(timeout()), this, SLOT(update())); setMinimumSize(minimumSizeHint()); // workaround for Qt bug }
CContactListCtrl::CContactListCtrl(wxWindow* parent, wxWindowID id) : wxListCtrl(parent, id, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxLC_VIRTUAL) , m_pAddressbook(0) { m_Timer.SetOwner(this, GetId()); m_attrEven.SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_LISTBOX)); m_attrOdd.SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_INFOBK)); InsertColumn(Column_Org, _("Organization"), wxLIST_FORMAT_LEFT, 100); InsertColumn(Column_LN, _("Last Name"), wxLIST_FORMAT_LEFT, 130); InsertColumn(Column_FN, _("First Name"), wxLIST_FORMAT_LEFT, 100); InsertColumn(Column_SN, _("Sorted Name"), wxLIST_FORMAT_LEFT, 200); InsertColumn(Column_Email, _("Email"), wxLIST_FORMAT_LEFT, 100); InsertColumn(Column_Phone, _("Phone Number(s)"), wxLIST_FORMAT_LEFT, 220); DelayedUpdate(); }