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
public class Settings | |
{ | |
private bool showid = true; | |
public bool showID | |
{ | |
get | |
{ | |
return showid; | |
} | |
set |
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 ManualResetEvent mre = new ManualResetEvent(false); | |
void startBW() { | |
BW = new BW(); //BW is BackgroundWorker class | |
BW.RunWorkerCompleted += BW_RunWorkerCompleted; | |
BW.ProgressChanged += BW_ProgressChanged; | |
BW.RunWorkerAsync(); | |
//wait until it finishes | |
mre.WaitOne(); |
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
//DO NOT USE THIS | |
QStandardItem *cName; | |
for (int k = 0; k < cName->rowCount(); ++k) { | |
QList<QStandardItem*> listOfItems = cName->takeRow(k); | |
} |
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
//USE THIS | |
while (cName->hasChildren()) { | |
QList<QStandardItem*> listOfItems = cName->takeRow(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
// MyClass.h | |
class MyClass { | |
public: | |
static int GetVar() { | |
return shared_variable; | |
} | |
private: | |
static int shared_variable; | |
}; |
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
class ClassA { | |
public: | |
ClassA(ClassC *pointer_to_ClassC); | |
}; |
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
class ClassB { | |
private: | |
std::vector<ClassA> myVector; | |
}; |
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
ClassC *ClassCInstance = new ClassC(); | |
for (i = 0; i < 10; ++i) { | |
myVector.push_back(ClassA(ClassCInstance)); | |
} |
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
class Individual { | |
public: | |
Individual& Individual::operator= (Individual &target); | |
} |
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
class Individual { | |
public: | |
Individual& operator= (Individual &target); | |
} |