本文整理汇总了C++中setIcon函数的典型用法代码示例。如果您正苦于以下问题:C++ setIcon函数的具体用法?C++ setIcon怎么用?C++ setIcon使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了setIcon函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: setIcon
void EnfuseStackItem::setProcessedIcon(const QIcon& icon)
{
setIcon(1, icon);
setIcon(0, QIcon(d->thumb));
}
开发者ID:UIKit0,项目名称:digikam,代码行数:5,代码来源:enfusestack.cpp
示例2: SetSortOrderButton
void PlaylistWidget::SetSortOrderButton ()
{
auto sortButton = new QToolButton;
sortButton->setIcon (Core::Instance ().GetProxy ()->GetIcon ("view-sort-ascending"));
sortButton->setPopupMode (QToolButton::InstantPopup);
auto menu = new QMenu (tr ("Sorting"));
sortButton->setMenu (menu);
auto getInts = [] (const QList<SortingCriteria>& crit) -> QVariantList
{
QVariantList result;
std::transform (crit.begin (), crit.end (), std::back_inserter (result),
[] (decltype (crit.front ()) item) { return static_cast<int> (item); });
return result;
};
typedef QPair<QString, QList<SortingCriteria>> SortPair_t;
QList<SortPair_t> stdSorts;
stdSorts << SortPair_t (tr ("Artist / Year / Album / Track number"),
{
SortingCriteria::Artist,
SortingCriteria::Year,
SortingCriteria::Album,
SortingCriteria::TrackNumber
});
stdSorts << SortPair_t (tr ("Artist / Track title"),
{
SortingCriteria::Artist,
SortingCriteria::TrackTitle
});
stdSorts << SortPair_t (tr ("File path"),
{
SortingCriteria::DirectoryPath,
SortingCriteria::FileName
});
stdSorts << SortPair_t (tr ("No sort"), {});
const auto& currentCriteria = Player_->GetSortingCriteria ();
auto sortGroup = new QActionGroup (this);
bool wasChecked = false;
Q_FOREACH (const auto& pair, stdSorts)
{
auto act = menu->addAction (pair.first);
act->setProperty ("SortInts", getInts (pair.second));
act->setCheckable (true);
sortGroup->addAction (act);
if (pair.second == currentCriteria)
{
act->setChecked (true);
wasChecked = true;
}
else
act->setChecked (false);
connect (act,
SIGNAL (triggered ()),
this,
SLOT (handleStdSort ()));
}
开发者ID:SboichakovDmitriy,项目名称:leechcraft,代码行数:61,代码来源:playlistwidget.cpp
示例3: PlaceableItem
ToiletItem::ToiletItem(int id) : PlaceableItem(id, ToiletTile::_id) {
setNameID("toiletItem");
setIcon("itemtoilet", 0);
}
开发者ID:jv110,项目名称:MrCrayfishFurnitureMod-MCPE,代码行数:4,代码来源:ToiletItem.cpp
示例4: UIAction
/* UIActionSimple stuff: */
UIActionSimple::UIActionSimple(QObject *pParent, const QString &strIcon, const QString &strIconDis)
: UIAction(pParent, UIActionType_Simple)
{
if (!strIcon.isNull())
setIcon(UIIconPool::iconSet(strIcon, strIconDis));
}
开发者ID:VirtualMonitor,项目名称:VirtualMonitor,代码行数:7,代码来源:UIActionPool.cpp
示例5: aListView
/*!
* Function create visual objects and connect slots.
*/
void
CatalogForm::init()
{
ListView = new aListView(centralWidget(), "listView");
ListView->setGeometry(30,30,400,300);
ListView->setSizePolicy(QSizePolicy::Expanding,QSizePolicy::Expanding);
LineEdit = new aLineEdit(centralWidget(), "lineEdit");
ListHint = new aListBox(centralWidget(), "listBox");
StatusFrame = new Q3Frame(centralWidget(), "statusFrame");
ListView->setRootIsDecorated( true );
StatusFrame->setGeometry( QRect( 0, 0, 50,5 ) );
StatusFrame->setFrameShape( Q3Frame::StyledPanel );
StatusFrame->setFrameShadow( Q3Frame::Raised );
StatusFrame->hide();
GridLayout = new Q3GridLayout(centralWidget(), 1, 1, 11, 6, "GridLayout");
GridLayout->addMultiCellWidget( ListView, 2,3, 0 , 0 );
GridLayout->addWidget( LineEdit, 1, 0 );
GridLayout->addWidget( bCancel, 3, 1 );
QLabel *lb = new QLabel(tr("Search"),centralWidget());
lb->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)0, 0, 0, lb->sizePolicy().hasHeightForWidth() ) );
GridLayout->addWidget( lb ,0,0);
QSpacerItem* spacer = new QSpacerItem( 20, 390, QSizePolicy::Minimum, QSizePolicy::Expanding );
GridLayout->addMultiCell( spacer, 0,2,1, 1);
QPixmap pix= rcIcon("cat.png");
if(pix.isNull())
{
aLog::print(aLog::Info, tr("Catalog Form image cat.png not loaded"));
}
else
{
setIcon( pix );
}
//setFocusPolicy();
// connect(this, SIGNAL (destoyed()),
// this, SLOT (close());
connect(ListView, SIGNAL (newItemRequest(Q3ListViewItem*)),
this, SLOT (new_item(Q3ListViewItem*)));
connect(ListView, SIGNAL (newGroupRequest(Q3ListViewItem*)),
this, SLOT (new_group(Q3ListViewItem*)));
connect(ListView, SIGNAL (delItemRequest(Q3ListViewItem*)),
this, SLOT (del_item(Q3ListViewItem*)));
connect(ListView, SIGNAL (markDeletedRequest(Q3ListViewItem*)),
this, SLOT (mark_deleted(Q3ListViewItem*)));
connect(ListView, SIGNAL (undoMarkDeletedRequest(Q3ListViewItem*)),
this, SLOT (undo_mark_deleted(Q3ListViewItem*)));
connect(ListView, SIGNAL (editRequest(Q3ListViewItem*, int)),
this, SLOT (edit(Q3ListViewItem*, int)));
connect(ListView, SIGNAL (selectRequest(Q3ListViewItem*)),
this, SLOT (select(Q3ListViewItem*)));
connect(LineEdit, SIGNAL (delayTextChanged(const QString&)),
this, SLOT (find(const QString&)));
connect(LineEdit, SIGNAL (keyArrowPressed()),
this, SLOT (pressArrow()));
connect(LineEdit, SIGNAL (keyEnterPressed()),
this, SLOT (go()));
connect(ListView, SIGNAL (expanded ( Q3ListViewItem *)),
this, SLOT (onLoadElements( Q3ListViewItem *)));
connect(ListHint, SIGNAL (lostFocus()),
LineEdit, SLOT (setFocus()));
connect(ListHint, SIGNAL (lostFocus()),
StatusFrame, SLOT (hide()));
connect(ListHint, SIGNAL (lostFocus()),
ListHint, SLOT (hide()));
connect(ListHint, SIGNAL (keyArrowLRPressed()),
LineEdit, SLOT (setFocus()));
connect(ListHint, SIGNAL (keyArrowLRPressed(const QString&)),
this, SLOT (setText(const QString&)));
connect(ListHint, SIGNAL (keyEnterPressed()),
this, SLOT (go()));
connect(ListHint, SIGNAL (sendMessage(const QString &)),
this->statusBar(), SLOT (message( const QString &)));
connect(ListView, SIGNAL (sendMessage(const QString &)),
this->statusBar(), SLOT (message( const QString &)));
//.........这里部分代码省略.........
开发者ID:heiheshang,项目名称:ananas-labs-qt4,代码行数:101,代码来源:catalogform.cpp
示例6: main
int main(int argc, char ** argv)
{
#ifdef WIN32
SetUnhandledExceptionFilter( UnhandledExceptionProc );
#endif
for(int i = 1; i < argc;) {
int ret = argsHandler(argc, argv, i);
if(!ret) {
// ignore unknown arg
i++;
}
}
if ( cg_printVersion ) {
printf( "%s\n", PACKAGE_STRING );
return 0;
}
if ( cg_printHelp ) {
printHelp( argv[0] );
return 0;
}
std::unique_ptr<SplashWindow> splashWindow;
try {
// start recording backtrace
spades::reflection::Backtrace::StartBacktrace();
SPADES_MARK_FUNCTION();
// show splash window
// NOTE: splash window uses image loader, which assumes backtrace is already initialized.
splashWindow.reset(new SplashWindow());
auto showSplashWindowTime = SDL_GetTicks();
auto pumpEvents = [&splashWindow] { splashWindow->PumpEvents(); };
// initialize threads
spades::Thread::InitThreadSystem();
spades::DispatchQueue::GetThreadQueue()->MarkSDLVideoThread();
SPLog("Package: " PACKAGE_STRING);
// setup user-specific default resource directories
#ifdef WIN32
static wchar_t buf[4096];
GetModuleFileNameW(NULL, buf, 4096);
std::wstring appdir = buf;
appdir = appdir.substr(0, appdir.find_last_of(L'\\')+1);
if(SUCCEEDED(SHGetFolderPathW(NULL, CSIDL_APPDATA, NULL, 0, buf))) {
std::wstring datadir = buf;
datadir += L"\\OpenSpades\\Resources";
spades::FileManager::AddFileSystem(new spades::DirectoryFileSystem(Utf8FromWString(datadir.c_str()), true));
}
spades::FileManager::AddFileSystem(new spades::DirectoryFileSystem(Utf8FromWString((appdir + L"Resources").c_str()), false));
//fltk has a console window on windows (can disable while building, maybe use a builtin console for a later release?)
HWND hCon = GetConsoleWindow();
if( NULL != hCon ) {
setIcon( hCon );
}
#elif defined(__APPLE__)
std::string home = getenv("HOME");
spades::FileManager::AddFileSystem
(new spades::DirectoryFileSystem("./Resources", false));
// OS X application is made of Bundle, which contains its own Resources directory.
{
char *baseDir = SDL_GetBasePath();
if(baseDir) {
spades::FileManager::AddFileSystem
(new spades::DirectoryFileSystem(baseDir, false));
SDL_free(baseDir);
}
}
spades::FileManager::AddFileSystem
(new spades::DirectoryFileSystem(home+"/Library/Application Support/OpenSpades/Resources", true));
#else
std::string home = getenv("HOME");
spades::FileManager::AddFileSystem
(new spades::DirectoryFileSystem("./Resources", false));
spades::FileManager::AddFileSystem(new spades::DirectoryFileSystem(CMAKE_INSTALL_PREFIX "/" OPENSPADES_INSTALL_RESOURCES, false));
std::string xdg_data_home = home+"/.local/share";
if (getenv("XDG_DATA_HOME") == NULL) {
SPLog("XDG_DATA_HOME not defined. Assuming that XDG_DATA_HOME is ~/.local/share");
}
else {
std::string xdg_data_home = getenv("XDG_DATA_HOME");
SPLog("XDG_DATA_HOME is %s", xdg_data_home.c_str());
}
//.........这里部分代码省略.........
开发者ID:mactec0,项目名称:openspades,代码行数:101,代码来源:Main.cpp
示例7: UIAction
UIActionSimple::UIActionSimple(UIActionPool *pParent,
const QIcon& icon)
: UIAction(pParent, UIActionType_Simple)
{
setIcon(icon);
}
开发者ID:zBMNForks,项目名称:virtualbox-org-svn-vbox-trunk,代码行数:6,代码来源:UIActionPool.cpp
示例8: setIcon
/*!
\obsolete
Use setIcon() instead.
*/
void QToolButton::setOffIconSet(const QIcon& set)
{
setIcon(set);
}
开发者ID:phen89,项目名称:rtqt,代码行数:9,代码来源:qtoolbutton.cpp
示例9: setColor
void UIWidget::parseBaseStyle(const OTMLNodePtr& styleNode)
{
// load styles used by all widgets
for(const OTMLNodePtr& node : styleNode->children()) {
if(node->tag() == "color")
setColor(node->value<Color>());
else if(node->tag() == "x")
setX(node->value<int>());
else if(node->tag() == "y")
setY(node->value<int>());
else if(node->tag() == "pos")
setPosition(node->value<Point>());
else if(node->tag() == "width")
setWidth(node->value<int>());
else if(node->tag() == "height")
setHeight(node->value<int>());
else if(node->tag() == "rect")
setRect(node->value<Rect>());
else if(node->tag() == "background")
setBackgroundColor(node->value<Color>());
else if(node->tag() == "background-color")
setBackgroundColor(node->value<Color>());
else if(node->tag() == "background-offset-x")
setBackgroundOffsetX(node->value<int>());
else if(node->tag() == "background-offset-y")
setBackgroundOffsetY(node->value<int>());
else if(node->tag() == "background-offset")
setBackgroundOffset(node->value<Point>());
else if(node->tag() == "background-width")
setBackgroundWidth(node->value<int>());
else if(node->tag() == "background-height")
setBackgroundHeight(node->value<int>());
else if(node->tag() == "background-size")
setBackgroundSize(node->value<Size>());
else if(node->tag() == "background-rect")
setBackgroundRect(node->value<Rect>());
else if(node->tag() == "icon")
setIcon(stdext::resolve_path(node->value(), node->source()));
else if(node->tag() == "icon-source")
setIcon(stdext::resolve_path(node->value(), node->source()));
else if(node->tag() == "icon-color")
setIconColor(node->value<Color>());
else if(node->tag() == "icon-offset-x")
setIconOffsetX(node->value<int>());
else if(node->tag() == "icon-offset-y")
setIconOffsetY(node->value<int>());
else if(node->tag() == "icon-offset")
setIconOffset(node->value<Point>());
else if(node->tag() == "icon-width")
setIconWidth(node->value<int>());
else if(node->tag() == "icon-height")
setIconHeight(node->value<int>());
else if(node->tag() == "icon-size")
setIconSize(node->value<Size>());
else if(node->tag() == "icon-rect")
setIconRect(node->value<Rect>());
else if(node->tag() == "opacity")
setOpacity(node->value<float>());
else if(node->tag() == "enabled")
setEnabled(node->value<bool>());
else if(node->tag() == "visible")
setVisible(node->value<bool>());
else if(node->tag() == "checked")
setChecked(node->value<bool>());
else if(node->tag() == "dragable")
setChecked(node->value<bool>());
else if(node->tag() == "on")
setOn(node->value<bool>());
else if(node->tag() == "focusable")
setFocusable(node->value<bool>());
else if(node->tag() == "phantom")
setPhantom(node->value<bool>());
else if(node->tag() == "size")
setSize(node->value<Size>());
else if(node->tag() == "fixed-size")
setFixedSize(node->value<bool>());
else if(node->tag() == "clipping")
setClipping(node->value<bool>());
else if(node->tag() == "border") {
auto split = stdext::split(node->value(), " ");
if(split.size() == 2) {
setBorderWidth(stdext::safe_cast<int>(split[0]));
setBorderColor(stdext::safe_cast<Color>(split[1]));
} else
throw OTMLException(node, "border param must have its width followed by its color");
}
else if(node->tag() == "border-width")
setBorderWidth(node->value<int>());
else if(node->tag() == "border-width-top")
setBorderWidthTop(node->value<int>());
else if(node->tag() == "border-width-right")
setBorderWidthRight(node->value<int>());
else if(node->tag() == "border-width-bottom")
setBorderWidthBottom(node->value<int>());
else if(node->tag() == "border-width-left")
setBorderWidthLeft(node->value<int>());
else if(node->tag() == "border-color")
setBorderColor(node->value<Color>());
else if(node->tag() == "border-color-top")
setBorderColorTop(node->value<Color>());
//.........这里部分代码省略.........
开发者ID:kuzynn,项目名称:otclient,代码行数:101,代码来源:uiwidgetbasestyle.cpp
示例10: newDef
void QgsDataDefinedButton::updateGui()
{
QString oldDef = mCurrentDefinition;
QString newDef( "" );
bool hasExp = !getExpression().isEmpty();
bool hasField = !getField().isEmpty();
if ( useExpression() && !hasExp )
{
setActive( false );
setUseExpression( false );
}
else if ( !useExpression() && !hasField )
{
setActive( false );
}
QIcon icon = mIconDataDefine;
QString deftip = tr( "undefined" );
if ( useExpression() && hasExp )
{
icon = isActive() ? mIconDataDefineExpressionOn : mIconDataDefineExpression;
newDef = deftip = getExpression();
QgsExpression exp( getExpression() );
if ( exp.hasParserError() )
{
setActive( false );
icon = mIconDataDefineExpressionError;
deftip = tr( "Parse error: %1" ).arg( exp.parserErrorString() );
newDef = "";
}
}
else if ( !useExpression() && hasField )
{
icon = isActive() ? mIconDataDefineOn : mIconDataDefine;
newDef = deftip = getField();
if ( !mFieldNameList.contains( getField() ) )
{
setActive( false );
icon = mIconDataDefineError;
deftip = tr( "'%1' field missing" ).arg( getField() );
newDef = "";
}
}
setIcon( icon );
// update and emit current definition
if ( newDef != oldDef )
{
mCurrentDefinition = newDef;
emit dataDefinedChanged( mCurrentDefinition );
}
// build full description for tool tip and popup dialog
mFullDescription = tr( "<b><u>Data defined override</u></b><br>" );
mFullDescription += tr( "<b>Active: </b>%1 <i>(ctrl|right-click toggles)</i><br>" ).arg( isActive() ? tr( "yes" ) : tr( "no" ) );
if ( !mUsageInfo.isEmpty() )
{
mFullDescription += tr( "<b>Usage:</b><br>%1<br>" ).arg( mUsageInfo );
}
if ( !mInputDescription.isEmpty() )
{
mFullDescription += tr( "<b>Expected input:</b><br>%1<br>" ).arg( mInputDescription );
}
if ( !mDataTypesString.isEmpty() )
{
mFullDescription += tr( "<b>Valid input types:</b><br>%1<br>" ).arg( mDataTypesString );
}
QString deftype( "" );
if ( deftip != tr( "undefined" ) )
{
deftype = QString( " (%1)" ).arg( useExpression() ? tr( "expression" ) : tr( "field" ) );
}
// truncate long expressions, or tool tip may be too wide for screen
if ( deftip.length() > 75 )
{
deftip.truncate( 75 );
deftip.append( "..." );
}
mFullDescription += tr( "<b>Current definition %1:</b><br>%2" ).arg( deftype ).arg( deftip );
setToolTip( mFullDescription );
}
开发者ID:Ariki,项目名称:QGIS,代码行数:94,代码来源:qgsdatadefinedbutton.cpp
示例11: sfRenderWindow_setIcon
void sfRenderWindow_setIcon(sfRenderWindow* renderWindow, unsigned int width, unsigned int height, const sfUint8* pixels)
{
CSFML_CALL(renderWindow, setIcon(width, height, pixels));
}
开发者ID:dabbertorres,项目名称:CSFML,代码行数:4,代码来源:RenderWindow.cpp
示例12: GetUserCore
//.........这里部分代码省略.........
if (isDemo || test)
{
}
else if (full == -1 || ((!m_bBuy || onAccount) && !free))
{
if (full == -1 || m_bBuy)
{
//if this is the first full game or this is the first full game that you dont have to buy
m_bBuy = (!onAccount && !free);
full = count;
}
if (onAccount || free)
fullReadyCount++;
}
bList.push_back(bi);
count++;
}
for (size_t x=0; x<bList.size(); x++)
{
UserCore::Item::BranchInfoI* bi = bList[x];
gcString name = bi->getName();
gcWString title;
uint32 flags = bi->getFlags();
bool noRelease = HasAllFlags(flags, UserCore::Item::BranchInfoI::BF_NORELEASES);
bool isPreorder = bi->isPreOrder();
bool onAccount = HasAllFlags(flags, UserCore::Item::BranchInfoI::BF_ONACCOUNT);
bool free = HasAnyFlags(flags, UserCore::Item::BranchInfoI::BF_FREE);
if (!free)
title = gcString("{0} - {1}", name, Managers::GetString("#IF_BROUGHT"));
else
title = gcString("{0} - {1}", name, Managers::GetString("#IF_FREE"));
if (!free && !onAccount)
{
gcWString cost(bi->getCost());
if (cost == "")
cost = gcString(Managers::GetString("#TBA"));
title = gcString("{0} - {1}", name, cost.c_str());
}
else if (isPreorder)
{
if (noRelease)
title = gcString("{0} - {1}", name, Managers::GetString("#IF_PREORDERED_NORELEASE"));
else
title = gcString("{0} - {1}", name, Managers::GetString("#IF_PREORDERED"));
}
m_cbBranchList->Append(title, new BranchData(bi->getBranchId(), bi->getGlobalId()));
}
count = bList.size();
if (full == -1)
full = 0;
#ifdef WIN32
if (HasAnyFlags(i->getStatus(), UserCore::Item::ItemInfoI::STATUS_ONCOMPUTER))
m_cbBranchList->Append(Managers::GetString("#IF_ONCOMPUTER"), new BranchData(MCFBranch::BranchFromInt(-1), MCFBranch::BranchFromInt(-1)));
else
m_cbBranchList->Append(Managers::GetString("#IF_FINDONCOMPUTER"), new BranchData(MCFBranch::BranchFromInt(-2), MCFBranch::BranchFromInt(-2)));
#endif
m_cbBranchList->SetSelection(full);
if (pItemInfo->getIcon() && UTIL::FS::isValidFile(UTIL::FS::PathWithFile(pItemInfo->getIcon())))
setIcon(pItemInfo->getIcon());
SetTitle(gcWString(Managers::GetString(L"#IF_BRANCHTITLE"), itemName));
uint32 ret = 0;
if (count == 0)
{
if (!isCheckingParent)
gcMessageBox(GetParent(), Managers::GetString(L"#IF_IINOBRANCHES"), Managers::GetString(L"#IF_IIERRTITLE"));
else if (selectBranch)
ret = 1;
}
else if ((count == 1 || fullReadyCount == 1) && !m_bBuy)
{
ret = 1;
}
else
{
wxCommandEvent e;
onChoice(e);
}
return ret;
}
开发者ID:boskee,项目名称:Desurium-1,代码行数:101,代码来源:InstallBranch.cpp
示例13: RunControl
AnalyzerRunControl::AnalyzerRunControl(RunConfiguration *runConfiguration, Core::Id runMode)
: RunControl(runConfiguration, runMode)
{
setIcon(Icons::ANALYZER_CONTROL_START);
}
开发者ID:Lykurg,项目名称:qt-creator,代码行数:5,代码来源:analyzerruncontrol.cpp
示例14: QWidget
/*
* Constructs a BezierWidgetBase as a child of 'parent', with the
* name 'name' and widget flags set to 'f'.
*/
BezierWidgetBase::BezierWidgetBase( QWidget* parent, const char* name, WFlags fl )
: QWidget( parent, name, fl )
{
QImage img;
img.loadFromData( image0_data, sizeof( image0_data ), "PNG" );
image0 = img;
if ( !name )
setName( "bezierwidgetbase" );
setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)1, 0, 0, sizePolicy().hasHeightForWidth() ) );
setMinimumSize( QSize( 910, 540 ) );
setIcon( image0 );
setMouseTracking( TRUE );
bezierwidgetbaseLayout = new QGridLayout( this, 1, 1, 11, 6, "bezierwidgetbaseLayout");
layout15 = new QHBoxLayout( 0, 0, 6, "layout15");
spacer5_2 = new QSpacerItem( 170, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
layout15->addItem( spacer5_2 );
textLabel3 = new QLabel( this, "textLabel3" );
textLabel3->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, textLabel3->sizePolicy().hasHeightForWidth() ) );
textLabel3->setMinimumSize( QSize( 500, 10 ) );
textLabel3->setMaximumSize( QSize( 32767, 15 ) );
layout15->addWidget( textLabel3 );
spacer5 = new QSpacerItem( 220, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
layout15->addItem( spacer5 );
bezierwidgetbaseLayout->addLayout( layout15, 0, 0 );
layout13 = new QVBoxLayout( 0, 0, 6, "layout13");
qbezier = new Qbezier( this, "qbezier" );
qbezier->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)1, 0, 0, qbezier->sizePolicy().hasHeightForWidth() ) );
qbezier->setMinimumSize( QSize( 0, 220 ) );
qbezier->setMouseTracking( TRUE );
layout13->addWidget( qbezier );
bezierScroll = new QScrollBar( this, "bezierScroll" );
bezierScroll->setMaxValue( 0 );
bezierScroll->setLineStep( 1 );
bezierScroll->setOrientation( QScrollBar::Horizontal );
layout13->addWidget( bezierScroll );
bezierwidgetbaseLayout->addLayout( layout13, 2, 0 );
layout24 = new QHBoxLayout( 0, 0, 6, "layout24");
groupBox1 = new QGroupBox( this, "groupBox1" );
groupBox1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, groupBox1->sizePolicy().hasHeightForWidth() ) );
textLabel1_2 = new QLabel( groupBox1, "textLabel1_2" );
textLabel1_2->setGeometry( QRect( 10, 20, 59, 20 ) );
ChkEnableScroll = new QCheckBox( groupBox1, "ChkEnableScroll" );
ChkEnableScroll->setGeometry( QRect( 10, 80, 101, 21 ) );
GridScale = new QLineEdit( groupBox1, "GridScale" );
GridScale->setEnabled( FALSE );
GridScale->setGeometry( QRect( 80, 50, 50, 21 ) );
textLabel1_2_3 = new QLabel( groupBox1, "textLabel1_2_3" );
textLabel1_2_3->setEnabled( FALSE );
textLabel1_2_3->setGeometry( QRect( 10, 50, 50, 20 ) );
FormGridWidth = new QLineEdit( groupBox1, "FormGridWidth" );
FormGridWidth->setGeometry( QRect( 80, 20, 50, 21 ) );
layout24->addWidget( groupBox1 );
groupBox1_2 = new QGroupBox( this, "groupBox1_2" );
groupBox1_2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, groupBox1_2->sizePolicy().hasHeightForWidth() ) );
textLabel1_3 = new QLabel( groupBox1_2, "textLabel1_3" );
textLabel1_3->setGeometry( QRect( 10, 20, 66, 20 ) );
textLabel1_2_2 = new QLabel( groupBox1_2, "textLabel1_2_2" );
textLabel1_2_2->setGeometry( QRect( 10, 50, 50, 20 ) );
ReverseSeek = new QCheckBox( groupBox1_2, "ReverseSeek" );
ReverseSeek->setGeometry( QRect( 10, 80, 101, 21 ) );
FormMinPos = new QLineEdit( groupBox1_2, "FormMinPos" );
FormMinPos->setGeometry( QRect( 70, 50, 50, 21 ) );
FormMaxPos = new QLineEdit( groupBox1_2, "FormMaxPos" );
FormMaxPos->setGeometry( QRect( 70, 20, 50, 21 ) );
layout24->addWidget( groupBox1_2 );
groupBox7 = new QGroupBox( this, "groupBox7" );
groupBox7->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)5, 0, 0, groupBox7->sizePolicy().hasHeightForWidth() ) );
groupBox7->setMinimumSize( QSize( 478, 0 ) );
groupBox7->setColumnLayout(0, Qt::Vertical );
groupBox7->layout()->setSpacing( 6 );
groupBox7->layout()->setMargin( 11 );
groupBox7Layout = new QGridLayout( groupBox7->layout() );
groupBox7Layout->setAlignment( Qt::AlignTop );
splitter1 = new QSplitter( groupBox7, "splitter1" );
//.........这里部分代码省略.........
开发者ID:AndySze,项目名称:OpenServo,代码行数:101,代码来源:bezierwidgetbase.cpp
示例15: setIcon
void ControlTrayIcon::setNotConnectedState()
{
setIcon(m_iconDisabled);
setText(StringTable::getString(IDS_CONTROL_CLIENT_NOT_CONNECTED));
}
开发者ID:newmind,项目名称:tvnc_rds,代码行数:5,代码来源:ControlTrayIcon.cpp
示例16: setIcon
void Tab::setTabIcon()
{
setIcon(WebView->icon());
}
开发者ID:JHooverman,项目名称:WebRender-1.0,代码行数:4,代码来源:tab.cpp
示例17: setIcon
void WExpandedValuableItem::setThingData(const hacc::TDBID &iconID, const QString &name)
{
setIcon(0, 0, iconID);
setText(0, 0, name);
}
开发者ID:Sheridan,项目名称:HAcc,代码行数:5,代码来源:wexpandedvaluableitem.cpp
示例18: setTarget
GMRemote::GMRemote(FXApp* a,FXObject * tgt,FXSelector msg):FXMainWindow(a,"Goggles Music Manager",nullptr,nullptr,DECOR_BORDER|DECOR_TITLE|DECOR_CLOSE|DECOR_STRETCHABLE,0,0,0,0,3,3,3,3,3,3){
flags|=FLAG_ENABLED;
cover=nullptr;
setTarget(tgt);
setSelector(msg);
setIcon(GMIconTheme::instance()->icon_applogo);
setMiniIcon(GMIconTheme::instance()->icon_applogo_small);
FXFontDesc fontdescription = getApp()->getNormalFont()->getFontDesc();
fontdescription.weight = FXFont::Bold;
fontdescription.size += 10;
font_title = new FXFont(getApp(),fontdescription);
font_title->create();
img_default = new FXPNGImage(getApp(),about_png);
img_default->scale(64,64,FOX_SCALE_BEST);
img_default->blend(getApp()->getBackColor());
img_default->create();
cover_label = new FXImageFrame(this,img_default,LAYOUT_SIDE_LEFT|FRAME_SUNKEN|LAYOUT_FIX_WIDTH|JUSTIFY_CENTER_X|JUSTIFY_CENTER_Y|LAYOUT_FILL_Y,0,0,64,64);
cover_label->setBackColor(getApp()->getBackColor());
/// Popup Volume Menu
volumecontrol = new FXPopup(this,POPUP_VERTICAL|FRAME_RAISED|FRAME_THICK|POPUP_SHRINKWRAP);
volumeslider = new FXSlider(volumecontrol,this,GMRemote::ID_VOLUME_SLIDER,LAYOUT_FIX_HEIGHT|LAYOUT_FIX_WIDTH|SLIDER_VERTICAL|SLIDER_TICKS_RIGHT|SLIDER_TICKS_LEFT|SLIDER_INSIDE_BAR,0,0,20,100);
volumeslider->setTickDelta(10);
volumeslider->setRange(0,100);
volumeslider->setIncrement(10);
FXHorizontalFrame * buttons = new FXHorizontalFrame(this,LAYOUT_SIDE_BOTTOM|LAYOUT_FILL_X,0,0,0,0,3,3,0,0);
new FXButton(buttons,tr("\tShow Browser\tShow Browser"),GMIconTheme::instance()->icon_home,GMPlayerManager::instance()->getMainWindow(),GMWindow::ID_SHOW_BROWSER,BUTTON_TOOLBAR|FRAME_RAISED|ICON_ABOVE_TEXT);
new FXVerticalSeparator(buttons,LAYOUT_FILL_Y|SEPARATOR_GROOVE);
new FXButton(buttons,tr("\tStart Playback\tStart Playback"),GMIconTheme::instance()->icon_play,GMPlayerManager::instance()->getMainWindow(),GMWindow::ID_PLAYPAUSEMENU,BUTTON_TOOLBAR|FRAME_RAISED|ICON_ABOVE_TEXT);
new FXButton(buttons,tr("\tStop Playback\tStop Playback"),GMIconTheme::instance()->icon_stop,GMPlayerManager::instance()->getMainWindow(),GMWindow::ID_STOP,BUTTON_TOOLBAR|FRAME_RAISED|ICON_ABOVE_TEXT);
new FXVerticalSeparator(buttons,LAYOUT_FILL_Y|SEPARATOR_GROOVE);
new FXButton(buttons,tr("\tPlay Previous Track\tPlay previous track."),GMIconTheme::instance()->icon_prev,GMPlayerManager::instance()->getMainWindow(),GMWindow::ID_PREV,BUTTON_TOOLBAR|FRAME_RAISED|ICON_ABOVE_TEXT);
new FXButton(buttons,tr("\tPlay Next Track\tPlay next track."),GMIconTheme::instance()->icon_next,GMPlayerManager::instance()->getMainWindow(),GMWindow::ID_NEXT,BUTTON_TOOLBAR|FRAME_RAISED|ICON_ABOVE_TEXT);
new FXVerticalSeparator(buttons,LAYOUT_FILL_Y|SEPARATOR_GROOVE);
time_label =new FX7Segment(buttons,"--:--",SEVENSEGMENT_SHADOW|LAYOUT_CENTER_Y);
time_label->setCellWidth(10);
time_label->setCellHeight(15);
time_label->setTarget(this);
time_label->setSelector(ID_TIME_LABEL);
new FXVerticalSeparator(buttons,LAYOUT_FILL_Y|SEPARATOR_GROOVE);
volumebutton = new FXMenuButton(buttons,tr("\tAdjust Volume\tAdjust Volume"),nullptr,volumecontrol,MENUBUTTON_NOARROWS|MENUBUTTON_ATTACH_LEFT|MENUBUTTON_UP|MENUBUTTON_TOOLBAR|FRAME_RAISED|LAYOUT_CENTER_Y);
volumebutton->setTarget(this);
volumebutton->setSelector(ID_VOLUME_BUTTON);
FXVerticalFrame * info = new FXVerticalFrame(this,LAYOUT_CENTER_Y|FRAME_NONE|LAYOUT_FILL_X,0,0,0,0,2,2,2,2,0,0);
title_label = new FXTextField(info,20,nullptr,0,FRAME_NONE|TEXTFIELD_READONLY,0,0,0,0,0,0,0,0);
title_label->setBackColor(getApp()->getBaseColor());
title_label->setFont(font_title);
title_label->setDefaultCursor(getApp()->getDefaultCursor(DEF_ARROW_CURSOR));
title_label->setDragCursor(getApp()->getDefaultCursor(DEF_ARROW_CURSOR));
title_label->disable();
artistalbum_label = new FXTextField(info,30,nullptr,0,FRAME_NONE|TEXTFIELD_READONLY,0,0,0,0,0,0,0,0);
artistalbum_label->setBackColor(getApp()->getBaseColor());
artistalbum_label->setDefaultCursor(getApp()->getDefaultCursor(DEF_ARROW_CURSOR));
trackslider = new GMTrackProgressBar(info,this,ID_TIMESLIDER,LAYOUT_FILL_X|LAYOUT_CENTER_Y|FRAME_RAISED,0,0,0,0,0,0,0,0);
trackslider->setTotal(100000);
trackslider->setDefaultCursor(GMIconTheme::instance()->cursor_hand);
trackslider->setDragCursor(GMIconTheme::instance()->cursor_hand);
getAccelTable()->addAccel(parseAccel("F11"),GMPlayerManager::instance()->getMainWindow(),FXSEL(SEL_COMMAND,GMWindow::ID_SHOW_BROWSER));
getAccelTable()->addAccel(parseAccel("Ctrl-M"),GMPlayerManager::instance()->getMainWindow(),FXSEL(SEL_COMMAND,GMWindow::ID_SHOW_BROWSER));
getAccelTable()->addAccel(parseAccel("Ctrl-W"),this,FXSEL(SEL_CLOSE,0));
getAccelTable()->addAccel(parseAccel("Ctrl-Q"),GMPlayerManager::instance()->getMainWindow(),FXSEL(SEL_COMMAND,GMWindow::ID_QUIT));
getAccelTable()->addAccel(parseAccel("Ctrl-P"),GMPlayerManager::instance()->getMainWindow(),FXSEL(SEL_COMMAND,GMWindow::ID_PLAYPAUSEMENU));
getAccelTable()->addAccel(parseAccel("Ctrl-\\"),GMPlayerManager::instance()->getMainWindow(),FXSEL(SEL_COMMAND,GMWindow::ID_STOP));
getAccelTable()->addAccel(parseAccel("Ctrl-["),GMPlayerManager::instance()->getMainWindow(),FXSEL(SEL_COMMAND,GMWindow::ID_PREV));
getAccelTable()->addAccel(parseAccel("Ctrl-]"),GMPlayerManager::instance()->getMainWindow(),FXSEL(SEL_COMMAND,GMWindow::ID_NEXT));
reset();
}
开发者ID:gogglesmm,项目名称:gogglesmm,代码行数:79,代码来源:GMRemote.cpp
示例19: setIcon
void HomeButton::changeIcon(QPixmap img)
{
setIcon(img);
setIconSize( QSize(this->width(), this->height()) );
}
开发者ID:polybox3d,项目名称:polybox,代码行数:5,代码来源:HomeButton.cpp
示例20: mfont
MainWidget::MainWidget(QWidget *parent)
:QWidget(parent)
{
bool skip_db_check=false;
unsigned schema=0;
//
// Force a reasonable default font.
//
QFont mfont("helvetica",12,QFont::Normal);
mfont.setPixelSize(12);
qApp->setFont(mfont);
//
// Load Local Configs
//
panel_config=new RDConfig();
panel_config->load();
//
// Load the command-line arguments
//
RDCmdSwitch *cmd=new RDCmdSwitch(qApp->argc(),qApp->argv(),"rdcartslots",
RDCARTSLOTS_USAGE);
for(unsigned i=0;i<cmd->keys();i++) {
if(cmd->key(i)=="--skip-db-check") {
skip_db_check=true;
}
}
//
// Create Icons
//
lib_rivendell_map=new QPixmap(rivendell_xpm);
setIcon(*lib_rivendell_map);
//
// Ensure that system daemons are running
//
RDInitializeDaemons();
//
// Open Database
//
QString err;
QSqlDatabase *db=RDInitDb(&schema,&err);
if(!db) {
QMessageBox::warning(this,tr("Can't Connect"),err);
exit(0);
}
if((schema!=RD_VERSION_DATABASE)&&(!skip_db_check)) {
fprintf(stderr,
"rdcastmanager: database version mismatch, should be %u, is %u\n",
RD_VERSION_DATABASE,schema);
exit(256);
}
new RDDbHeartbeat(panel_config->mysqlHeartbeatInterval(),this);
//
// Allocate Global Resources
//
panel_station=new RDStation(panel_config->stationName());
panel_system=new RDSystem();
//
// RDAirPlay Configuration
//
panel_airplay_conf=new RDAirPlayConf(panel_config->stationName(),"RDAIRPLAY");
//
// CAE Connection
//
panel_cae=new RDCae(panel_station,panel_config,parent);
panel_cae->connectHost();
//
// RIPC Connection
//
panel_ripc=new RDRipc(panel_config->stationName());
connect(panel_ripc,SIGNAL(userChanged()),this,SLOT(userData()));
connect(panel_ripc,SIGNAL(rmlReceived(RDMacro *)),
this,SLOT(rmlReceivedData(RDMacro *)));
//
// User
//
panel_user=NULL;
//
// Service Picker
//
panel_svcs_dialog=new RDListSvcs(tr("RDCartSlots"),this);
//
// Macro Player
//
panel_player=new RDEventPlayer(panel_ripc,this);
//
// Dialogs
//.........这里部分代码省略.........
开发者ID:WMTH,项目名称:rivendell,代码行数:101,代码来源:rdcartslots.cpp
注:本文中的setIcon函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论