Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1104766
  • 博文数量: 121
  • 博客积分: 8910
  • 博客等级: 上将
  • 技术积分: 2915
  • 用 户 组: 普通用户
  • 注册时间: 2005-12-18 09:36
文章分类

全部博文(121)

文章存档

2011年(3)

2010年(100)

2008年(18)

分类: BSD

2008-06-07 17:03:53

 
插入C/C++代码:
 
 

#include <iostream>

using namespace std;

int main(int argv, char ** argc)
{
    cout<< "char " << sizeof(char) << endl;
    cout<< "short "<< sizeof(short) << endl;
    cout<< "int " << sizeof(int) << endl;
    cout<< "long " << sizeof(long) << endl;
    cout<< "long long " << sizeof(long long) << endl;
    cout<< "float " << sizeof(float) << endl;
    cout<< "double " << sizeof(double) << endl;
    cout<< "long double " << sizeof(long double) << endl;
    cout<< "pointer " << sizeof(void*) << endl;
    return 0;
}

插入头文件代码:

// This file is generated by kconfig_compiler from simple.kcfg.

// All changes you do to this file will be lost.

#ifndef SETTINGS_H
#define SETTINGS_H

#include <kconfigskeleton.h>
#include <kdebug.h>

class Settings : public KConfigSkeleton
{
  public:

    static Settings *self();
    ~Settings();

    /**
      Set color of the background
    */

    static
    void setCol_background( const QColor & v )
    {
      if (!self()->isImmutable( QString::fromLatin1 ( "col_background" ) ))
        self()->mCol_background = v;
    }

    /**
      Get color of the background
    */

    static
    QColor col_background()
    {
      return self()->mCol_background;
    }

    /**
      Set color of the foreground
    */

    static
    void setCol_foreground( const QColor & v )
    {
      if (!self()->isImmutable( QString::fromLatin1 ( "col_foreground" ) ))
        self()->mCol_foreground = v;
    }

    /**
      Get color of the foreground
    */

    static
    QColor col_foreground()
    {
      return self()->mCol_foreground;
    }


    /**
      Get size of a ball
    */

    static
    int val_time()
    {
      return self()->mVal_time;
    }

  protected:
    Settings();
    friend class SettingsHelper;


    // Preferences

    QColor mCol_background;
    QColor mCol_foreground;
    int mVal_time;

  private:
};

#endif

插入Makefile脚本代码:

# -*-mode: makefile-*-
# New ports collection makefile for: KDE libraries 4
# Date created:    2 November 2001
# Whom:     
#
# $FreeBSD$
#

PORTNAME= kde-l10n-zh_CN
PORTVERSION= 4.0.2
CATEGORIES= chinese
MASTER_SITES= ${MASTER_SITE_KDE}
MASTER_SITE_SUBDIR= stable/${PORTVERSION}/src/kde-l10n
#PKGNAMESUFFIX?= # empty
DIST_SUBDIR= KDE

MAINTAINER= 
COMMENT= zh_CN for kde4

BUILD_DEPENDS=  xgettext:${PORTSDIR}/devel/gettext

USE_BZIP2=      yes
USE_CMAKE=      yes
USE_QT_VER=     4

USE_FAM=        yes
USE_GETTEXT=    yes

# XXX: PREFIX/kde4?
USE_LDCONFIG= ${PREFIX}/kde4/lib ${PREFIX}/kde4/lib/kde4


# XXX: Following defines may be obsoleted by upcoming b.p.m.-cmake changes
MAKE_ENV= VERBOSE="1"
WRKSRC=  ${WRKDIR}/${PORTNAME}-${PORTVERSION}/build

# XXX: PREFIX/kde4?
CMAKE_ARGS= -DCMAKE_INSTALL_PREFIX=${PREFIX}/kde4

# XXX: PREFIX/kde4?
#MANPREFIX= ${PREFIX}/kde4/share
#MAN1=  checkXML.1 kde4-config.1
#MAN7=  kdeoptions.7 qtoptions.7
#MAN8=  kbuildsycoca4.8

.include

post-extract:
 ${MKDIR} ${WRKSRC}

do-configure:
 cd ${WRKSRC}; ${SETENV} ${CONFIGURE_ENV} ${CMAKE} ${CMAKE_ARGS} ..

.include

插入xml代码:

 

<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
<class>Form1</class>
<widget class="QWizard">
    <property name="name">
        <cstring>Form1</cstring>
    </property>
    <property name="geometry">
        <rect>
            <x>0</x>
            <y>0</y>
            <width>600</width>
            <height>480</height>
        </rect>
    </property>
    <property name="caption">
        <string>Form1</string>
    </property>
    <widget class="QWidget">
        <property name="name">
            <cstring>page</cstring>
        </property>
        <attribute name="title">
            <string>Page 1</string>
        </attribute>
    </widget>
</widget>
<layoutdefaults spacing="6" margin="11"/>
</UI>

阅读(2936) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~