本文整理汇总了C++中createButton函数的典型用法代码示例。如果您正苦于以下问题:C++ createButton函数的具体用法?C++ createButton怎么用?C++ createButton使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了createButton函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: QWidget
//! [0]
Window::Window(QWidget *parent)
: QWidget(parent)
{
confBrowseButton = createButton(tr("&Browse..."), SLOT(browse()));
startButton = createButton(tr("&Start"), SLOT(goDarc()));
startButton->setEnabled(false);
cancelButton = createButton(tr("&Cancel"), SLOT(cancel()));
homePath = QDir::homePath()+tr("/lotuce2/conf/");
configFileComboBox = createComboBox(homePath);
configFileLabel = new QLabel(tr("Darc Config File:"));
//! [0]
//! [1]
QGridLayout *mainLayout = new QGridLayout;
mainLayout->addWidget(configFileLabel, 0, 0);
mainLayout->addWidget(configFileComboBox, 0, 1);
mainLayout->addWidget(confBrowseButton, 0, 2);
mainLayout->addWidget(cancelButton, 1, 2);
mainLayout->addWidget(startButton, 1, 3);
setLayout(mainLayout);
setWindowTitle(tr("Lotuce2"));
resize(700, 300);
}
开发者ID:normansaez,项目名称:lotuce2,代码行数:30,代码来源:window.cpp
示例2: createButton
void ActionChoiceWindow::createButtons(
ActionNode* actions, const CEGUI::Point& center,
float radius, float angle, float angleWidth)
{
PushButton* button = NULL;
if (actions->isLeaf())
{
button = createButton(actions->getAction()->getName(), center);
}
else
{
if (actions->getGroup() != NULL)
{
button = createButton(actions->getGroup()->getName(), center);
}
const NodeSet children = actions->getChildren();
float angleStep = angleWidth / (float)children.size();
float ang = children.size()>1 ? angle - angleWidth : angle - 180;
for (NodeSet::const_iterator iter = children.begin();
iter != children.end(); iter++)
{
CEGUI::Point centerChild = getPositionOnCircle(center, radius, ang);
createButtons(*iter, centerChild, radius, ang, 60);
ang += angleStep;
}
}
actions->setButton(button);
if (button != NULL)
mWindow->addChildWindow(button);
}
开发者ID:BackupTheBerlios,项目名称:dsa-hl-svn,代码行数:33,代码来源:ActionChoiceWindow.cpp
示例3: QWidget
Advisor::Advisor(QWidget *parent)
: QWidget(parent)
{
showAgain = true;
//signalMapper = new QSignalMapper(this);
display = new QTextEdit();
display->setReadOnly(true);
display->setAlignment(Qt::AlignLeft);
//display->setMaxLength(20);
QFont font = display->font();
font.setPointSize(font.pointSize());
display->setFont(font);
QPushButton *adviceButton = createButton(tr("Advice"),SLOT(adviceClicked()));
QPushButton *weatherButton = createButton(tr("Weather"), SLOT(weatherClicked()));
QPushButton *reminderButton = createButton(tr("Reminder"), SLOT(reminderClicked()));
QPushButton *quitButton = createButton(tr("Quit"), SLOT(quitClicked()));
QGridLayout *mainLayout = new QGridLayout;
//mainLayout->setSizeConstraint(QLayout::SetFixedSize);
mainLayout->addWidget(display, 0,0,1,12);
mainLayout->addWidget(adviceButton, 1,0,1,12);
mainLayout->addWidget(weatherButton, 2, 0, 1, 12);
mainLayout->addWidget(reminderButton, 3, 0, 1, 12);
mainLayout->addWidget(quitButton, 4 ,0, 1, 12);
//connect(signalMapper, SIGNAL(mapped(QString)), this, SIGNAL(clicked(QString)));
setLayout(mainLayout);
setWindowTitle(tr("Advisor"));
}
开发者ID:lukewegryn,项目名称:gapp,代码行数:31,代码来源:Advisor.cpp
示例4: QWidget
// ----------------------------------------------------------------------
Calculator::Calculator(QWidget* pwgt/*= 0*/) : QWidget(pwgt)
{
m_plcd = new QLCDNumber(12);
m_plcd->setSegmentStyle(QLCDNumber::Flat);
m_plcd->setMinimumSize(150, 50);
QChar aButtons[4][4] = {{'7', '8', '9', '/'},
{'4', '5', '6', '*'},
{'1', '2', '3', '-'},
{'0', '.', '=', '+'}
};
//Layout setup
QGridLayout* ptopLayout = new QGridLayout;
ptopLayout->addWidget(m_plcd, 0, 0, 1, 4);
ptopLayout->addWidget(createButton("CE"), 1, 3);
for (int i = 0; i < 4; ++i)
{
for (int j = 0; j < 4; ++j)
{
ptopLayout->addWidget(createButton(aButtons[i][j]), i + 2, j);
}
}
setLayout(ptopLayout);
}
开发者ID:MakSim345,项目名称:QT-Dev,代码行数:27,代码来源:mainwindow.cpp
示例5: QLabel
CreateFileDialog::CreateFileDialog(QTextEdit *textEdit, QString *fileName, QMainWindow *mainWindow)
{
this->textEdit = textEdit;
this->fileName = fileName;
this->mainWindow = mainWindow;
fileNameEdit = new QLineEdit;
fileNameLabel = new QLabel(tr("Имя файла:"));
okButton = createButton(tr("&Ok"), SLOT(createFile()));
cancelButton = createButton(tr("&Cancel"), SLOT(close()));
QHBoxLayout *buttonsLayout = new QHBoxLayout;
buttonsLayout->addStretch();
buttonsLayout->addWidget(okButton);
buttonsLayout->addWidget(cancelButton);
QGridLayout *mainLayout = new QGridLayout;
mainLayout->addWidget(fileNameLabel, 0, 0, 1, 3);
mainLayout->addWidget(fileNameEdit, 1, 0, 1, 3);
mainLayout->addLayout(buttonsLayout, 2, 0, 1, 3);
setLayout(mainLayout);
setWindowTitle(tr("New file"));
resize(200, 100);
subwindow = emarea->addSubWindow(this, windowType());
}
开发者ID:AleksandraButrova,项目名称:embox,代码行数:27,代码来源:createfiledialog.cpp
示例6: QWidget
//! [0]
Window::Window(QWidget *parent)
: QWidget(parent)
{
browseButton = createButton(tr("&Browse..."), SLOT(browse()));
findButton = createButton(tr("&Find"), SLOT(find()));
fileComboBox = createComboBox(tr("*"));
textComboBox = createComboBox();
directoryComboBox = createComboBox(QDir::currentPath());
fileLabel = new QLabel(tr("Named:"));
textLabel = new QLabel(tr("Containing text:"));
directoryLabel = new QLabel(tr("In directory:"));
filesFoundLabel = new QLabel;
createFilesTable();
//! [0]
//! [1]
QGridLayout *mainLayout = new QGridLayout;
mainLayout->addWidget(fileLabel, 0, 0);
mainLayout->addWidget(fileComboBox, 0, 1, 1, 2);
mainLayout->addWidget(textLabel, 1, 0);
mainLayout->addWidget(textComboBox, 1, 1, 1, 2);
mainLayout->addWidget(directoryLabel, 2, 0);
mainLayout->addWidget(directoryComboBox, 2, 1);
mainLayout->addWidget(browseButton, 2, 2);
mainLayout->addWidget(filesTable, 3, 0, 1, 3);
mainLayout->addWidget(filesFoundLabel, 4, 0, 1, 2);
mainLayout->addWidget(findButton, 4, 2);
setLayout(mainLayout);
setWindowTitle(tr("Find Files"));
resize(700, 300);
}
开发者ID:SchleunigerAG,项目名称:WinEC7_Qt5.3.1_Fixes,代码行数:36,代码来源:window.cpp
示例7: createButton
void PhysicsClientExample::createButtons()
{
bool isTrigger = false;
if (m_guiHelper && m_guiHelper->getParameterInterface())
{
m_guiHelper->getParameterInterface()->removeAllParameters();
createButton("Load URDF",CMD_LOAD_URDF, isTrigger);
createButton("Step Sim",CMD_STEP_FORWARD_SIMULATION, isTrigger);
createButton("Send Bullet Stream",CMD_SEND_BULLET_DATA_STREAM, isTrigger);
createButton("Get State",CMD_REQUEST_ACTUAL_STATE, isTrigger);
createButton("Send Desired State",CMD_SEND_DESIRED_STATE, isTrigger);
createButton("Create Box Collider",CMD_CREATE_BOX_COLLISION_SHAPE,isTrigger);
createButton("Create Cylinder Body",CMD_CREATE_RIGID_BODY,isTrigger);
createButton("Reset Simulation",CMD_RESET_SIMULATION,isTrigger);
createButton("Initialize Pose",CMD_INIT_POSE, isTrigger);
createButton("Set gravity", CMD_SEND_PHYSICS_SIMULATION_PARAMETERS, isTrigger);
if (m_physicsClientHandle && m_selectedBody>=0)
{
int numJoints = b3GetNumJoints(m_physicsClientHandle,m_selectedBody);
for (int i=0;i<numJoints;i++)
{
b3JointInfo info;
b3GetJointInfo(m_physicsClientHandle,m_selectedBody,i,&info);
b3Printf("Joint %s at q-index %d and u-index %d\n",info.m_jointName,info.m_qIndex,info.m_uIndex);
if (info.m_flags & JOINT_HAS_MOTORIZED_POWER)
{
if (m_numMotors<MAX_NUM_MOTORS)
{
char motorName[1024];
sprintf(motorName,"%s q", info.m_jointName);
// MyMotorInfo2* motorInfo = &m_motorTargetVelocities[m_numMotors];
MyMotorInfo2* motorInfo = &m_motorTargetPositions[m_numMotors];
motorInfo->m_velTarget = 0.f;
motorInfo->m_posTarget = 0.f;
motorInfo->m_uIndex = info.m_uIndex;
motorInfo->m_qIndex = info.m_qIndex;
// SliderParams slider(motorName,&motorInfo->m_velTarget);
// slider.m_minVal=-4;
// slider.m_maxVal=4;
SliderParams slider(motorName,&motorInfo->m_posTarget);
slider.m_minVal=-4;
slider.m_maxVal=4;
if (m_guiHelper && m_guiHelper->getParameterInterface())
{
m_guiHelper->getParameterInterface()->registerSliderFloatParameter(slider);
}
m_numMotors++;
}
}
}
}
}
}
开发者ID:artoowang,项目名称:bullet3,代码行数:59,代码来源:PhysicsClientExample.cpp
示例8: curDiag
DialogPanel::DialogPanel(const sf::Vector2i& res, const std::vector<std::string>& dialog, const sf::Font& font, const sf::Color& color, const float& outline, const sf::Color& outlineColor)
: curDiag(0), dialogue(dialog)
{
panelRect = sf::Shape(sf::Shape::Rectangle(sf::Vector2f(20, res.y - 170), sf::Vector2f(res.x - 100, res.y - 20), color, outline, outlineColor));
createString("dialogString", dialog.at(curDiag), font, 24, sf::Vector2f(30, res.y - 160));
createButton("nextButton", next, sf::Vector2f(res.x - 170, res.y - 60), 60, "Next", font);
createButton("previousButton", previous, sf::Vector2f(res.x - 300, res.y - 60), 100, "Previous", font, sf::Color(100, 100, 120, 255));
}
开发者ID:Liag,项目名称:shmup-base-engine,代码行数:8,代码来源:dialogpanel.cpp
示例9: instance
Gui::Gui(HINSTANCE instance, CameraTranslator* frontCameraTranslator, CameraTranslator* rearCameraTranslator, Blobber* blobberFront, Blobber* blobberRear, int width, int height) : instance(instance), frontCameraTranslator(frontCameraTranslator), rearCameraTranslator(rearCameraTranslator), blobberFront(blobberFront), blobberRear(blobberRear), width(width), height(height), activeWindow(NULL), quitRequested(false) {
WNDCLASSEX wClass;
ZeroMemory(&wClass, sizeof(WNDCLASSEX));
wClass.cbClsExtra = NULL;
wClass.cbSize = sizeof(WNDCLASSEX);
wClass.cbWndExtra = NULL;
wClass.hbrBackground = (HBRUSH)COLOR_WINDOW;
wClass.hCursor = LoadCursor(NULL, IDC_ARROW);
wClass.hIcon = LoadIcon(NULL, IDI_APPLICATION);
wClass.hIconSm = LoadIcon(NULL, IDI_APPLICATION);
wClass.hInstance = instance;
wClass.lpfnWndProc = (WNDPROC)WinProc;
wClass.lpszClassName = "Window Class";
wClass.lpszMenuName = NULL;
wClass.style = CS_HREDRAW | CS_VREDRAW;
if (!RegisterClassEx(&wClass)) {
int nResult = GetLastError();
MessageBox(
NULL,
"Window class creation failed",
"Window Class Failed",
MB_ICONERROR
);
}
ZeroMemory(&msg, sizeof(MSG));
addMouseListener(this);
mouseX = 0;
mouseY = 0;
mouseDown = false;
mouseBtn = MouseListener::MouseBtn::LEFT;
brushRadius = 50;
frontRGB = createWindow(width, height, "Camera 1 RGB");
rearRGB = createWindow(width, height, "Camera 2 RGB");
frontClassification = createWindow(width, height, "Camera 1 classification");
rearClassification = createWindow(width, height, "Camera 2 classification");
selectedColorName = "";
Blobber::Color* color;
for (int i = 0; i < blobberFront->getColorCount(); i++) {
color = blobberFront->getColor(i);
createButton(color->name, 20, 40 + i * 18, 160, 1);
}
createButton("Clear all", 20 + 160 + 10, 40, 100, 2);
clearSelectedBtn = createButton("Clear selected", 20 + 280 + 10, 40, 140, 3, false);
createButton("Quit", Config::cameraWidth - 80, 20, 60, 4);
}
开发者ID:zidik,项目名称:soccervision,代码行数:58,代码来源:Gui.cpp
示例10: createButton
void MainWindow::createButtonLayout() {
buttonLayout=new QHBoxLayout;
buttonupdate = createButton(tr("Update Weight"), this, SLOT(updateWeight()));
buttonexit = createButton(tr("Quit"), this, SLOT(close()));
buttonLayout->addStretch();
buttonLayout->addWidget(buttonupdate);
buttonLayout->addWidget(buttonexit);
}
开发者ID:sourceonly,项目名称:safecheck,代码行数:9,代码来源:mainwindow.cpp
示例11: QDialog
//! [0]
PathSetting::PathSetting(QWidget *parent)
: QDialog(parent)
{
readSettings();
_dcmrawpathLineEdit = createLineEdit(_dcmrawpath);
_outputpathLineEdit = createLineEdit(_outputpath);
_archivepathLineEdit = createLineEdit(_archivepath);
_dcmrawpathbrowseButton = createButton(tr("&Browse..."), SLOT(browsedcmrawpath()));
_outputpathbrowseButton = createButton(tr("&Browse..."), SLOT(browseoutputpath()));
_archivepathbrowseButton = createButton(tr("&Browse..."), SLOT(browsearchivepath()));
_dcmrawpathLabel = new QLabel("Dicom-RAW Path:");
_outputpathLabel = new QLabel("Output Path: ");
_cb_archiveactive = new QCheckBox("Auto Archive:");
_cb_archiveactive->setChecked(_archiveactive);
archiveactive();
connect(_cb_archiveactive, SIGNAL(stateChanged(int)), this, SLOT(archiveactive()));
_spacer_line = new QSpacerItem( 450, 20, QSizePolicy::Minimum,
QSizePolicy::Expanding );
QPushButton *pb_ok = createButton("Ok", SLOT(okbutton()));
QPushButton *pb_cancle = createButton("Cancel", SLOT(cancelbutton()));
QHBoxLayout* buttonsLayout = new QHBoxLayout;
//buttonsLayout->addStretch();
buttonsLayout->addItem(_spacer_line);
buttonsLayout->addWidget(pb_ok);
buttonsLayout->addWidget(pb_cancle);
QGridLayout *pathLayout = new QGridLayout;
pathLayout->addWidget(_dcmrawpathLabel, 0, 0);
pathLayout->addWidget(_dcmrawpathLineEdit, 0, 1);
pathLayout->addWidget(_dcmrawpathbrowseButton, 0, 2);
pathLayout->addWidget(_outputpathLabel, 1, 0);
pathLayout->addWidget(_outputpathLineEdit, 1, 1);
pathLayout->addWidget(_outputpathbrowseButton, 1, 2);
pathLayout->addWidget(_cb_archiveactive, 3, 0);
pathLayout->addWidget(_archivepathLineEdit, 3, 1);
pathLayout->addWidget(_archivepathbrowseButton, 3, 2);
QVBoxLayout *layout = new QVBoxLayout;
layout->addLayout(pathLayout);
layout->addLayout(buttonsLayout);
setLayout(layout);
setWindowTitle(tr("Path Settings"));
//resize(600, 175);
}
开发者ID:IMTtugraz,项目名称:AGILE,代码行数:58,代码来源:pathsetting.cpp
示例12: Private
Private()
: position(KoFlake::TopLeftCorner)
{
topLeft = createButton(KoFlake::TopLeftCorner);
topLeft->setChecked(true);
topRight = createButton(KoFlake::TopRightCorner);
center = createButton(KoFlake::CenteredPosition);
bottomRight = createButton(KoFlake::BottomRightCorner);
bottomLeft = createButton(KoFlake::BottomLeftCorner);
}
开发者ID:KDE,项目名称:calligra,代码行数:10,代码来源:KoPositionSelector.cpp
示例13: createButton
bool ChoiceLayer::init()
{
if (!Layer::init())
return false;
auto button0 = createButton(0);
auto button1 = createButton(1);
return true;
}
开发者ID:mdifferent,项目名称:Sanyu-with-cocos2dx-3.2,代码行数:10,代码来源:ChoiceLayer.cpp
示例14: createButton
//! [8]
void Screenshot::createButtonsLayout()
{
newScreenshotButton = createButton(tr("New Screenshot"), this, SLOT(newScreenshot()));
saveScreenshotButton = createButton(tr("Save Screenshot"), this, SLOT(saveScreenshot()));
quitScreenshotButton = createButton(tr("Quit"), this, SLOT(close()));
buttonsLayout = new QHBoxLayout;
buttonsLayout->addStretch();
buttonsLayout->addWidget(newScreenshotButton);
buttonsLayout->addWidget(saveScreenshotButton);
buttonsLayout->addWidget(quitScreenshotButton);
}
开发者ID:CodeDJ,项目名称:qt5-hidpi,代码行数:13,代码来源:screenshot.cpp
示例15: initializeChooseWorldWindow
Widget* initializeChooseWorldWindow(SDL_Surface* windowSurface) {
Widget* window = createWindow(windowSurface);
char stringBuffer[SELECT_WORLD_STRING_LENGTH];
char digitBuffer[2];
strcpy(stringBuffer, SELECT_WORLD_COOSE_TEXT);
SDL_Rect panelRect = { 300, 150, 400, 600 };
Widget* panel = createPanel(windowSurface, panelRect, SDL_MapRGB(pixel_format, COLOR_R, COLOR_G, COLOR_B));
addChild(window, panel);
SDL_Rect labelRect = { 35, 20, 20, 20 };
Widget* label;
if (currSelectionWindow == LOAD) {
label = createLabel(labelRect, LOAD_GAME_TITLE, window->image, 0, 0, bitmapfont1, NULL);
}
else if (currSelectionWindow == EDIT) {
label = createLabel(labelRect, EDIT_GAME_TITLE, window->image, 0, 0, bitmapfont1, NULL);
}
else {
label = createLabel(labelRect, SAVE_GAME_TITLE, window->image, 0, 0, bitmapfont1, NULL);
}
addChild(panel, label);
SDL_Rect buttonSelectRect = { 20, 60, 20, 20 };
SDL_Rect buttonDoneRect = { 20, 130, 20, 20 };
SDL_Rect buttonBackRect = { 20, 200, 20, 20 };
SDL_Rect buttonUpRect = { 186, 60, 20, 20 };
SDL_Rect buttonDownRect = { 186, 84, 20, 20 };
sprintf(digitBuffer, "%d", currWorld);
strcat(stringBuffer, digitBuffer);
Widget* buttonSelect = createButton(buttonSelectRect, stringBuffer, window->image, MARKED, "select_button.bmp", SDL_MapRGB(pixel_format, COLOR_R, COLOR_G, COLOR_B), 25, 10, BUTTON_SELECT_WORLD, bitmapfont1);
addChild(panel, buttonSelect);
Widget* buttonDone = createButton(buttonDoneRect, SELECT_WORLD_DONE_TEXT, window->image, REGULAR, "button.bmp", SDL_MapRGB(pixel_format, COLOR_R, COLOR_G, COLOR_B), 25, 10, BUTTON_SELECT_WORLD_DONE, bitmapfont1);
addChild(panel, buttonDone);
Widget* buttonBack = createButton(buttonBackRect, SELECT_WORLD_BACK_TEXT, window->image, REGULAR, "button.bmp", SDL_MapRGB(pixel_format, COLOR_R, COLOR_G, COLOR_B), 20, 10, BUTTON_SELECT_WORLD_BACK, bitmapfont1);
addChild(panel, buttonBack);
Widget* buttonUp = createButton(buttonUpRect, NULL, window->image, REGULAR, "up_button.bmp", SDL_MapRGB(pixel_format, COLOR_R, COLOR_G, COLOR_B), 20, 10, BUTTON_SELECT_WORLD_INCREASE, bitmapfont1);
addChild(panel, buttonUp);
Widget* buttonDown = createButton(buttonDownRect, NULL, window->image, REGULAR, "down_button.bmp", SDL_MapRGB(pixel_format, COLOR_R, COLOR_G, COLOR_B), 20, 10, BUTTON_SELECT_WORLD_DECREASE, bitmapfont1);
addChild(panel, buttonDown);
return window;
}
开发者ID:ilayluz,项目名称:SoftwareProject,代码行数:51,代码来源:SelectWorld.c
示例16: Point
void TDDSubMenu::setupHeader(const Color4B &headerColor)
{
GLfloat parentH = this->getContentSize().height;
GLfloat width = this->getContentSize().width;
GLfloat height = kHeaderHeight;
LayerColor *headerLayer = LayerColor::create(headerColor, width, height);
Point pos = Point(0, parentH - height);
headerLayer->setPosition(pos);
this->addChild(headerLayer);
// Setting Buttons
float scale = TDDHelper::getBestScale();
// Size screenSize = TDDHelper::getScreenSize();
int midY = height/2;
int buttonW = (int)(scale * 50);
int buttonH = height;
int leftButtonX = buttonW / 2;
int rightButtonX = width - leftButtonX;
int midX = width/2;
Size size = Size(buttonW, buttonH);
ControlButton *button;
pos.x = leftButtonX;
pos.y = midY;
button = createButton("back", kActionTagBack, pos, size);
headerLayer->addChild(button);
mBackButton = button;
pos.x = rightButtonX;
pos.y = midY;
button = createButton("hide", kActionTagToggle, pos, size);
headerLayer->addChild(button);
button->addTargetWithActionForControlEvents(this,
cccontrol_selector(TDDSubMenu::touchUpInsideAction),
Control::EventType::TOUCH_UP_INSIDE);
mToggleButton = button;
// Label
Label *title = Label::createWithSystemFont("MENU", "Arial", 15);
title->setColor(Color3B::WHITE);
title->setPosition(Point(midX, midY));
headerLayer->addChild(title);
//
mHeaderLayer = headerLayer;
}
开发者ID:dwdcth,项目名称:SimpleTDD-cocos2dx,代码行数:51,代码来源:TDDSubMenu.cpp
示例17: QDialogButtonBox
QDialogButtonBox* DiagramToolBox::createButtonBox()
{
QList<QAction*> actions = DiagramToolBox::actions();
mButtonBox = new QDialogButtonBox();
mButtonBox->setCenterButtons(true);
mButtonBox->addButton(createButton(actions[SelectModeAction]), QDialogButtonBox::ActionRole);
mButtonBox->addButton(createButton(actions[ScrollModeAction]), QDialogButtonBox::ActionRole);
mButtonBox->addButton(createButton(actions[ZoomModeAction]), QDialogButtonBox::ActionRole);
mButtonBox->addButton(createButton(
mDiagramView->actions()[DiagramView::PropertiesAction]), QDialogButtonBox::ActionRole);
return mButtonBox;
}
开发者ID:jaallen85,项目名称:jade-legacy,代码行数:15,代码来源:DiagramToolBox.cpp
示例18: QBoxLayout
MainWindow::MainWindow() {
mainLayout = new QBoxLayout(QBoxLayout::TopToBottom, this);
setWindowTitle("Fizjoterapia");
createButton("Nowa wizyta",
"Rozpocznij tworzenie nowej wizyty",
SLOT(clickedNewVisit()));
createButton("Pacjenci i choroby",
"Przeglądaj pacjentów i historię chorób",
SLOT(clickedHistory()));
createButton("Dodaj pacjenta",
"Dodaj nowego pacjenta do bazy",
SLOT(clickedNewPatient()));
}
开发者ID:mluszczyk,项目名称:fizjoterapia,代码行数:15,代码来源:MainWindow.cpp
示例19: initMenuRender
void initMenuRender()
{
Background = createPicture(BACKGROUNDPATH,0,0,1);
choixJeu = createButton("Play",100,150,5);
choixStat = createButton("Statistic",100,210,5);
choixQuit = createButton("Exit",100,270,5);
choixJeu.callback = *CMode;
choixQuit.callback = *CGameQuit;
choixStat.callback = *CStat;
renderinitialised=1;
}
开发者ID:djeck,项目名称:SixPrend,代码行数:15,代码来源:menu.c
示例20: showMessage
int QUMessageBox::showMessage(const QString &title, const QString &msg, const QStringList &buttons, int defaultIndex, int widthHint) {
/* debug start */
delete one;
delete two;
delete three;
/* debug end */
if(defaultIndex == -1)
defaultIndex = (buttons.size() / 2 - 1);
for(int i = 1; i < buttons.size(); i += 2) {
buttonLayout->addWidget(createButton(
QIcon(buttons.at(i - 1)),
buttons.at(i),
(i - 1) / 2 == defaultIndex));
}
setWindowTitle(title);
message->setText(msg);
resize(widthHint > -1 ? widthHint : width(), minimumSizeHint().height());
exec();
return _choice;
}
开发者ID:escaped,项目名称:uman,代码行数:26,代码来源:QUMessageBox.cpp
注:本文中的createButton函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论