示例#1
0
DarkSilkMarket::DarkSilkMarket(QWidget *parent) :
    QWidget(parent),
    ui(new Ui::DarkSilkMarket)
{
    ui->setupUi(this);
    subscribeToCoreSignals();

    ui->darksilkMarketHeaderLabel->setPixmap(QPixmap(":/images/darksilkmarket"));
    updateCategories();

    ui->buyButton->setEnabled(false);
    ui->viewDetailsButton->setEnabled(false);
    ui->copyAddressButton->setEnabled(false);
}
示例#2
0
WaveNet::WaveNet(QWidget *parent) :
    QWidget(parent),
    ui(new Ui::WaveNet)
{
    ui->setupUi(this);
    subscribeToCoreSignals();

    ui->waveNetHeaderLabel->setPixmap(QPixmap(":/images/wavenet"));
    updateCategories();

    ui->buyButton->setEnabled(false);
    ui->viewDetailsButton->setEnabled(false);
    ui->copyAddressButton->setEnabled(false);
    lastPrice = 0;
}
void KOViewManager::connectTodoView( KOTodoView *todoView )
{
    if ( !todoView ) {
        return;
    }

    // SIGNALS/SLOTS FOR TODO VIEW
    connect( todoView, SIGNAL(purgeCompletedSignal()),
             mMainView, SLOT(purgeCompleted()) );
    connect( todoView, SIGNAL(unSubTodoSignal()),
             mMainView, SLOT(todo_unsub()) );
    connect( todoView, SIGNAL(unAllSubTodoSignal()),
             mMainView, SLOT(makeSubTodosIndependents()) );
    connect( mMainView, SIGNAL(categoryConfigChanged()),
             todoView, SLOT(updateCategories()) );
}
示例#4
0
void KODialogManager::showOptionsDialog()
{
    if(!mOptionsDialog)
    {
#if 0
        mOptionsDialog = new KConfigureDialog();
        //    mOptionsDialog = new KConfigureDialog( KConfigureDialog::Configurable );
        //    mOptionsDialog = new KConfigureDialog( mMainView );
        connect(mOptionsDialog->dialog(),
                SIGNAL(configCommitted(const QCString &)),
                mMainView, SLOT(updateConfig()));
#else
        mOptionsDialog = new KCMultiDialog(mMainView, "KorganizerPreferences");
        connect(mOptionsDialog, SIGNAL(configCommitted(const QCString &)),
                mMainView, SLOT(updateConfig(const QCString &)));
#if 0
        connect(mOptionsDialog, SIGNAL(applyClicked()),
                mMainView, SLOT(updateConfig()));
        connect(mOptionsDialog, SIGNAL(okClicked()),
                mMainView, SLOT(updateConfig()));
        // @TODO Find a way to do this with KCMultiDialog
        connect(mCategoryEditDialog, SIGNAL(categoryConfigChanged()),
                mOptionsDialog, SLOT(updateCategories()));
#endif

        QStringList modules;

        modules.append("korganizer_configmain.desktop");
        modules.append("korganizer_configtime.desktop");
        modules.append("korganizer_configviews.desktop");
        modules.append("korganizer_configfonts.desktop");
        modules.append("korganizer_configcolors.desktop");
        modules.append("korganizer_configgroupscheduling.desktop");
        modules.append("korganizer_configgroupautomation.desktop");
        modules.append("korganizer_configfreebusy.desktop");
        modules.append("korganizer_configplugins.desktop");
        modules.append("korganizer_configdesignerfields.desktop");

        // add them all
        QStringList::iterator mit;
        for(mit = modules.begin(); mit != modules.end(); ++mit)
            mOptionsDialog->addModule(*mit);
#endif
    }
示例#5
0
void TodoApplet::dataUpdated(const QString &name, const Plasma::DataEngine::Data &data)
{
    if (QString::compare(name, CATEGORY_SOURCE) == 0) {
        updateCategories(data["categories"].toStringList());
    }
    else if (QString::compare(name, COLOR_SOURCE) == 0) {
        updateColors(data["colors"].toMap());
    }
    else if (QString::compare(name, TODO_SOURCE) == 0) {
        if (!data["error"].isNull()) {
            KColorScheme colorTheme = KColorScheme(QPalette::Active, KColorScheme::View,
                                               Plasma::Theme::defaultTheme()->colorScheme());
            setError(i18n("<b><font color=\"%1\">%2</font></b>",
                       colorTheme.foreground(KColorScheme::NegativeText).color().name(),
                       data["error"].toString()));
        }
        else {
            updateTodoList(data["todos"].toList());
        }
    }
}
CalendarViewExtension *ResourceViewFactory::create( QWidget *parent )
{
  mResourceView = new ResourceView( mCalendar, parent );

  QObject::connect( mResourceView, SIGNAL(resourcesChanged()),
                    mView, SLOT(resourcesChanged()) );
  QObject::connect( mResourceView, SIGNAL(resourcesChanged()),
                    mView, SLOT(updateCategories()) );

  QObject::connect( mCalendar,
                    SIGNAL(signalResourceAdded(ResourceCalendar *)),
                    mResourceView,
                    SLOT(addResourceItem(ResourceCalendar *)) );
  QObject::connect( mCalendar,
                    SIGNAL(signalResourceModified(ResourceCalendar *)),
                    mResourceView,
                    SLOT(updateResourceItem(ResourceCalendar *)) );
  QObject::connect( mCalendar, SIGNAL(signalResourceAdded(ResourceCalendar *)),
                    mView, SLOT(updateCategories()) );
  QObject::connect( mCalendar, SIGNAL(signalResourceModified(ResourceCalendar *)),
                    mView, SLOT(updateCategories()) );

  return mResourceView;
}