GUI: Renamed elements

This commit is contained in:
Daniel Marjamäki 2016-11-19 22:37:12 +01:00
parent 7c046e541b
commit 0da33eaa80
2 changed files with 49 additions and 49 deletions

View File

@ -19,15 +19,15 @@
<property name="currentIndex"> <property name="currentIndex">
<number>0</number> <number>0</number>
</property> </property>
<widget class="QWidget" name="tabProject"> <widget class="QWidget" name="mTabProject">
<attribute name="title"> <attribute name="title">
<string>Project</string> <string>Project</string>
</attribute> </attribute>
<layout class="QVBoxLayout" name="verticalLayout_12"> <layout class="QVBoxLayout" name="verticalLayout_12">
<item> <item>
<layout class="QHBoxLayout" name="layoutProjectRoot"> <layout class="QHBoxLayout" name="mLayoutProjectRoot">
<item> <item>
<widget class="QLabel" name="labelProjectRoot"> <widget class="QLabel" name="mLabelProjectRoot">
<property name="text"> <property name="text">
<string>Root:</string> <string>Root:</string>
</property> </property>
@ -42,19 +42,19 @@
</layout> </layout>
</item> </item>
<item> <item>
<layout class="QHBoxLayout" name="layoutBuildDir"> <layout class="QHBoxLayout" name="mLayoutBuildDir">
<item> <item>
<widget class="QLabel" name="buildDirLabel"> <widget class="QLabel" name="mLabelBuildDir">
<property name="text"> <property name="text">
<string>Cppcheck build dir (optional)</string> <string>Cppcheck build dir (optional)</string>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QLineEdit" name="buildDirEdit"/> <widget class="QLineEdit" name="mEditBuildDir"/>
</item> </item>
<item> <item>
<widget class="QPushButton" name="buildDirBrowse"> <widget class="QPushButton" name="mBtnBrowseBuildDir">
<property name="text"> <property name="text">
<string>...</string> <string>...</string>
</property> </property>
@ -76,9 +76,9 @@
</spacer> </spacer>
</item> </item>
<item> <item>
<layout class="QHBoxLayout" name="layoutLibraries"> <layout class="QHBoxLayout" name="mLayoutLibraries">
<item> <item>
<widget class="QLabel" name="labelLibraries"> <widget class="QLabel" name="mLabelLibraries">
<property name="text"> <property name="text">
<string>Libraries:</string> <string>Libraries:</string>
</property> </property>
@ -87,7 +87,7 @@
</layout> </layout>
</item> </item>
<item> <item>
<widget class="QLabel" name="labelLibrariesNote"> <widget class="QLabel" name="mLabelLibrariesNote">
<property name="text"> <property name="text">
<string>Note: Put your own custom .cfg files in the same folder as the project file. You should see them above.</string> <string>Note: Put your own custom .cfg files in the same folder as the project file. You should see them above.</string>
</property> </property>
@ -111,13 +111,13 @@
</item> </item>
</layout> </layout>
</widget> </widget>
<widget class="QWidget" name="tabVisualStudio"> <widget class="QWidget" name="mTabVisualStudio">
<attribute name="title"> <attribute name="title">
<string>Visual Studio</string> <string>Visual Studio</string>
</attribute> </attribute>
<layout class="QVBoxLayout" name="verticalLayout_4"> <layout class="QVBoxLayout" name="verticalLayout_4">
<item> <item>
<widget class="QLabel" name="labelVisualStudio"> <widget class="QLabel" name="mLabelVisualStudio">
<property name="text"> <property name="text">
<string>Visual Studio <string>Visual Studio
@ -130,12 +130,12 @@ Library settings are not imported.</string>
</widget> </widget>
</item> </item>
<item> <item>
<layout class="QHBoxLayout" name="layoutVisualStudio"> <layout class="QHBoxLayout" name="mLayoutVisualStudio">
<item> <item>
<widget class="QLineEdit" name="mEditVisualStudio"/> <widget class="QLineEdit" name="mEditVisualStudio"/>
</item> </item>
<item> <item>
<widget class="QPushButton" name="mBrowseVisualStudio"> <widget class="QPushButton" name="mBtnBrowseVisualStudio">
<property name="text"> <property name="text">
<string>...</string> <string>...</string>
</property> </property>
@ -158,13 +158,13 @@ Library settings are not imported.</string>
</item> </item>
</layout> </layout>
</widget> </widget>
<widget class="QWidget" name="tabCMake"> <widget class="QWidget" name="mTabCMake">
<attribute name="title"> <attribute name="title">
<string>CMake</string> <string>CMake</string>
</attribute> </attribute>
<layout class="QVBoxLayout" name="verticalLayout_7"> <layout class="QVBoxLayout" name="verticalLayout_7">
<item> <item>
<widget class="QLabel" name="labelCMake"> <widget class="QLabel" name="mLabelCMake">
<property name="text"> <property name="text">
<string>Compile database <string>Compile database
@ -177,12 +177,12 @@ Library settings are not provided in compile database, be careful about this con
</widget> </widget>
</item> </item>
<item> <item>
<layout class="QHBoxLayout" name="layoutCMake"> <layout class="QHBoxLayout" name="mLayoutCMake">
<item> <item>
<widget class="QLineEdit" name="mEditCompileDatabase"/> <widget class="QLineEdit" name="mEditCompileDatabase"/>
</item> </item>
<item> <item>
<widget class="QPushButton" name="mBrowseCompileDatabase"> <widget class="QPushButton" name="mBtnBrowseCompileDatabase">
<property name="text"> <property name="text">
<string>...</string> <string>...</string>
</property> </property>
@ -205,17 +205,17 @@ Library settings are not provided in compile database, be careful about this con
</item> </item>
</layout> </layout>
</widget> </widget>
<widget class="QWidget" name="tabOther"> <widget class="QWidget" name="mTabOther">
<attribute name="title"> <attribute name="title">
<string>Other</string> <string>Other</string>
</attribute> </attribute>
<layout class="QVBoxLayout" name="verticalLayout_10"> <layout class="QVBoxLayout" name="verticalLayout_10">
<item> <item>
<layout class="QHBoxLayout" name="layoutCheckPaths"> <layout class="QHBoxLayout" name="mLayoutCheckPaths">
<item> <item>
<layout class="QVBoxLayout" name="verticalLayout_5"> <layout class="QVBoxLayout" name="verticalLayout_5">
<item> <item>
<widget class="QLabel" name="label_3"> <widget class="QLabel" name="mLabelCheckPaths">
<property name="text"> <property name="text">
<string>Paths:</string> <string>Paths:</string>
</property> </property>
@ -237,26 +237,26 @@ Library settings are not provided in compile database, be careful about this con
</layout> </layout>
</item> </item>
<item> <item>
<widget class="QListWidget" name="mListPaths"/> <widget class="QListWidget" name="mListCheckPaths"/>
</item> </item>
<item> <item>
<layout class="QVBoxLayout" name="layoutCheckPathsButtons"> <layout class="QVBoxLayout" name="mLayoutCheckPathsButtons">
<item> <item>
<widget class="QPushButton" name="mBtnAddPath"> <widget class="QPushButton" name="mBtnAddCheckPath">
<property name="text"> <property name="text">
<string>Add...</string> <string>Add...</string>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QPushButton" name="mBtnEditPath"> <widget class="QPushButton" name="mBtnEditCheckPath">
<property name="text"> <property name="text">
<string>Edit</string> <string>Edit</string>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QPushButton" name="mBtnRemovePath"> <widget class="QPushButton" name="mBtnRemoveCheckPath">
<property name="text"> <property name="text">
<string>Remove</string> <string>Remove</string>
</property> </property>
@ -280,9 +280,9 @@ Library settings are not provided in compile database, be careful about this con
</layout> </layout>
</item> </item>
<item> <item>
<layout class="QHBoxLayout" name="layoutDefines"> <layout class="QHBoxLayout" name="mLayoutDefines">
<item> <item>
<widget class="QLabel" name="labelDefines"> <widget class="QLabel" name="mLabelDefines">
<property name="text"> <property name="text">
<string>Defines:</string> <string>Defines:</string>
</property> </property>
@ -301,11 +301,11 @@ Library settings are not provided in compile database, be careful about this con
</layout> </layout>
</item> </item>
<item> <item>
<layout class="QHBoxLayout" name="layoutIncludePaths"> <layout class="QHBoxLayout" name="mLayoutIncludePaths">
<item> <item>
<layout class="QVBoxLayout" name="verticalLayout_11"> <layout class="QVBoxLayout" name="verticalLayout_11">
<item> <item>
<widget class="QLabel" name="label_10"> <widget class="QLabel" name="mLabelIncludePaths">
<property name="text"> <property name="text">
<string>Include Paths:</string> <string>Include Paths:</string>
</property> </property>
@ -334,7 +334,7 @@ Library settings are not provided in compile database, be careful about this con
</widget> </widget>
</item> </item>
<item> <item>
<layout class="QVBoxLayout" name="layoutIncludePathsButtons"> <layout class="QVBoxLayout" name="mLayoutIncludePathsButtons">
<item> <item>
<widget class="QPushButton" name="mBtnAddInclude"> <widget class="QPushButton" name="mBtnAddInclude">
<property name="text"> <property name="text">
@ -402,7 +402,7 @@ Library settings are not provided in compile database, be careful about this con
</item> </item>
</layout> </layout>
</widget> </widget>
<widget class="QWidget" name="tabExclude"> <widget class="QWidget" name="mTabExclude">
<attribute name="title"> <attribute name="title">
<string>Exclude</string> <string>Exclude</string>
</attribute> </attribute>

View File

@ -78,20 +78,20 @@ ProjectFileDialog::ProjectFileDialog(const QString &path, QWidget *parent)
foreach (const QString library, libs) { foreach (const QString library, libs) {
QCheckBox *checkbox = new QCheckBox(this); QCheckBox *checkbox = new QCheckBox(this);
checkbox->setText(library); checkbox->setText(library);
mUI.layoutLibraries->addWidget(checkbox); mUI.mLayoutLibraries->addWidget(checkbox);
mLibraryCheckboxes << checkbox; mLibraryCheckboxes << checkbox;
} }
connect(mUI.mButtons, SIGNAL(accepted()), this, SLOT(accept())); connect(mUI.mButtons, SIGNAL(accepted()), this, SLOT(accept()));
connect(mUI.buildDirBrowse, SIGNAL(clicked()), this, SLOT(BrowseBuildDir())); connect(mUI.mBtnBrowseBuildDir, SIGNAL(clicked()), this, SLOT(BrowseBuildDir()));
connect(mUI.mBrowseCompileDatabase, SIGNAL(clicked()), this, SLOT(BrowseCompileDatabase())); connect(mUI.mBtnBrowseCompileDatabase, SIGNAL(clicked()), this, SLOT(BrowseCompileDatabase()));
connect(mUI.mBrowseVisualStudio, SIGNAL(clicked()), this, SLOT(BrowseVisualStudio())); connect(mUI.mBtnBrowseVisualStudio, SIGNAL(clicked()), this, SLOT(BrowseVisualStudio()));
connect(mUI.mBtnAddCheckPath, SIGNAL(clicked()), this, SLOT(AddPath()));
connect(mUI.mBtnEditCheckPath, SIGNAL(clicked()), this, SLOT(EditPath()));
connect(mUI.mBtnRemoveCheckPath, SIGNAL(clicked()), this, SLOT(RemovePath()));
connect(mUI.mBtnAddInclude, SIGNAL(clicked()), this, SLOT(AddIncludeDir())); connect(mUI.mBtnAddInclude, SIGNAL(clicked()), this, SLOT(AddIncludeDir()));
connect(mUI.mBtnAddPath, SIGNAL(clicked()), this, SLOT(AddPath()));
connect(mUI.mBtnEditInclude, SIGNAL(clicked()), this, SLOT(EditIncludeDir())); connect(mUI.mBtnEditInclude, SIGNAL(clicked()), this, SLOT(EditIncludeDir()));
connect(mUI.mBtnRemoveInclude, SIGNAL(clicked()), this, SLOT(RemoveIncludeDir())); connect(mUI.mBtnRemoveInclude, SIGNAL(clicked()), this, SLOT(RemoveIncludeDir()));
connect(mUI.mBtnEditPath, SIGNAL(clicked()), this, SLOT(EditPath()));
connect(mUI.mBtnRemovePath, SIGNAL(clicked()), this, SLOT(RemovePath()));
connect(mUI.mBtnAddIgnorePath, SIGNAL(clicked()), this, SLOT(AddExcludePath())); connect(mUI.mBtnAddIgnorePath, SIGNAL(clicked()), this, SLOT(AddExcludePath()));
connect(mUI.mBtnEditIgnorePath, SIGNAL(clicked()), this, SLOT(EditExcludePath())); connect(mUI.mBtnEditIgnorePath, SIGNAL(clicked()), this, SLOT(EditExcludePath()));
connect(mUI.mBtnRemoveIgnorePath, SIGNAL(clicked()), this, SLOT(RemoveExcludePath())); connect(mUI.mBtnRemoveIgnorePath, SIGNAL(clicked()), this, SLOT(RemoveExcludePath()));
@ -150,7 +150,7 @@ void ProjectFileDialog::BrowseBuildDir()
{ {
const QString dir(getExistingDirectory(tr("Select Cppcheck build dir"), false)); const QString dir(getExistingDirectory(tr("Select Cppcheck build dir"), false));
if (!dir.isEmpty()) if (!dir.isEmpty())
mUI.buildDirEdit->setText(dir); mUI.mEditBuildDir->setText(dir);
} }
void ProjectFileDialog::BrowseCompileDatabase() void ProjectFileDialog::BrowseCompileDatabase()
@ -192,7 +192,7 @@ void ProjectFileDialog::AddPath(const QString &path)
const QString newpath = QDir::toNativeSeparators(path); const QString newpath = QDir::toNativeSeparators(path);
QListWidgetItem *item = new QListWidgetItem(newpath); QListWidgetItem *item = new QListWidgetItem(newpath);
item->setFlags(item->flags() | Qt::ItemIsEditable); item->setFlags(item->flags() | Qt::ItemIsEditable);
mUI.mListPaths->addItem(item); mUI.mListCheckPaths->addItem(item);
} }
void ProjectFileDialog::AddExcludePath(const QString &path) void ProjectFileDialog::AddExcludePath(const QString &path)
@ -216,7 +216,7 @@ QString ProjectFileDialog::GetRootPath() const
QString ProjectFileDialog::GetBuildDir() const QString ProjectFileDialog::GetBuildDir() const
{ {
return mUI.buildDirEdit->text(); return mUI.mEditBuildDir->text();
} }
QString ProjectFileDialog::GetImportProject() const QString ProjectFileDialog::GetImportProject() const
@ -251,10 +251,10 @@ QStringList ProjectFileDialog::GetDefines() const
QStringList ProjectFileDialog::GetPaths() const QStringList ProjectFileDialog::GetPaths() const
{ {
const int count = mUI.mListPaths->count(); const int count = mUI.mListCheckPaths->count();
QStringList paths; QStringList paths;
for (int i = 0; i < count; i++) { for (int i = 0; i < count; i++) {
QListWidgetItem *item = mUI.mListPaths->item(i); QListWidgetItem *item = mUI.mListCheckPaths->item(i);
paths << QDir::fromNativeSeparators(item->text()); paths << QDir::fromNativeSeparators(item->text());
} }
return paths; return paths;
@ -299,7 +299,7 @@ void ProjectFileDialog::SetRootPath(const QString &root)
void ProjectFileDialog::SetBuildDir(const QString &buildDir) void ProjectFileDialog::SetBuildDir(const QString &buildDir)
{ {
mUI.buildDirEdit->setText(buildDir); mUI.mEditBuildDir->setText(buildDir);
} }
void ProjectFileDialog::SetImportProject(const QString &importProject) void ProjectFileDialog::SetImportProject(const QString &importProject)
@ -391,14 +391,14 @@ void ProjectFileDialog::EditIncludeDir()
void ProjectFileDialog::EditPath() void ProjectFileDialog::EditPath()
{ {
QListWidgetItem *item = mUI.mListPaths->currentItem(); QListWidgetItem *item = mUI.mListCheckPaths->currentItem();
mUI.mListPaths->editItem(item); mUI.mListCheckPaths->editItem(item);
} }
void ProjectFileDialog::RemovePath() void ProjectFileDialog::RemovePath()
{ {
const int row = mUI.mListPaths->currentRow(); const int row = mUI.mListCheckPaths->currentRow();
QListWidgetItem *item = mUI.mListPaths->takeItem(row); QListWidgetItem *item = mUI.mListCheckPaths->takeItem(row);
delete item; delete item;
} }