Exemplo n.º 1
0
bool QAppointmentIO::setAppointmentField(int row, QAppointmentModel::Field k,  const QVariant &v)
{
    QAppointment t = appointment(row);
    if (QAppointmentModel::setAppointmentField(t, k, v))
        return updateAppointment(t);
    return false;
}
Exemplo n.º 2
0
void E2ServerInterface::doAppointmentTimer(bool on)
{
    if(on) {
        if(m_model) delete m_model;
        if(m_appointment) delete m_appointment;

        m_appointment = new QAppointmentModel(this);
        m_model =
            new QOccurrenceModel(QDateTime::currentDateTime(),
                                 QDateTime(QDate(2099,1,1), QTime(0,0,0)),
                                 this);
        m_model->setDurationType( QAppointmentModel::AnyDuration );
        QObject::connect(m_model, SIGNAL(columnsInserted(QModelIndex,int,int)), this, SLOT(updateAppointment()));
        QObject::connect(m_model, SIGNAL(columnsRemoved(QModelIndex,int,int)), this, SLOT(updateAppointment()));
        QObject::connect(m_model, SIGNAL(dataChanged(QModelIndex,QModelIndex)) , this, SLOT(updateAppointment()));
        QObject::connect(m_model, SIGNAL(modelReset()), this, SLOT(updateAppointment()));
        QObject::connect(m_model, SIGNAL(rowsInserted(QModelIndex,int,int)), this, SLOT(updateAppointment()));
        QObject::connect(m_model, SIGNAL(rowsRemoved(QModelIndex,int,int)), this, SLOT(updateAppointment()));

        updateAppointment();

        appointmentTimer.start(60 * 1000);
    } else {
Exemplo n.º 3
0
E2ServerInterface::E2ServerInterface(QWidget *parent, Qt::WFlags flags)
: QAbstractServerInterface(parent, flags),
  m_ringProf(":image/profileedit/Note"),
  m_browser(0), m_wallpaper(":image/themes/qtopia/ladybug.png"), 
  operatorItem(0), datebook(":image/datebook/DateBook_16"),
  m_model(0), m_appointment(0)
{
    // XXX - remove me
    DialerControl::instance();

    // Replace default call history
    BuiltinApplicationLauncher::install("callhistory", e2_callhistory);

    E2Header *header = new E2Header(0);
    header->show();

    setGeometry(qApp->desktop()->availableGeometry());

    m_bar = new E2TelephonyBar(this);

    E2Telephony *telephony = new E2Telephony(0);
    E2Incoming * incoming = new E2Incoming();
    QObject::connect(incoming, SIGNAL(showCallscreen()),
                     telephony, SLOT(popupCallscreen()));
    QObject::connect(incoming, SIGNAL(showCallscreen()),
                     telephony, SLOT(display()));

    (void)new E2NewMessage();

    QtopiaChannel *e2 = new QtopiaChannel("QPE/E2", this);
    QObject::connect(e2, SIGNAL(received(QString,QByteArray)),
                     this, SLOT(e2Received(QString,QByteArray)));

    operatorItem = new QValueSpaceItem("/Telephony/Status/OperatorName",
                                       this);
    QObject::connect(operatorItem, SIGNAL(contentsChanged()),
                     this, SLOT(operatorChanged()));

    QObject::connect(&appointmentTimer, SIGNAL(timeout()),
                     this, SLOT(updateAppointment()));

}