Exemple #1
0
Simonoid::Simonoid ( QObject *parent, const QVariantList &args )
  : Plasma::Applet ( parent, args ),
    m_appletLayout(0),
    m_layouttype ( Simonoid::LayoutInvalid ),
    m_interval ( -1 ),
    m_icon ( "simon" ),
    m_isconnected ( false ),
    m_configpage ( 0 ),
    m_dbusinterface ( 0 ),
    m_checkConnectionTimer ( this ) {
  setHasConfigurationInterface ( true );
  setBackgroundHints ( DefaultBackground );
  setHasConfigurationInterface ( true );
}
HomeScreen::HomeScreen(QObject *parent, const QVariantList &args)
    : Plasma::Containment(parent, args)
{
    qmlRegisterType<ApplicationListModel>();
    m_applicationListModel = new ApplicationListModel(this);
    setHasConfigurationInterface(true);
}
SimilarArtistsApplet::SimilarArtistsApplet( QObject *parent, const QVariantList& args )
        : Context::Applet( parent, args )
        , m_scroll( 0 )
        , m_settingsIcon( 0 )
{
    setHasConfigurationInterface( true );
}
Exemple #4
0
Clock::Clock(QObject *parent, const QVariantList &args)
    : ClockApplet(parent, args),
      m_showSecondHand(false),
      m_showTimezoneString(false),
      m_showingTimezone(false),
      m_tzFrame(0),
      m_repaintCache(RepaintAll),
      m_faceCache(QPixmap()),
      m_handsCache(QPixmap()),
      m_glassCache(QPixmap()),
      m_secondHandUpdateTimer(0),
      m_animateSeconds(false)
{
    KGlobal::locale()->insertCatalog("libplasmaclock");
    // this catalog is only used once on the first start of the clock to translate the timezone in the configuration file
    KGlobal::locale()->insertCatalog("timezones4");
    setHasConfigurationInterface(true);
    resize(256, 256);
    setAspectRatioMode(Plasma::Square);
    setBackgroundHints(NoBackground);

    m_theme = new Plasma::Svg(this);
    m_theme->setImagePath("widgets/clock");
    m_theme->setContainsMultipleImages(true);
    m_theme->resize(size());

    connect(m_theme, SIGNAL(repaintNeeded()), this, SLOT(repaintNeeded()));
}
KeyboardApplet::KeyboardApplet(QObject *parent, const QVariantList &args):
    Plasma::Applet(parent, args),
    xEventNotifier(),
    rules(Rules::readRules(Rules::READ_EXTRAS)),
    keyboardConfig(new KeyboardConfig()),
    layoutsMenu(new LayoutsMenu(*keyboardConfig, *rules, flags))
{
    if( ! X11Helper::xkbSupported(NULL) ) {
        setFailedToLaunch(true, i18n("XKB extension failed to initialize"));
        return;
    }

    m_svg = new Plasma::Svg(this);
    m_svg->setImagePath("widgets/labeltexture");
    m_svg->setContainsMultipleImages(true);
    resize(48,48);

    setHasConfigurationInterface(false);

    setAspectRatioMode(Plasma::KeepAspectRatio);
    //setSizePolicy(QSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum));
    setBackgroundHints(DefaultBackground);
    connect(Plasma::Theme::defaultTheme(), SIGNAL(themeChanged()), this, SLOT(themeChanged()));

    QDBusConnection dbus = QDBusConnection::sessionBus();
    dbus.connect(QString(), KEYBOARD_DBUS_OBJECT_PATH, KEYBOARD_DBUS_SERVICE_NAME, KEYBOARD_DBUS_CONFIG_RELOAD_MESSAGE, this, SLOT(configChanged()));
}
Exemple #6
0
InfoApplet::InfoApplet( QObject* parent, const QVariantList& args )
    : Context::Applet( parent, args )
    , m_webView( 0 )
    , m_initialized( false )
{
    setHasConfigurationInterface( false );
}
Exemple #7
0
SearchLaunch::SearchLaunch(QObject *parent, const QVariantList &args)
    : Containment(parent, args),
      m_runnerModel(0),
      m_serviceModel(0),
      m_backButton(0),
      m_queryCounter(0),
      m_maxColumnWidth(0),
      m_searchField(0),
      m_resultsView(0),
      m_orientation(Qt::Vertical),
      m_firstItem(0),
      m_appletsLayout(0),
      m_appletOverlay(0),
      m_iconActionCollection(0),
      m_stripUninitialized(true)
{
    setContainmentType(Containment::CustomContainment);
    m_iconActionCollection = new IconActionCollection(this, this);
    setHasConfigurationInterface(true);
    setFocusPolicy(Qt::StrongFocus);
    setFlag(QGraphicsItem::ItemIsFocusable, true);
    m_background = new Plasma::FrameSvg(this);
    m_background->setImagePath("widgets/frame");
    m_background->setElementPrefix("raised");
    m_background->setEnabledBorders(Plasma::FrameSvg::BottomBorder);
}
Exemple #8
0
Hdd::Hdd(QObject *parent, const QVariantList &args)
    : SM::Applet(parent, args)
{
    setHasConfigurationInterface(true);
    setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);
    connect(Plasma::Theme::defaultTheme(), SIGNAL(themeChanged()), this, SLOT(themeChanged()));
}
Exemple #9
0
SM::Ram::Ram(QObject *parent, const QVariantList &args)
    : SM::Applet(parent, args)
{
    setHasConfigurationInterface(true);
    resize(234 + 20 + 23, 135 + 20 + 25);
    setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
}
Exemple #10
0
PhotosApplet::PhotosApplet( QObject* parent, const QVariantList& args )
    : Context::Applet( parent, args )
    , m_settingsIcon( 0 )
{
    DEBUG_BLOCK
    setHasConfigurationInterface( true );
}
LabelsApplet::LabelsApplet( QObject *parent, const QVariantList &args )
    : Context::Applet( parent, args ),
    m_lastLabelSize( QSizeF(0,0) ),
    m_lastLabelBottomAdded( false )
{
    setHasConfigurationInterface( true );
}
/**
 * Examples of what the regexp has to handle...
 *
 * Note actually it's now set to an inclusive-only mode, far cleaner.
 *
 * Included items only:
 *
 *
 * RAID blocks (there *could* be more if not using mdadm, I think):
 *
 * disk/md<something>/Rate/rio
 * disk/md<something>/Rate/wio
 *
 * SATA disks:
 *
 * disk/sd<something>/Rate/rio
 * disk/sd<something>/Rate/wio
 *
 * IDE/PATA disks:
 *
 * disk/hd<something>/Rate/rio
 * disk/hd<something>/Rate/wio
 *
 * Does NOT include partitions, since I don't think many people will use that.
 *
 * RAID regexp handling needs further testing, I have a feeling it works just for me.
 *
 */
Hdd_Activity::Hdd_Activity(QObject *parent, const QVariantList &args)
    : SM::Applet(parent, args),
      m_regexp("disk/(?:md|sd|hd)[a-z|0-9]_.*/Rate/(?:rblk|wblk)")
{
    setHasConfigurationInterface(true);
    setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
}
Exemple #13
0
Paste::Paste(QObject *parent, const QVariantList &args)
    : Plasma::PopupApplet(parent, args), m_list(0), m_snippetConfig(0)
{
    setHasConfigurationInterface(true);
    setAspectRatioMode(Plasma::IgnoreAspectRatio);
    resize(200, 300);
    setPopupIcon("edit-paste");
}
Exemple #14
0
LauncherApplet::LauncherApplet(QObject *parent, const QVariantList &args)
    : Plasma::PopupApplet(parent,args),
      d(new Private(this))
{
    KGlobal::locale()->insertCatalog("plasma_applet_launcher");
    setHasConfigurationInterface(true);
    setIcon("start-here-kde");
}
Exemple #15
0
Albums::Albums( QObject* parent, const QVariantList& args )
    : Context::Applet( parent, args )
    , m_recentCount( Amarok::config("Albums Applet").readEntry("RecentlyAdded", 5) )
    , m_rightAlignLength( Amarok::config("Albums Applet").readEntry("RightAlignLength", false) )
    , m_albumsView( 0 )
{
    setHasConfigurationInterface( true );
}
Exemple #16
0
Luna::Luna(QObject *parent, const QVariantList &args)
    : Plasma::Applet(parent, args),
      counter(-1),
      m_theme(0)
{
    setHasConfigurationInterface(true);
    setAspectRatioMode(Plasma::Square);
    setBackgroundHints(Plasma::Applet::NoBackground);
    resize(QSize(82, 82));
}
Exemple #17
0
SongkickApplet::SongkickApplet( QObject* parent, const QVariantList& args )
    : Context::Applet( parent, args )
    , m_titleText( i18n("Songkick Concert Information") )
    , m_titleLabel( 0 )
    , m_reloadIcon( 0 )
    , m_songkick( 0 )
    , m_songkickProxy( 0 )
{
    setHasConfigurationInterface( false );
    setBackgroundHints( Plasma::Applet::NoBackground );
}
PlasmaMuleApplet::PlasmaMuleApplet(QObject *parent, const QVariantList &args)
	: Plasma::Applet(parent, args),
	m_svg(this)
{
	QString path = __IMG_PATH__;
	path.append( "application-x-emulecollection.svg");
	m_svg.setImagePath(path);
	setBackgroundHints(TranslucentBackground);
	setMinimumSize(200, 200);
	setMaximumSize(300, 300);
	setAcceptDrops(TRUE);
	setHasConfigurationInterface(FALSE);
}
Exemple #19
0
KateSessionApplet::KateSessionApplet(QObject *parent, const QVariantList &args)
    : Plasma::PopupApplet(parent, args), m_listView( 0 ), m_config(0)
{
    KDirWatch *dirwatch = new KDirWatch( this );
    QStringList lst = KGlobal::dirs()->findDirs( "data", "kate/sessions/" );
    for ( int i = 0; i < lst.count(); i++ )
    {
        dirwatch->addDir( lst[i] );
    }
    connect( dirwatch, SIGNAL(dirty (const QString &) ), this, SLOT( slotUpdateSessionMenu() ) );
    setPopupIcon( "kate" );
    setHasConfigurationInterface(true);
}
Exemple #20
0
/**
 * \brief Constructor
 *
 * TabsApplet constructor
 *
 * \param parent : the TabsApplet parent (used by Context::Applet)
 * \param args   : (used by Context::Applet)
 */
TabsApplet::TabsApplet( QObject* parent, const QVariantList& args )
    : Context::Applet( parent, args )
    , m_tabsView( 0 )
    , m_currentState( InitState )
    , m_layout( 0 )
    , m_fetchGuitar( true )
    , m_fetchBass( true )
    , m_showTabBrowser( false )
{
    DEBUG_BLOCK
    setHasConfigurationInterface( true );

    EngineController *engine = The::engineController();
    connect( engine, SIGNAL(stopped(qint64,qint64)), this, SLOT(stopped()) );
}
Exemple #21
0
TodoApplet::TodoApplet(QObject *parent, const QVariantList &args) :
    Plasma::PopupApplet(parent, args),
    m_engine(0),
    m_types(0),
    m_error(0),
    m_proxyWidget(0),
    m_widget(0),
    m_view(0),
    m_configUi()
{
    setAspectRatioMode(Plasma::IgnoreAspectRatio);
    setHasConfigurationInterface(true);

    setPopupIcon("view-pim-tasks");
}
KdeObservatory::KdeObservatory(QObject *parent, const QVariantList &args)
: Plasma::PopupApplet(parent, args),
  m_mainContainer(0),
  m_currentView(0),
  m_viewTransitionTimer(new QTimer(this)),
  m_transitionTimer(new QTimeLine(500, this)),
  m_engine(0),
  m_service(0)
{
    setBackgroundHints(DefaultBackground);
    setHasConfigurationInterface(true);
    setAspectRatioMode(Plasma::IgnoreAspectRatio);
    resize(300, 200);

    connect(m_transitionTimer, SIGNAL(finished()), this, SLOT(timeLineFinished()));
    connect(m_viewTransitionTimer, SIGNAL(timeout()), this, SLOT(moveViewRight()));
}
ponycountdownplasma::ponycountdownplasma(QObject *parent, const QVariantList &args)
    : Plasma::Applet(parent, args),
    m_svg(this), 
    m_label_ep(0), m_label_name(0), m_label_season(0),
    m_label_day_est(0), m_label_hour_est(0), m_label_min_est(0), m_label_sec_est(0)
{
    // this will get us the standard applet background, for free!
    setBackgroundHints(DefaultBackground);
    m_svg.setImagePath("widgets/background");
    setHasConfigurationInterface(false);
    setAspectRatioMode(Plasma::IgnoreAspectRatio);
    
    m_font.setPixelSize(24);
    
    resize(500, 150);
    
}
Exemple #24
0
IconApplet::IconApplet(QObject *parent, const QVariantList &args)
    : Plasma::Applet(parent, args),
      m_icon(0),
      m_watcher(0),
      m_hasDesktopFile(false)
{
    setAcceptDrops(true);
    setBackgroundHints(NoBackground);
    setHasConfigurationInterface(true);
    m_icon = new Plasma::IconWidget(this);

    if (!args.isEmpty()) {
        setUrl(args.value(0).toString());
    }

    resize(m_icon->sizeFromIconSize(IconSize(KIconLoader::Desktop)));
    //kDebug() << "sized to:" << geometry();
}
Exemple #25
0
WicdApplet::WicdApplet(QObject *parent, const QVariantList &args)
    : Plasma::PopupApplet(parent, args),
      m_theme(0),
      m_plotter(0)
{
    KGlobal::locale()->insertCatalog("wicd-kde");
    
    Wicd::locate();
    setHasConfigurationInterface(false);
    setAspectRatioMode(Plasma::ConstrainedSquare);
    setPopupIcon(QIcon());
    setStatus(Plasma::ActiveStatus);
    m_theme = new Plasma::Svg(this);
    m_theme->setImagePath("icons/network");
    m_theme->setContainsMultipleImages(true);
    
    // this will get us the standard applet background, for free!
    setBackgroundHints(DefaultBackground);
}
Exemple #26
0
Clock::Clock(QObject *parent, const QVariantList &args)
    : ClockApplet(parent, args),
      m_plainClockFont(KGlobalSettings::generalFont()),
      m_useCustomColor(false),
      m_useCustomShadowColor(false),
      m_drawShadow(true),
      m_dateStyle(0),
      m_showSeconds(false),
      m_showTimezone(false),
      m_dateTimezoneBesides(false),
      m_layout(0),
      m_svg(0)
{
    KGlobal::locale()->insertCatalog("libplasmaclock");
    // this catalog is only used once on the first start of the clock to translate the timezone in the configuration file
    KGlobal::locale()->insertCatalog("timezones4");
    setHasConfigurationInterface(true);
    resize(150, 75);
}
EmergingPlasmoid::EmergingPlasmoid(QObject * parent, const QVariantList & args)
  : Plasma::Applet(parent, args)
  , gentooLogoLabel(this)
  , currentJobMeter(this)
  , totalJobMeter(this)
  , layout(NULL)
  , currentJobName("Nothing being emerged")
  , targetJobCount(0)
  , currentJobCount(0)
  , secondsUntilGiveUp(0)
  , configDialog(NULL) {
  setBackgroundHints(DefaultBackground);
  gentooLogoLabel.setImage(KStandardDirs::locate("data", "emerging-plasmoid/glogo-small.png"));
  setHasConfigurationInterface(true);
  connect(&updateTimer, SIGNAL(timeout()), this, SLOT(updateStatus()));
  updateTimer.start(1000); // every 1sec
  connect(Plasma::Theme::defaultTheme(), SIGNAL(themeChanged()), this, SLOT(themeChanged()));
  setAspectRatioMode(Plasma::IgnoreAspectRatio);
}
GraphicalTimetableLine::GraphicalTimetableLine(QObject *parent, const QVariantList &args)
    : Plasma::Applet(parent, args), m_stopWidget(0), m_vehicleTypeModel(0),
    m_showTimetableCheckbox(0), m_drawTransportLineCheckbox(0),
    m_zoomInButton(0), m_zoomOutButton(0), m_title(0), m_departureView(0), m_svg(this)
{
    m_animate = true;

    // this will get us the standard applet background, for free!
    setBackgroundHints(DefaultBackground);
    m_svg.setImagePath( KGlobal::dirs()->findResource("data", "plasma_applet_graphicaltimetableline/vehicles.svg") );
    m_svg.setContainsMultipleImages( true );

    setAspectRatioMode(Plasma::IgnoreAspectRatio);
    setHasConfigurationInterface(true);
    resize( 400, 250 );
    setMinimumHeight( 125 );

    QRectF rect = contentsRect();
    m_timelineStart = QPointF( rect.left() + 0.1 * rect.width(), rect.top() + 0.75 * rect.height() );
    m_timelineEnd = QPointF( rect.right() - 0.05 * rect.width(), rect.top() + 0.18 * rect.height() );
}
Exemple #29
0
KalziumPlasma::KalziumPlasma(QObject *parent, const QVariantList &args)
    : Plasma::Applet(parent, args),
    m_dialog(0),
    m_font(QFont())
{
    m_theme.setImagePath("widgets/testtube"),
    m_engine = dataEngine("kalzium");

    m_dialog = 0;
    m_label1 = 0;
    m_lineedit = new Plasma::LineEdit(this);
    m_lineedit->setDefaultText(i18n("Enter the atomic number."));
    connect(m_lineedit, SIGNAL(editingFinished()),
            this, SLOT(textChanged()));

    setHasConfigurationInterface(true);
    setAcceptDrops(false);
    setAcceptsHoverEvents(true);
//     setDrawStandardBackground(false);

    resize(385,177);
}
Exemple #30
0
StackFolder::StackFolder(QObject *parent, const QVariantList &args)
    : Plasma::PopupApplet(parent, args),
      m_graphicsWidget(0),
      m_placesModel(0)
{
    setAspectRatioMode(Plasma::IgnoreAspectRatio);
    setHasConfigurationInterface(false);

    m_dirModel = new DirModel(this);

    m_model = new ProxyModel(this);
    m_model->setSourceModel(m_dirModel);
    m_model->setSortLocaleAware(true);
    m_model->setFilterCaseSensitivity(Qt::CaseInsensitive);

    m_selectionModel = new QItemSelectionModel(m_model, this);

    if (args.count() > 0) {
        m_url = KUrl(args.value(0).toString());
    }

    m_icon = KIcon("folder");
    setPopupIcon(m_icon);
}