void QTexinfo::updateStyles(ControlTexinfo::texFileSuffix whichStyle)
{
ContentsType & data = texdata_[whichStyle];
- bool const withFullPath = dialog_->path->isChecked();
+ bool const withFullPath = dialog_->pathCB->isChecked();
getTexFileList(whichStyle, data, withFullPath);
- dialog_->fileList->clear();
+ dialog_->fileListLW->clear();
ContentsType::const_iterator it = data.begin();
ContentsType::const_iterator end = data.end();
for (; it != end; ++it)
- dialog_->fileList->addItem(toqstr(*it));
+ dialog_->fileListLW->addItem(toqstr(*it));
activeStyle = whichStyle;
}
form, SLOT(slotClose()));
connect( viewPB, SIGNAL( clicked() ), this, SLOT( viewClicked() ) );
- connect( whatStyle, SIGNAL( activated(const QString&) ), this, SLOT( enableViewPB() ) );
- connect( whatStyle, SIGNAL( activated(int) ), this, SLOT( update() ) );
- connect( path, SIGNAL( stateChanged(int) ), this, SLOT( update() ) );
+ connect( whatStyleCO, SIGNAL( activated(const QString&) ), this, SLOT( enableViewPB() ) );
+ connect( whatStyleCO, SIGNAL( activated(int) ), this, SLOT( update() ) );
+ connect( pathCB, SIGNAL( stateChanged(int) ), this, SLOT( update() ) );
connect( rescanPB, SIGNAL( clicked() ), this, SLOT( enableViewPB() ) );
connect( rescanPB, SIGNAL( clicked() ), this, SLOT( rescanClicked() ) );
- connect( fileList, SIGNAL( itemClicked(QListWidgetItem*) ), this, SLOT( enableViewPB() ) );
+ connect( fileListLW, SIGNAL( itemClicked(QListWidgetItem*) ), this, SLOT( enableViewPB() ) );
+ connect( fileListLW, SIGNAL( itemSelectionChanged() ), this, SLOT( enableViewPB() ) );
}
void QTexinfoDialog::viewClicked()
{
- vector<string>::size_type const fitem = fileList->currentRow();
+ vector<string>::size_type const fitem = fileListLW->currentRow();
vector<string> const & data = form_->texdata_[form_->activeStyle];
string file = data[fitem];
- if (!path->isChecked())
+ if (!pathCB->isChecked())
file = getTexFileFromList(data[fitem],
form_->controller().getFileType(form_->activeStyle));
form_->controller().viewFile(file);
void QTexinfoDialog::update()
{
- switch (whatStyle->currentIndex()) {
+ switch (whatStyleCO->currentIndex()) {
case 0:
form_->updateStyles(ControlTexinfo::cls);
break;
void QTexinfoDialog::enableViewPB()
{
- viewPB->setEnabled(fileList->currentRow() > -1);
+ viewPB->setEnabled(fileListLW->currentRow() > -1);
}
} // namespace frontend
<ui version="4.0" >
- <author></author>
- <comment></comment>
- <exportmacro></exportmacro>
<class>QTexinfoUi</class>
<widget class="QDialog" name="QTexinfoUi" >
<property name="geometry" >
<number>6</number>
</property>
<item row="1" column="0" >
- <widget class="QListWidget" name="fileList" />
+ <widget class="QListWidget" name="fileListLW" />
</item>
<item row="3" column="0" >
<layout class="QHBoxLayout" >
<number>6</number>
</property>
<item>
- <widget class="QComboBox" name="whatStyle" >
+ <widget class="QComboBox" name="whatStyleCO" >
<property name="toolTip" >
<string>Selected classes or styles</string>
</property>
</spacer>
</item>
<item>
- <widget class="QCheckBox" name="path" >
+ <widget class="QCheckBox" name="pathCB" >
<property name="toolTip" >
<string>Toggles view of the file list</string>
</property>
</item>
</layout>
</widget>
- <pixmapfunction></pixmapfunction>
- <includes>
- <include location="local" >qt_helpers.h</include>
- </includes>
<tabstops>
- <tabstop>whatStyle</tabstop>
- <tabstop>path</tabstop>
- <tabstop>fileList</tabstop>
+ <tabstop>whatStyleCO</tabstop>
+ <tabstop>pathCB</tabstop>
+ <tabstop>fileListLW</tabstop>
<tabstop>rescanPB</tabstop>
<tabstop>viewPB</tabstop>
<tabstop>closePB</tabstop>
</tabstops>
+ <includes>
+ <include location="local" >qt_helpers.h</include>
+ </includes>
<resources/>
<connections/>
</ui>