This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Private member variable | |
NSString * _name; | |
int _age; | |
- (void)theFunction { | |
if (b>1) { | |
for (int i=0;i<3;i++) { | |
NSLog(@"Foo"); | |
} | |
} else { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
aaaa | |
bbbb | |
cccc |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void WorkspaceView::mousePressEvent(QMouseEvent *event) | |
{ | |
Q_D(WorkspaceView); | |
QGraphicsView::mousePressEvent(event); | |
if (event->button()==Qt::MiddleButton) { | |
d->m_lastPanPosition = event->pos(); | |
d->m_panning = true; | |
setCursor(Qt::ClosedHandCursor); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static bool cpDir(const QString &srcPath, const QString &dstPath) | |
{ | |
rmDir(dstPath); | |
QDir parentDstDir(QFileInfo(dstPath).path()); | |
if (!parentDstDir.mkdir(QFileInfo(dstPath).fileName())) | |
return false; | |
QDir srcDir(srcPath); | |
foreach(const QFileInfo &info, srcDir.entryInfoList(QDir::Dirs | QDir::Files | QDir::NoDotAndDotDot)) { | |
QString srcItemPath = srcPath + "/" + info.fileName(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
QPixmap GraphicsItem::toPixmap() const | |
{ | |
if (!scene()) { | |
qWarning() << "[ControlItem::toPixmap] scene is null."; | |
return QPixmap(); | |
} | |
QRectF r = boundingRect(); | |
QPixmap pixmap(r.width(), r.height()); | |
pixmap.fill(QColor(0, 0, 0, 0)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
syntax on | |
set ignorecase | |
set ru | |
set nu | |
set showcmd | |
set autoindent | |
set hlsearch | |
set cin | |
set smartindent | |
set nobackup |
NewerOlder