コード例 #1
0
ファイル: part.cpp プロジェクト: KDE/calligra-history
//------------------------------------
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 ) ) );

}
コード例 #2
0
ファイル: PlanTJPlugin.cpp プロジェクト: crayonink/calligra-2
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;
}
コード例 #3
0
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;
}
コード例 #4
0
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);
}
コード例 #5
0
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] );
    }
}
コード例 #6
0
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] );
  }

}