⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 aknexgriddialogchangesize.cpp

📁 symbian 格子的生成和使用源代码 让你明白九宫格生成原理 适合游戏开发
💻 CPP
字号:
/* Copyright (c) 2004, Nokia. All rights reserved */

// INCLUDE FILES
#include "AknExGridDialogChangesize.h"
#include "AknExGridContainerAsSelection.h"
#include "AknExGrid.hrh"

// ============================ MEMBER FUNCTIONS ===============================

// -----------------------------------------------------------------------------
// CAknExGridDialogChangeSize::CAknExGridDialogChangeSize()
// C++ default constructor can NOT contain any code, that might leave.
// -----------------------------------------------------------------------------
//
CAknExGridDialogChangeSize::CAknExGridDialogChangeSize(
        CAknExGridContainerAsSelection* aContainer )
        : iContainer( aContainer )
    {
        // No implementation required
    }

// -----------------------------------------------------------------------------
// CAknExGridDialogChangeSize::PreLayoutDynInitL()
// Sets parameters before showing dialog.
// -----------------------------------------------------------------------------
//
void CAknExGridDialogChangeSize::PreLayoutDynInitL()
    {
    // Get the number editor value of columns and rows from the selection grid
    TInt numberOfColumns = iContainer->NumberOfColumns();
    TInt numberOfRows = iContainer->NumberOfRows();

    // Set the number editor values to ChangeSize dialog.
    SetNumberEditorValue( EAknExGridDialogChangeSizeColumns , numberOfColumns );
    SetNumberEditorValue( EAknExGridDialogChangeSizeRows , numberOfRows );
    }

// -----------------------------------------------------------------------------
// CAknExGridDialogChangeSize::OkToExitL()
// Updates member variables of CAknExGridContainerAsSelection
// -----------------------------------------------------------------------------
//
TBool CAknExGridDialogChangeSize::OkToExitL( TInt /*aKeycode*/ )
    {
    // the number editor value of columns and rows setted in dialog
    TInt numberOfColumns = NumberEditorValue(
                            EAknExGridDialogChangeSizeColumns );
    TInt numberOfRows = NumberEditorValue(
                            EAknExGridDialogChangeSizeRows );

    // Update the number of columns and rows in Selection Grid
    // with the number of columns and rows in ChangeSize dialog.
    iContainer->SetNumberOfColumns( numberOfColumns );
    iContainer->SetNumberOfRows( numberOfRows );

    return ETrue;

    }

// End of File

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -