BtInstallPage::BtInstallPage()
	: BtConfigPage()
{
	qDebug("BtInstallPage::BtInstallPage() start");
	initView();
	initConnections();
}
Evas_Object *IOGenlistScenarioHomeView::getPartItem(Evas_Object *obj, string part)
{
        Evas_Object *o = NULL;

        if (!io) return o;

        if (part == "calaos.button.go")
        {
                object_button = o = elm_button_add(parent);
                Evas_Object *icon = elm_icon_add(o);

                if (io->params["state"] == "true")
                        elm_image_file_set(icon, ApplicationMain::getTheme(), "calaos/icons/action_button/stop");
                else
                        elm_image_file_set(icon, ApplicationMain::getTheme(), "calaos/icons/action_button/play");

                elm_object_style_set(o, "calaos/action_button/default");
                elm_object_content_set(o, icon);
                evas_object_smart_callback_add(o, "clicked", _item_button_Go, this);
        }

        initView();

        return o;
}
Kiptables::Kiptables(const char *name,KIptablesConfig *config) : KTMainWindow(name)
{
	setConfig(config);
	initView();
	initActions();
	createGUI();
}
//--------------------------------------------------------------
// restore device resources
void mgGL33Services::createBuffers()
{
  initView();

  reloadTextures();
  setCursorTexture(m_cursorFileName, m_cursorHotX, m_cursorHotY);
}
Evas_Object *IOWOAnalogHomeView::getPartItem(Evas_Object *obj, string part)
{
        Evas_Object *o = NULL;

        if (!io) return o;

        if (part == "calaos.button.plus")
        {
                o = elm_button_add(parent);
                Evas_Object *icon = elm_icon_add(o);
                elm_image_file_set(icon, ApplicationMain::getTheme(), "calaos/icons/action_button/more");
                elm_object_style_set(o, "calaos/action_button/blue");
                elm_object_content_set(o, icon);
                evas_object_smart_callback_add(o, "clicked", _item_button_More, this);
        }
        else if (part == "calaos.button.moins")
        {
                o = elm_button_add(parent);
                Evas_Object *icon = elm_icon_add(o);
                elm_image_file_set(icon, ApplicationMain::getTheme(), "calaos/icons/action_button/less");
                elm_object_style_set(o, "calaos/action_button/blue");
                elm_object_content_set(o, icon);
                evas_object_smart_callback_add(o, "clicked", _item_button_Less, this);
        }

        initView();

        return o;
}
Exemple #6
0
//-------------------------------------------
// Initialisation des resources globales
//-------------------------------------------
void Renderer::initRessources()
{

    // Initialisation des paramètres OpenGL.
    {
        // 1 - Activer le test de profondeur
        glAssert(glEnable(GL_DEPTH_TEST));
        // 2 - Positionner le mode de dessin
        glAssert(glPolygonMode(GL_FRONT_AND_BACK, GL_FILL));
        // Fin du code à écrire

    }

    // Viewing parameters initialisation
    initView();

    // Loading or building geometric data.
    initGeometry();

    // Set up lighting
    initLighting();

    // Shaders initialisation
    initShaders();
}
Exemple #7
0
AudioPreview::AudioPreview( QWidget *parent, const KUrl &url, const QString &mimeType)
  : KVBox( parent )
{
  m_isTempFile = false;
  pic = 0;
  m_player = 0L;
  description = 0;
  setSpacing( 0 );
  if( url.isValid() && url.isLocalFile() ) {
    m_localFile = url.toLocalFile();
    pic = new QLabel(this);
    pic->setPixmap(KIO::pixmapForUrl( url ));
    pic->adjustSize();
    initView( mimeType );
  } else if( !url.isLocalFile() ) {
    KUrlLabel *label = new KUrlLabel( this );
    label->setText(i18n("This audio file is not stored\non the local host.\nClick on this label to load it.\n" ) );
    label->setUrl( url.prettyUrl() );
    connect(label, SIGNAL(leftClickedUrl(const QString&)), SLOT(downloadFile(const QString&)));
    pic = label;
  } else {
    description = new QLabel(this );
    description->setText(i18n("Unable to load audio file") );
  }
}
Exemple #8
0
void
AmazonStore::polish()
{
    DEBUG_BLOCK;

    if( !m_polished ) {
        m_polished = true;

        initTopPanel();
        initBottomPanel();
        initView();

        connect( m_itemView, SIGNAL(itemSelected(QModelIndex)), this, SLOT(itemSelected(QModelIndex)) );
        connect( m_itemView, SIGNAL(itemDoubleClicked(QModelIndex)), this, SLOT(itemDoubleClicked(QModelIndex)) );
        connect( m_itemView, SIGNAL(searchForAlbum(QModelIndex)), this, SLOT(searchForAlbum(QModelIndex)) );

        m_amazonInfoParser = new AmazonInfoParser();
        setInfoParser( m_amazonInfoParser );
        m_amazonInfoParser->showFrontPage();

        AmazonUrlRunner *runner = new AmazonUrlRunner();
        connect( runner, SIGNAL(search(QString)), this, SLOT(newSearchRequest(QString)) );
        The::amarokUrlHandler()->registerRunner( runner, runner->command() );
    }
}
Exemple #9
0
/**
 * Constructor.
 *
 * @param doc Pointer to an existing document of NULL if a new
 *   document shall be created for this window.
 * @param parent Parent widget. Usually a workspace.
 */
QC_MDIWindow::QC_MDIWindow(RS_Document* doc,
                           QWidget* parent, Qt::WindowFlags wflags)
        : QMainWindow(parent, wflags) {

    setAttribute(Qt::WA_DeleteOnClose);
    owner = false;
    cadMdiArea=qobject_cast<QMdiArea*>(parent);
    forceClosing = false;
    initDoc(doc);
    initView();
    id = idCounter++;
    //childWindows.setAutoDelete(false);
    parentWindow = NULL;

    if (document!=NULL) {
        if (document->getLayerList()!=NULL) {
            // Link the graphic view to the layer widget
            document->getLayerList()->addListener(graphicView);
        }
        if (document->getBlockList()!=NULL) {
            // Link the graphic view to the block widget
            document->getBlockList()->addListener(graphicView);
        }
    }
//    setFocusPolicy(Qt::ClickFocus);
    //showMaximized();
}
CModuleChooserDialog::CModuleChooserDialog( QWidget* parentDialog, ListCSwordModuleInfo modules ) :
KDialogBase(Plain, i18n("Choose work(s)"), Ok, Ok, parentDialog, "CModuleChooser", false, true) {
	initView();
	initConnections();

	m_moduleChooser->setModules(modules);
};
Exemple #11
0
void GUI::drawBoard()
{
    if(game == nullptr)
        return;

    const Board *b = game->getBoard();
    int boardSize = b->getSize();

    setFixedSize(boardSize * sqSize + 10, boardSize * sqSize + 60);
    initView();
    bitems.clear();

    QColor c(34, 132, 43);
    for(int i = 0; i < boardSize; i++) {
        for(int j = 0; j < boardSize; j++) {
            BoardSquare *it = new BoardSquare(c, sqSize, i, j);
            it->setPos(QPointF(j * sqSize, i * sqSize));
            qscene->addItem(it);
            bitems.push_back(it);

            int fcolor = b->getField(i, j);
            if(fcolor != Color::EMPTY) {
                BoardCircle *c = new BoardCircle(fcolor, sqSize - 20);
                c->setPos(QPointF(10, 10));
                c->setParentItem(it);
            }
            connect(it, SIGNAL(mousePressed(int, int)), this,
                    SLOT(sHandleBoardEvent(int, int)));
        }
    }

    updateStatusBar();
}
//---------------------------------------------------------------
// MsgConversationBaseView::MsgConversationBaseView
// Constructor
//---------------------------------------------------------------
MsgConversationBaseView::MsgConversationBaseView(QGraphicsItem* parent) :
    MsgBaseView(parent), mConversationId(-1), mCVIdkey(XQSettingsKey::TargetPublishAndSubscribe,
        KMsgCVIdProperty, KMsgCVIdKey)
{
    connect(this->mainWindow(), SIGNAL(viewReady()), this, SLOT(doDelayedConstruction()));
    initView();
}
Exemple #13
0
Monitor::Monitor(QWidget* parent, Doc* doc, Qt::WindowFlags f)
    : QWidget(parent, f)
    , m_doc(doc)
    , m_toolBar(NULL)
    , m_scrollArea(NULL)
    , m_monitorWidget(NULL)
{
    Q_ASSERT(doc != NULL);

    m_props = m_doc->monitorProperties();

    /* Master layout for toolbar and scroll area */
    new QVBoxLayout(this);

    initView();

    /* Listen to fixture additions and changes from Doc */
    connect(m_doc, SIGNAL(fixtureAdded(quint32)),
            this, SLOT(slotFixtureAdded(quint32)));
    connect(m_doc, SIGNAL(fixtureChanged(quint32)),
            this, SLOT(slotFixtureChanged(quint32)));
    connect(m_doc, SIGNAL(fixtureRemoved(quint32)),
            this, SLOT(slotFixtureRemoved(quint32)));

    connect(m_doc->inputOutputMap(), SIGNAL(universesWritten(int, const QByteArray&)),
            this, SLOT(slotUniversesWritten(int, const QByteArray&)));
}
Exemple #14
0
bool LCBattleScene::init()
{
    if(!Layer::init()) {
        return false;
    }
    Size visibleSize = Director::getInstance()->getVisibleSize();
    //Point origin = Director::getInstance()->getVisibleOrigin();

    /////////////////////////////

    auto edgeSp = Sprite::create();
    //auto body = PhysicsBody::createEdgeBox(visibleSize,3); //此句仅3.0 alpha0 有效
    auto body = PhysicsBody::createEdgeBox(visibleSize,PHYSICSBODY_MATERIAL_DEFAULT,3);
    edgeSp->setPosition(Point(visibleSize.width/2,visibleSize.height/2));
    edgeSp->setPhysicsBody(body);
    this->addChild(edgeSp);
    edgeSp->setTag(0);
    //setTouchEnabled(true);
    setKeyboardEnabled(true);

    initView();

    Rect rect = Rect(0, 0, backGround->getContentSize().width, backGround->getContentSize().height);
    tree = new QuadTree(4, rect);


    return true;
}
/**
* Call init() after the constructor, either in the end of your own constructor or from outside.
*/
void CModuleChooserDialog::init() {
    //Set the flag to destroy when closed - otherwise eats memory
    setAttribute(Qt::WA_DeleteOnClose);
    setWindowTitle(m_title);
    initView();
    initTree();
}
ManageInfoChooseDialog::ManageInfoChooseDialog(QWidget *parent) :
    QDialog(parent),
    ui(new Ui::ManageInfoChooseDialog)
{
    ui->setupUi(this);
    initView();
}
Exemple #17
0
Portal::Portal( QWidget *parent, KCmdLineArgs *args, const char* name)
: KXmlGuiWindow( parent, 0 ),
  mCmdLineArgs( args )
{
  setObjectName( name );
  ///////////////////////////////////////////////////////////////////
  // call inits to invoke all other construction parts
  initStatusBar();
  initActions();
  initView();

  setAttribute( Qt::WA_QuitOnClose );
  ///////////////////////////////////////////////////////////////////
  // disable actions at startup
  editCut->setEnabled(false);
  editCopy->setEnabled(false);
  editPaste->setEnabled(false);

  mAddressProvider = new AddressProvider( this );
  connect( mAddressProvider, SIGNAL( addresseeFound( const QString&, const KABC::Addressee&)),
          this, SLOT( slotReceivedMyAddress( const QString&, const KABC::Addressee& ) ) );

  setAutoSaveSettings();
  QTimer::singleShot( 0, this, SLOT( slotStartupChecks() ) );
}
GoodsRemoveConfirmativeDialog::GoodsRemoveConfirmativeDialog(int id, QWidget *parent) : QDialog(parent)
{
    service = new GoodsService();
    idGood = id;
    initView();
    initConnections();
}
Exemple #19
0
bool FSMScene::init(){
	
	initData();
	initView();


	return true;
}
ResideRegister::ResideRegister(QWidget *parent) :
    QWidget(parent),
    ui(new Ui::ResideRegister)
{
    ui->setupUi(this);
    initModel();
    initView();
}
Exemple #21
0
AccountPay::AccountPay(QWidget *parent) :
    QWidget(parent),
    ui(new Ui::AccountPay)
{
    ui->setupUi(this);
    initModel();
    initView();
}
Exemple #22
0
RoleDialog::RoleDialog(QWidget *parent) :
    QDialog(parent),
    ui(new Ui::RoleDialog)
{
    ui->setupUi(this);
    initModel();
    initView();
}
MonthlyResideStatistics::MonthlyResideStatistics(QWidget *parent) :
    QWidget(parent),
    ui(new Ui::MonthlyResideStatistics)
{
    ui->setupUi(this);
    initView();
    initHtml();
}
Exemple #24
0
NewDevice::NewDevice(QWidget *parent, const char *name) : QDialog(parent, name, true)
{
  m_nameValue = QString("");
  m_addressValue = 0;
  m_selectionOK = false;

  initView();
}
Exemple #25
0
//--------------------------------------------------------------
// restore device resources
void mgDX9Display::createBuffers()
{
  initView();

  m_textures->createBuffers();
  if (m_theApp != NULL)
    m_theApp->createBuffers();
}
	DirsTreeWidget::DirsTreeWidget (QWidget* parent /* = 0 */) :
		QTreeView (parent),
		model_()
	{
		initModel();
		initView();
		initContextMenu();
	}
Exemple #27
0
Previlege::Previlege(QWidget *parent) :
    QWidget(parent),
    ui(new Ui::Previlege)
{
    ui->setupUi(this);
    initModel();
    initView();
}
OperationLog::OperationLog(QWidget *parent) :
    QWidget(parent),
    ui(new Ui::OperationLog)
{
    ui->setupUi(this);
    initModel();
    initView();
}
AdviceRecord::AdviceRecord(QWidget *parent) :
    QWidget(parent),
    ui(new Ui::AdviceRecord)
{
    ui->setupUi(this);
    initModel();
    initView();
}
EmployeeBaseinfo::EmployeeBaseinfo(QWidget *parent) :
    QWidget(parent),
    ui(new Ui::EmployeeBaseinfo)
{
    ui->setupUi(this);
    initModel();
    initView();
}