Beispiel #1
0
//------------------------------------
Part::Part( QWidget *parentWidget, QObject *parent, const QVariantList & /*args*/ )
    : KParts::ReadWritePart( parent ),
    m_xmlLoader(),
    m_modified( false ),
    m_loadingFromProjectStore( false ),
    m_undostack( new QUndoStack( this ) )
{
    setComponentData( Factory::global() );
    // Add library translation files
    KLocale *locale = KGlobal::locale();
    if ( locale ) {
        locale->insertCatalog( "kplatolibs" );
        locale->insertCatalog( "kabc" );
    }
    if ( isReadWrite() ) {
        setXMLFile( "kplatowork.rc" );
    } else {
        setXMLFile( "kplatowork_readonly.rc" );
    }

    View *v = new View( this, parentWidget, actionCollection() );
    setWidget( v );
    connect( v, SIGNAL( viewDocument( Document* ) ), SLOT( viewWorkpackageDocument( Document* ) ) );

    loadWorkPackages();

    connect( m_undostack, SIGNAL( cleanChanged( bool ) ), SLOT( setDocumentClean( bool ) ) );

}
Beispiel #2
0
PlanTJPlugin::PlanTJPlugin( QObject * parent, const QVariantList & )
    : KPlato::SchedulerPlugin(parent)
{
    KLocale *locale = KGlobal::locale();
    if ( locale ) {
        locale->insertCatalog( "plantjplugin" );
    }
    m_granularities << (long unsigned int) 5 * 60 * 1000
                    << (long unsigned int) 15 * 60 * 1000
                    << (long unsigned int) 30 * 60 * 1000
                    << (long unsigned int) 60 * 60 * 1000;
}
KPlatoRCPSPlugin::KPlatoRCPSPlugin( QObject * parent, const QVariantList & )
    : KPlato::SchedulerPlugin(parent)
{
    kDebug(planDbg())<<rcps_version();
    KLocale *locale = KGlobal::locale();
    if ( locale ) {
        locale->insertCatalog( "planrcpsplugin" );
    }
    m_granularities << (long unsigned int) 1 * 60 * 1000
                    << (long unsigned int) 15 * 60 * 1000
                    << (long unsigned int) 30 * 60 * 1000
                    << (long unsigned int) 60 * 60 * 1000;
}
KdePlatformDependent::KdePlatformDependent()
    : m_config(KSharedConfig::openConfig("atticarc")), m_accessManager(0), m_wallet(0)
{
    // when a plain Qt application loads this plugin, it needs a valid KGlobal object
    if (!KGlobal::hasMainComponent()) {
        KComponentData componentData("attica_kde");
    }

    KLocale* locale = KGlobal::locale();
    if (locale) {
        locale->insertCatalog("attica_kde");
    }

    m_accessManager = new KIO::Integration::AccessManager(this);
}
void insertLibraryCatalogues()
{
    static const char * const catalogs[] = {
        "libkdepim",
        "kabc",
        "libakonadi",
        "kabcakonadi",
        "akonadicontact",
        "libpimcommon"
    };

    KLocale * l = KGlobal::locale();
    for ( unsigned int i = 0 ; i < sizeof catalogs / sizeof *catalogs ; ++i ) {
      l->insertCatalog( catalogs[i] );
    }
}
void insertLibraryCataloguesAndIcons() {
  static const char * const catalogs[] = {
    "libkdepim",
    "libksieve",
    "libkleopatra",
    "libkpgp",
    "libkmime",
    "libmessagelist",
    "libmessagecore"
  };

  KLocale * l = KGlobal::locale();
  KIconLoader * il = KIconLoader::global();
  for ( unsigned int i = 0 ; i < sizeof catalogs / sizeof *catalogs ; ++i ) {
    l->insertCatalog( catalogs[i] );
    il->addAppDir( catalogs[i] );
  }

}