@ -74,8 +74,8 @@ Kalzium::Kalzium()
m_infoDialog = 0 ;
m_toolboxCurrent = 0 ;
connect ( m_PerodicTableView , TQ T _SIGNAL( ElementClicked ( int ) ) , this , TQ T _SLOT( openInformationDialog ( int ) ) ) ;
connect ( m_PerodicTableView , TQ T _SIGNAL( MouseOver ( int ) ) , this , TQ T _SLOT( slotStatusbar ( int ) ) ) ;
connect ( m_PerodicTableView , TQ _SIGNAL( ElementClicked ( int ) ) , this , TQ _SLOT( openInformationDialog ( int ) ) ) ;
connect ( m_PerodicTableView , TQ _SIGNAL( MouseOver ( int ) ) , this , TQ _SLOT( slotStatusbar ( int ) ) ) ;
// layouting
setCentralWidget ( centralWidget ) ;
@ -107,14 +107,14 @@ Kalzium::Kalzium()
void Kalzium : : setupActions ( )
{
m_actionNoScheme = new TDEToggleAction ( i18n ( " &No Color Scheme " ) , 0 , this , TQ T _SLOT( slotNoLook ( ) ) , actionCollection ( ) , " view_look_noscheme " ) ;
m_actionNoScheme = new TDEToggleAction ( i18n ( " &No Color Scheme " ) , 0 , this , TQ _SLOT( slotNoLook ( ) ) , actionCollection ( ) , " view_look_noscheme " ) ;
// the actions for the color schemes
m_actionGroups = new TDEToggleAction ( i18n ( " Show &Groups " ) , 0 , this , TQ T _SLOT( slotLookGroups ( ) ) , actionCollection ( ) , " view_look_groups " ) ;
m_actionBlocks = new TDEToggleAction ( i18n ( " Show &Blocks " ) , 0 , this , TQ T _SLOT( slotLookBlocks ( ) ) , actionCollection ( ) , " view_look_blocks " ) ;
m_actionAcid = new TDEToggleAction ( i18n ( " Show &Acid Behavior " ) , 0 , this , TQ T _SLOT( slotLookAcidBehavior ( ) ) , actionCollection ( ) , " view_look_acid " ) ;
m_actionFamily = new TDEToggleAction ( i18n ( " Show &Family " ) , 0 , this , TQ T _SLOT( slotLookFamily ( ) ) , actionCollection ( ) , " view_look_family " ) ;
m_actionCrystal = new TDEToggleAction ( i18n ( " Show &Crystal Structures " ) , 0 , this , TQ T _SLOT( slotLookCrystal ( ) ) , actionCollection ( ) , " view_look_crystal " ) ;
m_actionGroups = new TDEToggleAction ( i18n ( " Show &Groups " ) , 0 , this , TQ _SLOT( slotLookGroups ( ) ) , actionCollection ( ) , " view_look_groups " ) ;
m_actionBlocks = new TDEToggleAction ( i18n ( " Show &Blocks " ) , 0 , this , TQ _SLOT( slotLookBlocks ( ) ) , actionCollection ( ) , " view_look_blocks " ) ;
m_actionAcid = new TDEToggleAction ( i18n ( " Show &Acid Behavior " ) , 0 , this , TQ _SLOT( slotLookAcidBehavior ( ) ) , actionCollection ( ) , " view_look_acid " ) ;
m_actionFamily = new TDEToggleAction ( i18n ( " Show &Family " ) , 0 , this , TQ _SLOT( slotLookFamily ( ) ) , actionCollection ( ) , " view_look_family " ) ;
m_actionCrystal = new TDEToggleAction ( i18n ( " Show &Crystal Structures " ) , 0 , this , TQ _SLOT( slotLookCrystal ( ) ) , actionCollection ( ) , " view_look_crystal " ) ;
//the actions for switching PerodicTableView
TQStringList gradientlist ;
@ -129,7 +129,7 @@ void Kalzium::setupActions()
gradientlist . append ( i18n ( " Electron Affinity " ) ) ;
gradient_action = new TDESelectAction ( i18n ( " &Gradient " ) , 0 , this , 0 , actionCollection ( ) , " view_look_gradmenu " ) ;
gradient_action - > setItems ( gradientlist ) ;
connect ( gradient_action , TQ T _SIGNAL( activated ( int ) ) , this , TQ T _SLOT( slotSwitchtoGradient ( int ) ) ) ;
connect ( gradient_action , TQ _SIGNAL( activated ( int ) ) , this , TQ _SLOT( slotSwitchtoGradient ( int ) ) ) ;
// the actions for switching PerodicTableView
TQStringList numlist ;
@ -140,25 +140,25 @@ void Kalzium::setupActions()
numeration_action = new TDESelectAction ( i18n ( " &Numeration " ) , 0 , this , 0 , actionCollection ( ) , " view_numerationtype " ) ;
numeration_action - > setItems ( numlist ) ;
numeration_action - > setCurrentItem ( Prefs : : numeration ( ) ) ;
connect ( numeration_action , TQ T _SIGNAL( activated ( int ) ) , this , TQ T _SLOT( slotSwitchtoNumeration ( int ) ) ) ;
connect ( numeration_action , TQ _SIGNAL( activated ( int ) ) , this , TQ _SLOT( slotSwitchtoNumeration ( int ) ) ) ;
m_SidebarAction = new TDEAction ( i18n ( " Show &Sidebar " ) , " sidebar " , 0 , this , TQ T _SLOT( slotShowHideSidebar ( ) ) , actionCollection ( ) , " view_sidebar " ) ;
m_SidebarAction = new TDEAction ( i18n ( " Show &Sidebar " ) , " sidebar " , 0 , this , TQ _SLOT( slotShowHideSidebar ( ) ) , actionCollection ( ) , " view_sidebar " ) ;
# ifdef HAVE_FACILE
m_EQSolverAction = new TDEAction ( i18n ( " &Equation Solver... " ) , " eqchem " , 0 , this , TQ T _SLOT( slotShowEQSolver ( ) ) , actionCollection ( ) , " tools_eqsolver " ) ;
m_EQSolverAction = new TDEAction ( i18n ( " &Equation Solver... " ) , " eqchem " , 0 , this , TQ _SLOT( slotShowEQSolver ( ) ) , actionCollection ( ) , " tools_eqsolver " ) ;
# endif
// tools actions
m_pPlotAction = new TDEAction ( i18n ( " &Plot Data... " ) , " plot " , 0 , this , TQ T _SLOT( slotPlotData ( ) ) , actionCollection ( ) , " tools_plotdata " ) ;
m_pGlossaryAction = new TDEAction ( i18n ( " &Glossary... " ) , " glossary " , 0 , this , TQ T _SLOT( slotGlossary ( ) ) , actionCollection ( ) , " tools_glossary " ) ;
m_pPlotAction = new TDEAction ( i18n ( " &Plot Data... " ) , " plot " , 0 , this , TQ _SLOT( slotPlotData ( ) ) , actionCollection ( ) , " tools_plotdata " ) ;
m_pGlossaryAction = new TDEAction ( i18n ( " &Glossary... " ) , " glossary " , 0 , this , TQ _SLOT( slotGlossary ( ) ) , actionCollection ( ) , " tools_glossary " ) ;
// other period view options
m_pLegendAction = new TDEAction ( i18n ( " Show &Legend " ) , " legend " , 0 , this , TQ T _SLOT( slotShowLegend ( ) ) , actionCollection ( ) , " view_legend " ) ;
m_pTooltipAction = new TDEAction ( i18n ( " Show &Tooltip " ) , " tooltip " , 0 , this , TQ T _SLOT( slotEnableTooltips ( ) ) , actionCollection ( ) , " view_tooltip " ) ;
m_pLegendAction = new TDEAction ( i18n ( " Show &Legend " ) , " legend " , 0 , this , TQ _SLOT( slotShowLegend ( ) ) , actionCollection ( ) , " view_legend " ) ;
m_pTooltipAction = new TDEAction ( i18n ( " Show &Tooltip " ) , " tooltip " , 0 , this , TQ _SLOT( slotEnableTooltips ( ) ) , actionCollection ( ) , " view_tooltip " ) ;
// the standard actions
KStdAction : : preferences ( this , TQ T _SLOT( showSettingsDialog ( ) ) , actionCollection ( ) ) ;
KStdAction : : quit ( kapp , TQ T _SLOT ( closeAllWindows ( ) ) , actionCollection ( ) ) ;
KStdAction : : preferences ( this , TQ _SLOT( showSettingsDialog ( ) ) , actionCollection ( ) ) ;
KStdAction : : quit ( kapp , TQ _SLOT ( closeAllWindows ( ) ) , actionCollection ( ) ) ;
slotShowScheme ( Prefs : : colorschemebox ( ) ) ;
slotSwitchtoNumeration ( Prefs : : numeration ( ) ) ;
@ -213,7 +213,7 @@ void Kalzium::setupSidebars()
lay - > activate ( ) ;
m_detailWidget = new DetailedGraphicalOverview ( fake , " DetailedGraphicalOverview " ) ;
m_detailWidget - > setMinimumSize ( 200 , m_detailWidget - > minimumSize ( ) . height ( ) ) ;
connect ( m_PerodicTableView , TQ T _SIGNAL( MouseOver ( int ) ) , this , TQ T _SLOT( slotSelectedNumber ( int ) ) ) ;
connect ( m_PerodicTableView , TQ _SIGNAL( MouseOver ( int ) ) , this , TQ _SLOT( slotSelectedNumber ( int ) ) ) ;
lay - > addWidget ( m_detailWidget ) ;
lay - > addItem ( new TQSpacerItem ( 10 , 10 , TQSizePolicy : : Fixed , TQSizePolicy : : MinimumExpanding ) ) ;
m_toolbox - > addItem ( fake , SmallIcon ( " overview " ) , i18n ( " Overview " ) ) ;
@ -222,26 +222,26 @@ void Kalzium::setupSidebars()
m_toolbox - > addItem ( m_calcWidget , SmallIcon ( " calculate " ) , i18n ( " Calculate " ) ) ;
m_timeWidget = new TimeWidgetIMPL ( this , " TimeWidget " ) ;
connect ( m_timeWidget - > time_slider , TQ T _SIGNAL( valueChanged ( int ) ) ,
m_PerodicTableView , TQ T _SLOT( setDate ( int ) ) ) ;
connect ( m_timeWidget - > time_slider , TQ T _SIGNAL( valueChanged ( int ) ) ,
m_timeWidget , TQ T _SLOT( slotChanged ( int ) ) ) ;
connect ( m_timeWidget - > Number1 , TQ T _SIGNAL( valueChanged ( int ) ) ,
m_timeWidget , TQ T _SLOT( slotChanged ( int ) ) ) ;
connect ( m_timeWidget - > time_slider , TQ _SIGNAL( valueChanged ( int ) ) ,
m_PerodicTableView , TQ _SLOT( setDate ( int ) ) ) ;
connect ( m_timeWidget - > time_slider , TQ _SIGNAL( valueChanged ( int ) ) ,
m_timeWidget , TQ _SLOT( slotChanged ( int ) ) ) ;
connect ( m_timeWidget - > Number1 , TQ _SIGNAL( valueChanged ( int ) ) ,
m_timeWidget , TQ _SLOT( slotChanged ( int ) ) ) ;
m_toolbox - > addItem ( m_timeWidget , SmallIcon ( " timeline " ) , i18n ( " Timeline " ) ) ;
m_somWidget = new SOMWidgetIMPL ( this , " somWidget " ) ;
connect ( m_somWidget - > temp_slider , TQ T _SIGNAL( valueChanged ( int ) ) ,
m_PerodicTableView , TQ T _SLOT( setTemperature ( int ) ) ) ;
connect ( m_somWidget - > temp_slider , TQ _SIGNAL( valueChanged ( int ) ) ,
m_PerodicTableView , TQ _SLOT( setTemperature ( int ) ) ) ;
m_toolbox - > addItem ( m_somWidget , SmallIcon ( " statematter " ) , i18n ( " State of Matter " ) ) ;
connect ( m_toolbox , TQ T _SIGNAL( currentChanged ( int ) ) , this , TQ T _SLOT( slotToolboxCurrentChanged ( int ) ) ) ;
connect ( m_toolbox , TQ _SIGNAL( currentChanged ( int ) ) , this , TQ _SLOT( slotToolboxCurrentChanged ( int ) ) ) ;
moveDockWindow ( m_dockWin , DockLeft ) ;
setDockEnabled ( /*m_dockWin, */ DockTop , false ) ;
setDockEnabled ( /*m_dockWin, */ DockBottom , false ) ;
m_dockWin - > hide ( ) ;
connect ( m_dockWin , TQ T _SIGNAL( visibilityChanged ( bool ) ) , this , TQ T _SLOT( slotSidebarVisibilityChanged ( bool ) ) ) ;
connect ( m_dockWin , TQ _SIGNAL( visibilityChanged ( bool ) ) , this , TQ _SLOT( slotSidebarVisibilityChanged ( bool ) ) ) ;
}
@ -263,7 +263,7 @@ void Kalzium::slotShowEQSolver()
eqsolver - > setMinimumSize ( 600 , 400 ) ;
vbox - > addWidget ( eqsolver ) ;
connect ( dlg , TQ T _SIGNAL( applyClicked ( ) ) , eqsolver , TQ T _SLOT( compute ( ) ) ) ;
connect ( dlg , TQ _SIGNAL( applyClicked ( ) ) , eqsolver , TQ _SLOT( compute ( ) ) ) ;
dlg - > show ( ) ;
# endif
}
@ -398,8 +398,8 @@ void Kalzium::showSettingsDialog()
//TDEConfigDialog didn't find an instance of this dialog, so lets create it :
TDEConfigDialog * dialog = new TDEConfigDialog ( this , " settings " , Prefs : : self ( ) ) ;
connect ( dialog , TQ T _SIGNAL( settingsChanged ( ) ) , this , TQ T _SLOT( slotUpdateSettings ( ) ) ) ;
connect ( dialog , TQ T _SIGNAL( settingsChanged ( ) ) , m_somWidget , TQ T _SLOT( reloadUnits ( ) ) ) ;
connect ( dialog , TQ _SIGNAL( settingsChanged ( ) ) , this , TQ _SLOT( slotUpdateSettings ( ) ) ) ;
connect ( dialog , TQ _SIGNAL( settingsChanged ( ) ) , m_somWidget , TQ _SLOT( reloadUnits ( ) ) ) ;
dialog - > addPage ( new setColors ( 0 , " colors_page " ) , i18n ( " Colors " ) , " colorize " ) ;
dialog - > addPage ( new setupUnits ( 0 , " units_page " ) , i18n ( " Units " ) , " gear " ) ;
dialog - > addPage ( new setupMisc ( 0 , " miscpage " ) , i18n ( " Miscellaneous " ) , " misc " ) ;
@ -440,10 +440,10 @@ void Kalzium::openInformationDialog( int number )
this , " detailedDlg " ) ;
// Remove the selection when this dialog finishes or hides.
connect ( m_infoDialog , TQ T _SIGNAL( hidden ( ) ) ,
m_PerodicTableView , TQ T _SLOT( unSelect ( ) ) ) ;
connect ( m_infoDialog , TQ T _SIGNAL( elementChanged ( int ) ) ,
m_PerodicTableView , TQ T _SLOT( selectElement ( int ) ) ) ;
connect ( m_infoDialog , TQ _SIGNAL( hidden ( ) ) ,
m_PerodicTableView , TQ _SLOT( unSelect ( ) ) ) ;
connect ( m_infoDialog , TQ _SIGNAL( elementChanged ( int ) ) ,
m_PerodicTableView , TQ _SLOT( selectElement ( int ) ) ) ;
}
m_infoDialog - > show ( ) ;
}