本文整理汇总了C++中Mol::GetMolName方法的典型用法代码示例。如果您正苦于以下问题:C++ Mol::GetMolName方法的具体用法?C++ Mol::GetMolName怎么用?C++ Mol::GetMolName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Mol
的用法示例。
在下文中一共展示了Mol::GetMolName方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OnReadFile
void MyFrame::OnReadFile (wxString filename)
{
if (mol.ReadPdb((const char*)filename.mb_str(wxConvUTF8) )) {
if ((mol.natm==0) && (mol.nhetatm!=0)) geoSettings.showHetatm=true;
MyTab::EnableGeom();
UpdateShadowmap();
wxString name( mol.GetMolName(), wxConvUTF8 );
SetTitle( name.BeforeLast('.')+ _T(" - QuteMol") );
m_tb->SetTitleText(name);
geoSettings.Apply();
// redo shaders, as texture size could have changed
cgSettings.UpdateShaders();
} else {
wxMessageBox(wxString::FromAscii(QAtom::lastReadError), _T(":-("), wxOK | wxICON_EXCLAMATION, this);
m_tb->SetTitleText();
}
// remake shaders cos texture size could have changed...
//theText->LoadFile(openFileDialog->GetFilename());
//SetStatusText(GetCurrentFilename(), 0);
}
示例2: OnKeyDown
void TestGLCanvas::OnKeyDown( wxKeyEvent& event ){
wxConsumeTrackBallEvent(event,true,track);
#ifdef __DARWIN__
wxString path = wxStandardPaths::Get().GetResourcesDir() + "/presets/new.preset";
#else
wxString path = "presets\\new.preset";
#endif
if (event.GetKeyCode() == WXK_F7 ) {
cgSettings.Save(path.c_str());
}
if (event.GetKeyCode() == WXK_F6 ) {
if (cgSettings.Load(path.c_str())) {
MyTab::UpdateAll();
cgSettings.ResetHalo();
cgSettings.UpdateShaders();
SceneChanged();
}
}
if (event.GetKeyCode() == WXK_F5 ) {
mol.PrepareAOSingleView();
SceneChanged();
}
if (event.GetKeyCode() == WXK_F2 ) {
static int status=0;
status=(status+1) % 5;
draw_balls = (status==0) || (status==1) || (status==2) ;
draw_sticks = (status==0) || (status==1) || (status==3) || (status==4) ;
draw_wireframe_balls= (status==1) ;
draw_wireframe_sticks= (status==1) || (status==3) ;
SceneChanged();
}
if (event.GetKeyCode() == WXK_F1 ) {
wxString text;
if (!mol.IsReady() ) text=wxT("(no molecule)");
else {
text=wxString( mol.GetMolName(), wxConvUTF8 ).BeforeLast('.') +
wxT("\n (file: \"")+wxString( mol.filename, wxConvUTF8 ) +wxT("\")\n\n");
text=text+wxString::Format(wxT("%d atoms\n"),mol.atom.size());
if (mol.sticks) {
text=text+wxString::Format(wxT("%d bonds\n"),mol.bond.size());
}
text=text+wxString::Format(
_T("\nUsing:\n Texture size = %dx%d\n Patch size=%dx%d"),
moltextureCanvas.GetHardRes(),
moltextureCanvas.GetHardRes(),
CSIZE,CSIZE
);
}
wxMessageBox(text, _T("QuteMol - file info"), wxOK | wxICON_INFORMATION, this);
}
if (event.GetKeyCode() == WXK_F6 ) {
use_accurate_halo=!use_accurate_halo;
SceneChanged();
}
// temp, should e set auto depending on dist
if (event.GetKeyCode() == WXK_F2 ) {
cgSettings.P_capping=!cgSettings.P_capping;
cgSettings.UpdateShaders();
SceneChanged();
}
}